com.ccg.net.tcp
Interface InetAddressFilter

All Known Implementing Classes:
MaskAndMatch

public interface InetAddressFilter

Definition of a InetAddressFilter, which is used to accept/reject IP addresses.

This interface defines the method which all IP address filters must implement. Basically, they need to be able to determine whether a particular IP address is acceptable or not.

Typically, you will use the various static methods found in the InetAddressFilters class which provides implementations for most of the common types of filters.

Since:
1.0
Version:
$Revision: 1.1 $
Author:
$Author: pkb $
See Also:
InetAddressFilters

Method Summary
 boolean accept(InetAddress ip)
          Indicates whether the IP address be accepted or rejected.
 

Method Detail

accept

boolean accept(InetAddress ip)
Indicates whether the IP address be accepted or rejected.

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.
Throws:
NullPointerException - If passed null (which is not permitted). However, it is not required for this method to throw the exception.
Since:
1.0
See Also:
InetAddressFilters


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