org.mbari.siam.distributed
Class PacketFilter

java.lang.Object
  extended by org.mbari.siam.distributed.PacketFilter
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
PacketSubsampler

public abstract class PacketFilter
extends java.lang.Object
implements java.io.Serializable

Specifies filtering criteria for specified packet types.

See Also:
Serialized Form

Field Summary
protected static org.apache.log4j.Logger _log4j
          Log4j logger
 
Constructor Summary
PacketFilter(int filteredTypeFlags)
          Create PacketFilter, specify packet types to filter.
 
Method Summary
protected  boolean filteredType(DevicePacket packet)
          Return true if specified packet is type to be filtered.
abstract  boolean pass(DevicePacket packet)
          If filter is not applicable to specified packet's type, or specified packet passes filter criteria, return true; else return false.
abstract  void reset()
          Reset filter in preparation for starting on an input data set.
 java.lang.String toString()
          Return string representation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

_log4j

protected static org.apache.log4j.Logger _log4j
Log4j logger

Constructor Detail

PacketFilter

public PacketFilter(int filteredTypeFlags)
Create PacketFilter, specify packet types to filter.

Method Detail

pass

public abstract boolean pass(DevicePacket packet)
If filter is not applicable to specified packet's type, or specified packet passes filter criteria, return true; else return false.


reset

public abstract void reset()
Reset filter in preparation for starting on an input data set.


filteredType

protected boolean filteredType(DevicePacket packet)
Return true if specified packet is type to be filtered.


toString

public java.lang.String toString()
Return string representation

Overrides:
toString in class java.lang.Object


Copyright © 2003 MBARI.

The Monterey Bay Aquarium Research Institute (MBARI) provides this documentation and code "as is", with no warranty, express or implied, of its quality or consistency. It is provided without support and without obligation on the part of MBARI to assist in its use, correction, modification, or enhancement.