Skip navigation links
oracle.security.jps.service.policystore.info
Class OpssIPAddress
java.lang.Object
oracle.security.jps.service.policystore.info.DataType
oracle.security.jps.service.policystore.info.OpssIPAddress
- All Implemented Interfaces:
- ExpressionComponent
-
public class OpssIPAddress
- extends DataType
Represents an ip address (v4 and v6), as defined in XACML 3.0 core specification, section A.2
Nested classes/interfaces inherited from class oracle.security.jps.service.policystore.info.DataType |
DataType.TYPE |
Constructor Summary |
OpssIPAddress(java.net.InetAddress addr, java.net.InetAddress mask, int port, boolean v4)
Creates an IPv4 or IPv6 address with given port value. |
OpssIPAddress(java.net.InetAddress addr, java.net.InetAddress mask, int low, int high, boolean v4)
Creates an IPv4 or IPv6 address with given range of ports. |
OpssIPAddress(java.lang.String str)
Generates an ip address given string format. |
Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, wait, wait, wait |
UNBOUND
public static int UNBOUND
OpssIPAddress
public OpssIPAddress(java.net.InetAddress addr,
java.net.InetAddress mask,
int port,
boolean v4)
- Creates an IPv4 or IPv6 address with given port value.
OpssIPAddress
public OpssIPAddress(java.net.InetAddress addr,
java.net.InetAddress mask,
int low,
int high,
boolean v4)
- Creates an IPv4 or IPv6 address with given range of ports.
OpssIPAddress
public OpssIPAddress(java.lang.String str)
throws java.lang.IllegalArgumentException
- Generates an ip address given string format.
- Parameters:
str
- input string
- Throws:
java.lang.IllegalArgumentException
- if given string is null or if it does not represent a valid IPv4 or IPv6 address.
getValue
public OpssIPAddress getValue()
- Implementation of superclass method, returns this object.
-
- Specified by:
getValue
in class DataType
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.IP_ADDRESS
getIPAddress
public java.net.InetAddress getIPAddress()
-
- Returns:
- InetAddress for this ip address.
getIPMask
public java.net.InetAddress getIPMask()
getLowerPort
public int getLowerPort()
-
- Returns:
- lower port if this ip address has port range, else value of port.
getUpperPort
public int getUpperPort()
-
- Returns:
- upper port if this ip address has port range, else value of port.
isPortRange
public boolean isPortRange()
-
- Returns:
- true if this ip address has a range of ports.
isV4Address
public boolean isV4Address()
-
- Returns:
- true if this ip address is IPv4 address.
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
valueOf
public static OpssIPAddress valueOf(java.lang.String str)
throws java.lang.IllegalArgumentException
-
- Throws:
java.lang.IllegalArgumentException
toString
public java.lang.String toString()
-
- Specified by:
toString
in class DataType
getComponentType
public ExpressionComponent.Type getComponentType()
- Description copied from interface:
ExpressionComponent
- Returns type of the component.
-
- Returns:
isValid
public boolean isValid()
validateIPV4
public static void validateIPV4(java.lang.String ipaddStr)
validateIPV6
public static void validateIPV6(java.lang.String ipaddStr)
Skip navigation links
Copyright © 2011,2012, Oracle and/or its affiliates. All rights reserved.