Skip navigation links
oracle.security.jps.service.policystore.info
Class OpssDNSName
java.lang.Object
oracle.security.jps.service.policystore.info.DataType
oracle.security.jps.service.policystore.info.OpssDNSName
- All Implemented Interfaces:
- ExpressionComponent
-
public class OpssDNSName
- extends DataType
Represents DNS name. For details see XACML 3.0 core specification section A.2 The "urn:oasis:names:tc:xacml:2.0:data-type:dnsName" primitive type represents a Domain Name Service (DNS) host name, with optional port or port range. The syntax SHALL be: dnsName = hostname [ ":" portrange ] The hostname is formatted in accordance with IETF RFC 2396 "Uniform Resource Identifiers (URI): Generic Syntax", section 3.2, except that a wildcard "*" may be used in the left-most component of the hostname to indicate "any subdomain" under the domain specified to its right. The port or port range syntax SHALL be portrange = portnumber | "-"portnumber | portnumber"-"[portnumber] where "portnumber" is a decimal port number. If the port number is of the form "-x", where "x" is a port number, then the range is all ports numbered "x" and below. If the port number is of the form "x-", then the range is all ports numbered "x" and above. [syntax is taken from the Java SocketPermission.]
Nested classes/interfaces inherited from class oracle.security.jps.service.policystore.info.DataType |
DataType.TYPE |
Constructor Summary |
OpssDNSName(java.lang.String dns)
Given a string generates a dns name object. |
OpssDNSName(java.lang.String host, int port)
|
OpssDNSName(java.lang.String host, int lower, int higher)
|
Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, wait, wait, wait |
UNBOUND
public static int UNBOUND
OpssDNSName
public OpssDNSName(java.lang.String dns)
throws java.lang.IllegalArgumentException
- Given a string generates a dns name object.
- Throws:
java.lang.IllegalArgumentException
- if input param is null or is not a valid dns name.
OpssDNSName
public OpssDNSName(java.lang.String host,
int port)
throws java.lang.IllegalArgumentException
-
- Throws:
java.lang.IllegalArgumentException
OpssDNSName
public OpssDNSName(java.lang.String host,
int lower,
int higher)
throws java.lang.IllegalArgumentException
-
- Throws:
java.lang.IllegalArgumentException
getValue
public OpssDNSName getValue()
- Description copied from class:
DataType
- Returns an object representing real value of this data type. For example, OpssInteger.getValue will return an Integer object.
-
- Specified by:
getValue
in class DataType
-
- Returns:
- DNS name value of this object.
getType
public final DataType.TYPE getType()
- Description copied from class:
DataType
- For all concrete subclasses, this method is required so that function evaluators at runtime don't need to keep doing instanceof
-
- Specified by:
getType
in class DataType
-
- Returns:
- Data Type of this object, always TYPE.DNS_NAME
valueOf
public static OpssDNSName valueOf(java.lang.String str)
throws java.lang.IllegalArgumentException
- Given a string value, generates an OpssDNSName object.
-
- Throws:
java.lang.IllegalArgumentException
getHostName
public java.lang.String getHostName()
-
- Returns:
- host name for this dns name.
getLowerPort
public int getLowerPort()
-
- Returns:
- lower port number if a range is specified, else the port number
getHigherPort
public int getHigherPort()
-
- Returns:
- higher port number if a range is specified, else the port number
getPort
public int getPort()
-
- Returns:
- port for this dns name if no range is specified, else returns the lower port number.
isRange
public boolean isRange()
-
- Returns:
- true if the dns name is specified with a range of ports.
isSubDomain
public boolean isSubDomain()
-
- Returns:
- true if this dns name is in a subdomain.
setRange
public void setRange(java.lang.String range)
throws java.lang.IllegalArgumentException
-
- Throws:
java.lang.IllegalArgumentException
getComponentType
public ExpressionComponent.Type getComponentType()
- Description copied from interface:
ExpressionComponent
- Returns type of the component.
-
- Returns:
isValid
public boolean isValid()
equals
public boolean equals(java.lang.Object other)
- Description copied from class:
DataType
- Override java method for accurate list and hashtable lookups.
-
- Specified by:
equals
in class DataType
hashCode
public int hashCode()
-
- Specified by:
hashCode
in class DataType
toString
public java.lang.String toString()
-
- Specified by:
toString
in class DataType
Skip navigation links
Copyright © 2011,2012, Oracle and/or its affiliates. All rights reserved.