Package com.iplanet.dpro.session
Class DNOrIPAddressListTokenRestriction
- java.lang.Object
-
- com.iplanet.dpro.session.DNOrIPAddressListTokenRestriction
-
- All Implemented Interfaces:
TokenRestriction,Serializable
public class DNOrIPAddressListTokenRestriction extends Object implements TokenRestriction
DNOrIPAddressListTokenRestrictionimplementsTokenRestrictioninterface and handles the restriction of theDNorIPAddress- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description DNOrIPAddressListTokenRestriction()Default constructor for InternalSession deserialization.DNOrIPAddressListTokenRestriction(String dn, Set<String> hostNames, ServiceSchemaManager serviceSchemaManager)ConstructsDNOrIPAddressListTokenRestrictionobject based on theDNand list of host names to be restricted.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object other)Returns true ofothermeets these criteria.inthashCode()Returns a hash code for this object.booleanisSatisfied(Object context)Returns a true if the restriction matches the context for which it was set.StringtoString()This method returns the restriction as a string.
-
-
-
Constructor Detail
-
DNOrIPAddressListTokenRestriction
public DNOrIPAddressListTokenRestriction()
Default constructor for InternalSession deserialization.
-
DNOrIPAddressListTokenRestriction
public DNOrIPAddressListTokenRestriction(String dn, Set<String> hostNames, ServiceSchemaManager serviceSchemaManager) throws UnknownHostException
ConstructsDNOrIPAddressListTokenRestrictionobject based on theDNand list of host names to be restricted.- Parameters:
dn- theDNof the userhostNames- list of host names.serviceSchemaManager- the service's schema manager.- Throws:
UnknownHostException- if the host cannot be resolved.
-
-
Method Detail
-
toString
public String toString()
This method returns the restriction as a string.
-
hashCode
public int hashCode()
Returns a hash code for this object.- Specified by:
hashCodein interfaceTokenRestriction- Overrides:
hashCodein classObject- Returns:
- a hash code value for this object.
-
isSatisfied
public boolean isSatisfied(Object context) throws Exception
Returns a true if the restriction matches the context for which it was set.- Specified by:
isSatisfiedin interfaceTokenRestriction- Parameters:
context- The context from which the restriction needs to be checked. The context can be any from the following - the Single Sign on token of the Application against which the restriction is being compared - the IP Address/Host Name of the Application against which the restriction is being compared- Returns:
- true if the restriction is satisfied.
- Throws:
Exception- is thrown if the there was an error.
-
equals
public boolean equals(Object other)
Returns true ofothermeets these criteria.- it is not null
- it is an instance of
DNOrIPAddressListTokenRestriction - it has the same distinguished name as this object and
- it has the same set of IP addresses as this object.
- Specified by:
equalsin interfaceTokenRestriction- Overrides:
equalsin classObject- Parameters:
other- the object to be used for comparison.- Returns:
- true if
othermeets the above criteria.
-
-