Source:
public AvailabilityType getAvailability() { AvailabilityType availabilityType; boolean securityRealmReady = true; try { try { readAttribute(getHostAddress(), "name", AVAIL_OP_TIMEOUT_SECONDS); availabilityType = UP; lastManagementInterfaceReply = new Date().getTime(); } catch (ResultFailedException e) { LOG.warn("Domain host name seems to be changed"); setASHostName(findASDomainHostName()); LOG.info("Detected domain host name [" + getASHostName() + "]"); readAttribute(getHostAddress(), "name"); availabilityType = UP; } catch (SecurityRealmNotReadyException e) { previousAvailabilityType = DOWN; availabilityType = DOWN; securityRealmReady = false; } catch (UnauthorizedException e) { previousAvailabilityType = DOWN; availabilityType = DOWN; throw new InvalidPluginConfigurationException("User authenticated via HTTP management interface does" + " not have sufficient permissions. This can be fixed by either choosing different credential" + " or assigning roles in EAP Administration Console."); } } catch (TimeoutException e) { long now = new Date().getTime(); if (now - lastManagementInterfaceReply > MAX_TIMEOUT_FAILURE_WAIT) { availabilityType = DOWN; } else { ProcessInfo processInfo = context.getNativeProcess(); if (processInfo != null && processInfo.priorSnaphot().isRunning()) { availabilityType = previousAvailabilityType; } else { availabilityType = DOWN; } } } catch (InvalidPluginConfigurationException e) { throw e; } catch (Exception e) { if (LOG.isDebugEnabled()) { LOG.debug(getResourceDescription() + ": exception while checking availability", e); } availabilityType = DOWN; } if (!securityRealmReady) { throw new InvalidPluginConfigurationException("The security realm of the HTTP management interface" + " is not ready to process requests. This usually indicates that no user is configured"); } if (availabilityType == DOWN) { releaseVersion = null; } else if (previousAvailabilityType != UP) { onAvailGoesUp(); } previousAvailabilityType = availabilityType; return availabilityType; }

Target:
public AvailabilityType getAvailability() { AvailabilityType availabilityType; boolean securityRealmReady = true; boolean accessPermission = true; try { try { readAttribute(getHostAddress(), "name", AVAIL_OP_TIMEOUT_SECONDS); availabilityType = UP; lastManagementInterfaceReply = new Date().getTime(); } catch (ResultFailedException e) { LOG.warn("Domain host name seems to be changed"); setASHostName(findASDomainHostName()); LOG.info("Detected domain host name [" + getASHostName() + "]"); readAttribute(getHostAddress(), "name"); availabilityType = UP; } catch (SecurityRealmNotReadyException e) { previousAvailabilityType = DOWN; availabilityType = DOWN; securityRealmReady = false; } catch (UnauthorizedException e) { previousAvailabilityType = DOWN; availabilityType = DOWN; accessPermission = false; } } catch (TimeoutException e) { long now = new Date().getTime(); if (now - lastManagementInterfaceReply > MAX_TIMEOUT_FAILURE_WAIT) { availabilityType = DOWN; } else { ProcessInfo processInfo = context.getNativeProcess(); if (processInfo != null && processInfo.priorSnaphot().isRunning()) { availabilityType = previousAvailabilityType; } else { availabilityType = DOWN; } } } catch (InvalidPluginConfigurationException e) { throw e; } catch (Exception e) { if (LOG.isDebugEnabled()) { LOG.debug(getResourceDescription() + ": exception while checking availability", e); } availabilityType = DOWN; } if (!securityRealmReady) { throw new InvalidPluginConfigurationException("The security realm of the HTTP management interface" + " is not ready to process requests. This usually indicates that no user is configured"); } if (!accessPermission) { throw new InvalidPluginConfigurationException("User authenticated via HTTP management interface does" + " not have sufficient permissions. This can be fixed by either choosing different credential" + " or assigning roles in EAP Administration Console."); } if (availabilityType == DOWN) { releaseVersion = null; } else if (previousAvailabilityType != UP) { onAvailGoesUp(); } previousAvailabilityType = availabilityType; return availabilityType; }