public class DNSNameAttribute extends AttributeValue
| Modifier and Type | Field and Description |
|---|---|
static String |
identifier
Official name of this type
|
| Constructor and Description |
|---|
DNSNameAttribute(String hostname)
Creates the new
DNSNameAttribute with only the required hostname component. |
DNSNameAttribute(String hostname,
PortRange range)
Creates the new
DNSNameAttribute with the optional port range component. |
| Modifier and Type | Method and Description |
|---|---|
String |
encode()
Encodes the value in a form suitable for including in XML data like a request or an
obligation.
|
boolean |
equals(Object o)
Returns true if the input is an instance of this class and if its value equals the value
contained in this class.
|
String |
getHostName()
Returns the host name represented by this object.
|
static DNSNameAttribute |
getInstance(Node root)
Returns a new
DNSNameAttribute that represents the name at a particular DOM
node. |
static DNSNameAttribute |
getInstance(String value)
Returns a new
DNSNameAttribute that represents the name indicated by the
String provided. |
PortRange |
getPortRange()
Returns the port range represented by this object which will be unbound if no range was
specified.
|
int |
hashCode()
Returns the hashcode value used to index and compare this object with others of the same
type.
|
boolean |
isSubdomain()
Returns true if the leading character in the hostname is a '*', and therefore represents a
matching subdomain, or false otherwise.
|
String |
toString()
Converts to a String representation.
|
encode, encodeWithTags, evaluate, evaluatesToBag, getChildren, getType, isBag, returnsBagpublic static final String identifier
public DNSNameAttribute(String hostname) throws ParsingException
DNSNameAttribute with only the required hostname component.hostname - the host name component of the addressParsingException - if the hostname is invalidpublic DNSNameAttribute(String hostname, PortRange range) throws ParsingException
DNSNameAttribute with the optional port range component.hostname - the host name component of the addressrange - the port rangeParsingException - if the hostname is invalidpublic static DNSNameAttribute getInstance(Node root) throws ParsingException
DNSNameAttribute that represents the name at a particular DOM
node.root - the Node that contains the desired valueDNSNameAttribute representing the appropriate value (null if there
is a parsing error)ParsingException - if the hostname is invalidpublic static DNSNameAttribute getInstance(String value) throws ParsingException
DNSNameAttribute that represents the name indicated by the
String provided.value - a string representing the nameDNSNameAttributeParsingException - if the hostname is invalidpublic String getHostName()
public PortRange getPortRange()
public boolean isSubdomain()
public boolean equals(Object o)
public int hashCode()
public String toString()
public String encode()
AttributeValueencode in class AttributeValueString form of the valueCopyright © 2021 WSO2. All rights reserved.