org.jboss.security.xacml.sunxacml.attr
Class IPv4AddressAttribute

java.lang.Object
  extended by org.jboss.security.xacml.sunxacml.attr.AttributeValue
      extended by org.jboss.security.xacml.sunxacml.attr.IPAddressAttribute
          extended by org.jboss.security.xacml.sunxacml.attr.IPv4AddressAttribute
All Implemented Interfaces:
Evaluatable, Expression

public class IPv4AddressAttribute
extends IPAddressAttribute

Subclass of IPAddressAttribute that handles the specifics of IPv4. In general, you shouldn't need to interact with this class except to create an instance directly.

Since:
2.0
Author:
Seth Proctor

Field Summary
 
Fields inherited from class org.jboss.security.xacml.sunxacml.attr.IPAddressAttribute
identifier
 
Constructor Summary
IPv4AddressAttribute(InetAddress address)
          Creates the new IPv4AddressAttribute with just the required address component.
IPv4AddressAttribute(InetAddress address, InetAddress mask)
          Creates the new IPv4AddressAttribute with the optional address mask.
IPv4AddressAttribute(InetAddress address, InetAddress mask, PortRange range)
          Creates the new IPv4AddressAttribute with all the optional components.
IPv4AddressAttribute(InetAddress address, PortRange range)
          Creates the new IPv4AddressAttribute with the optional port range.
 
Method Summary
 String encode()
          Encodes the value in a form suitable for including in XML data like a request or an obligation.
protected static IPAddressAttribute getV4Instance(String value)
          Returns a new IPv4AddressAttribute that represents the name indicated by the String provided.
 
Methods inherited from class org.jboss.security.xacml.sunxacml.attr.IPAddressAttribute
equals, getAddress, getInstance, getInstance, getMask, getRange, hashCode, toString
 
Methods inherited from class org.jboss.security.xacml.sunxacml.attr.AttributeValue
encode, encode, encodeWithTags, evaluate, evaluatesToBag, getChildren, getType, isBag, returnsBag
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

IPv4AddressAttribute

public IPv4AddressAttribute(InetAddress address)
Creates the new IPv4AddressAttribute with just the required address component.

Parameters:
address - a non-null InetAddress

IPv4AddressAttribute

public IPv4AddressAttribute(InetAddress address,
                            InetAddress mask)
Creates the new IPv4AddressAttribute with the optional address mask.

Parameters:
address - a non-null InetAddress
mask - an InetAddress or null if there is no mask

IPv4AddressAttribute

public IPv4AddressAttribute(InetAddress address,
                            PortRange range)
Creates the new IPv4AddressAttribute with the optional port range.

Parameters:
address - a non-null InetAddress
portRange - a non-null PortRange

IPv4AddressAttribute

public IPv4AddressAttribute(InetAddress address,
                            InetAddress mask,
                            PortRange range)
Creates the new IPv4AddressAttribute with all the optional components.

Parameters:
address - a non-null InetAddress
mask - an InetAddress or null if there is no mask
portRange - a non-null PortRange
Method Detail

getV4Instance

protected static IPAddressAttribute getV4Instance(String value)
                                           throws UnknownHostException
Returns a new IPv4AddressAttribute that represents the name indicated by the String provided. This is a protected method because you should never call it directly. Instead, you should call getInstance on IPAddressAttribute which provides versions that take both a String and a Node and will determine the protocol version correctly.

Parameters:
value - a string representing the address
Returns:
a new IPAddressAttribute
Throws:
UnknownHostException - if the address components is invalid
ParsingException - if any of the address components is invalid

encode

public String encode()
Description copied from class: AttributeValue
Encodes the value in a form suitable for including in XML data like a request or an obligation. This must return a value that could in turn be used by the factory to create a new instance with the same value.

Specified by:
encode in class AttributeValue
Returns:
a String form of the value


Copyright © 2009 JBoss, a division of Red Hat, Inc.. All Rights Reserved.