|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD | |||||||||
java.lang.Objectjava.lang.Enum<HttpdAddressUtility>
org.rhq.plugins.apache.util.HttpdAddressUtility
public enum HttpdAddressUtility
Utility class to extract various HTTP addresses from Augeas loaded Apache configuration.
| Nested Class Summary | |
|---|---|
static class |
HttpdAddressUtility.Address
|
| Enum Constant Summary | |
|---|---|
APACHE_1_3
|
|
APACHE_2_x
|
|
| Field Summary | |
|---|---|
static String |
BOGUS_HOST_WITHOUT_FORWARD_DNS
|
static String |
BOGUS_HOST_WITHOUT_REVERSE_DNS
|
| Method Summary | |
|---|---|
static HttpdAddressUtility |
get(String version)
|
abstract List<HttpdAddressUtility.Address> |
getAllMainServerAddresses(ApacheDirectiveTree ag,
boolean substituteWildcards)
This returns all the addresses the server listens on. |
HttpdAddressUtility.Address |
getHttpdInternalMainServerAddressRepresentation(ApacheDirectiveTree runtimeConfig)
|
HttpdAddressUtility.Address |
getHttpdInternalVirtualHostAddressRepresentation(ApacheDirectiveTree runtimeConfig,
String virtualHost,
String serverName)
|
HttpdAddressUtility.Address |
getMainServerSampleAddress(ApacheDirectiveTree ag,
String limitToHost,
int limitToPort)
This just constructs a first available address under which the server or one of its virtual hosts can be reached. |
HttpdAddressUtility.Address |
getVirtualHostSampleAddress(ApacheDirectiveTree ag,
String virtualHost,
String serverName,
boolean legacyWildcardHostHandling)
This constructs an address on which given virtual host can be accessed. |
static boolean |
isAddressConforming(HttpdAddressUtility.Address listen,
String limitingHost,
int limitingPort,
boolean snmpModuleCompatibleMode)
Checks that given address represents a possibly wildcarded limitingHost and limitingPort values. |
static HttpdAddressUtility.Address |
parseListen(String listenValue)
|
static HttpdAddressUtility |
valueOf(String name)
Returns the enum constant of this type with the specified name. |
static HttpdAddressUtility[] |
values()
Returns an array containing the constants of this enum type, in the order they are declared. |
| Methods inherited from class java.lang.Enum |
|---|
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf |
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, wait, wait, wait |
| Enum Constant Detail |
|---|
public static final HttpdAddressUtility APACHE_1_3
public static final HttpdAddressUtility APACHE_2_x
| Field Detail |
|---|
public static final String BOGUS_HOST_WITHOUT_FORWARD_DNS
public static final String BOGUS_HOST_WITHOUT_REVERSE_DNS
| Method Detail |
|---|
public static HttpdAddressUtility[] values()
for (HttpdAddressUtility c : HttpdAddressUtility.values()) System.out.println(c);
public static HttpdAddressUtility valueOf(String name)
name - the name of the enum constant to be returned.
IllegalArgumentException - if this enum type has no constant
with the specified name
NullPointerException - if the argument is nullpublic static HttpdAddressUtility get(String version)
public abstract List<HttpdAddressUtility.Address> getAllMainServerAddresses(ApacheDirectiveTree ag,
boolean substituteWildcards)
ag - the tree of the httpd configurationsubstituteWildcards - true if wildcard substitution should be made on host and port specs
public HttpdAddressUtility.Address getMainServerSampleAddress(ApacheDirectiveTree ag,
String limitToHost,
int limitToPort)
ag - the tree of the httpd configurationlimitToHost - if non-null and different from HttpdAddressUtility.Address.DEFAULT_HOST and HttpdAddressUtility.Address.WILDCARD,
the sample address is looked for only for the given hostlimitToPort - if > 0, the sample address is looked for only for the given port
public HttpdAddressUtility.Address getVirtualHostSampleAddress(ApacheDirectiveTree ag,
String virtualHost,
String serverName,
boolean legacyWildcardHostHandling)
ag - the augeas tree of the httpd configurationvirtualHost - the port or address:port of the virtual hostserverName - the server name for the namebased virtual hosts (or null if the virtual host is ip based)legacyWildcardHostHandling - use the legacy handling of wildcard hosts. This should always be false unless you are calling this method
from the code generating the legacy resource keys during vhost upgrade
public HttpdAddressUtility.Address getHttpdInternalMainServerAddressRepresentation(ApacheDirectiveTree runtimeConfig)
public HttpdAddressUtility.Address getHttpdInternalVirtualHostAddressRepresentation(ApacheDirectiveTree runtimeConfig,
String virtualHost,
String serverName)
public static HttpdAddressUtility.Address parseListen(String listenValue)
public static boolean isAddressConforming(HttpdAddressUtility.Address listen,
String limitingHost,
int limitingPort,
boolean snmpModuleCompatibleMode)
listen - the address to checklimitingHost - the host to limit to. The null value or the HttpdAddressUtility.Address.DEFAULT_HOST
or the HttpdAddressUtility.Address.WILDCARD are not considered limitinglimitingPort - the port to limit the address to. Values <= 0 are not considered limitingsnmpModuleCompatibleMode - the snmp module represents both port 80 and port wildcard (*) as '0'.
If this flag is set to true, this method takes that into account.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD | |||||||||