com.ccg.net.tcp
Class MaskAndMatch

java.lang.Object
  extended by com.ccg.net.tcp.MaskAndMatch
All Implemented Interfaces:
InetAddressFilter

 class MaskAndMatch
extends Object
implements InetAddressFilter


Constructor Summary
MaskAndMatch(InetAddress match, InetAddress mask)
           
 
Method Summary
 boolean accept(InetAddress ip)
          Indicates whether the IP address be accepted or rejected.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MaskAndMatch

MaskAndMatch(InetAddress match,
             InetAddress mask)
Method Detail

accept

public boolean accept(InetAddress ip)
Description copied from interface: InetAddressFilter
Indicates whether the IP address be accepted or rejected.

Specified by:
accept in interface InetAddressFilter
Parameters:
ip - The IP address to be checked, it should never be null.
Returns:
true if the address passed should be accepted (passes the filter), or false if it should be rejected.
See Also:
InetAddressFilters


Copyright 1998-1998-2006 null. All Rights Reserved.