public enum HttpdAddressUtility extends Enum<HttpdAddressUtility>
| Modifier and Type | Class and Description |
|---|---|
static class |
HttpdAddressUtility.Address |
| Enum Constant and Description |
|---|
APACHE_1_3 |
APACHE_2_x |
| Modifier and Type | Field and Description |
|---|---|
static String |
BOGUS_HOST_WITHOUT_FORWARD_DNS |
static String |
BOGUS_HOST_WITHOUT_REVERSE_DNS |
| Modifier and Type | Method and Description |
|---|---|
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.
|
public static final HttpdAddressUtility APACHE_1_3
public static final HttpdAddressUtility APACHE_2_x
public static final String BOGUS_HOST_WITHOUT_FORWARD_DNS
public static final String BOGUS_HOST_WITHOUT_REVERSE_DNS
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 nameNullPointerException - 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 specspublic 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 portpublic 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 upgradepublic 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.Copyright © 2008-2014 Red Hat, Inc.. All Rights Reserved.