JSCAPE MFT Server

com.jscape.inet.mft.security
Class IPAccessRule

java.lang.Object
  extended by com.jscape.inet.mft.security.IPAccessRule

public class IPAccessRule
extends java.lang.Object

IP access rule. Contains information about allowed or denied IP's.

Author:
Alex

Constructor Summary
IPAccessRule()
          Creates a new rule instance.
IPAccessRule(IPAccessRule that)
           
IPAccessRule(com.jscape.inet.mft.MaskIPAccessVerifier.IPMask base)
          Creates a new rule instance.
IPAccessRule(java.lang.String mask, java.lang.String reason, boolean allowed)
          Creates a new rule instance.
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 java.lang.String getAddressMask()
          Returns IP address mask.
 java.lang.String getReason()
          
 int hashCode()
           
 boolean isAllowed()
          
 boolean matches(java.net.InetAddress address)
          Checks if specified address matches to the current rule.
 void setAddressMask(java.lang.String mask)
          Sets IP address mask.
 void setAllowed(boolean value)
          Sets rule allowed flag.
 void setReason(java.lang.String value)
          Sets rule reason.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

IPAccessRule

public IPAccessRule(com.jscape.inet.mft.MaskIPAccessVerifier.IPMask base)
Creates a new rule instance.

Parameters:
base - the base mask

IPAccessRule

public IPAccessRule(java.lang.String mask,
                    java.lang.String reason,
                    boolean allowed)
Creates a new rule instance.

Parameters:
mask - the IP address mask
reason - the rule reason
allowed - if true IP will be marked as allowed

IPAccessRule

public IPAccessRule()
Creates a new rule instance.


IPAccessRule

public IPAccessRule(IPAccessRule that)
Method Detail

getAddressMask

public java.lang.String getAddressMask()
Returns IP address mask.

Returns:
IP address mask

setAddressMask

public void setAddressMask(java.lang.String mask)
Sets IP address mask.

Parameters:
mask - the IP address mask

getReason

public java.lang.String getReason()


setReason

public void setReason(java.lang.String value)
Sets rule reason.

Parameters:
value - the rule reason

isAllowed

public boolean isAllowed()


setAllowed

public void setAllowed(boolean value)
Sets rule allowed flag.

Parameters:
value - if true the current rule will be marked as allowed.

matches

public boolean matches(java.net.InetAddress address)
Checks if specified address matches to the current rule.

Parameters:
address - the address to check
Returns:
true if the specified address matches the current rule; false otherwise

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

JSCAPE MFT Server

Copyright © JSCAPE LLC. 1999-2013. All Rights Reserved