public static class HttpdAddressUtility.Address extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
DEFAULT_HOST |
String |
host |
static int |
NO_PORT_SPECIFIED_VALUE |
int |
port |
static int |
PORT_WILDCARD_VALUE |
String |
scheme |
static String |
WILDCARD |
| Constructor and Description |
|---|
HttpdAddressUtility.Address(String host,
int port) |
HttpdAddressUtility.Address(String scheme,
String host,
int port) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object other) |
int |
hashCode() |
boolean |
isHostDefault() |
boolean |
isHostWildcard() |
boolean |
isPortDefined() |
boolean |
isPortWildcard() |
boolean |
matches(HttpdAddressUtility.Address other,
boolean matchSchemes)
This differs from equals in the way that it considers wildcard values:
wildcard host matches any host
default host matches default host
wildcard port matches any port
undefined port matches undefined port
The addresses match if both address and port match.
|
static HttpdAddressUtility.Address |
parse(String address)
A simple parser of the provided address into host and port
sections.
|
static HttpdAddressUtility.Address |
parse(String address,
String defaultScheme)
Parses given address into an Address object and assigns a default scheme if none
is present in the address itself.
|
String |
toString() |
String |
toString(boolean includeScheme,
boolean interpretWildcardPort) |
public String host
public int port
public String scheme
public static final String WILDCARD
public static final String DEFAULT_HOST
public static final int PORT_WILDCARD_VALUE
public static final int NO_PORT_SPECIFIED_VALUE
public HttpdAddressUtility.Address(String host, int port)
public static HttpdAddressUtility.Address parse(String address)
This is equivalent to calling parse(String, String) with
the default scheme "http".
address - the address to parsepublic static HttpdAddressUtility.Address parse(String address, String defaultScheme)
address - the address to parsedefaultScheme - the default scheme to apply or null if no scheme is required by defaultpublic boolean isPortWildcard()
public boolean isPortDefined()
public boolean isHostWildcard()
public boolean isHostDefault()
public boolean matches(HttpdAddressUtility.Address other, boolean matchSchemes)
other - the address to matchwhether - to match the scheme as wellpublic String toString(boolean includeScheme, boolean interpretWildcardPort)
Copyright © 2008-2014 Red Hat, Inc.. All Rights Reserved.