org.jivesoftware.smack.packet
Class MockPacketFilter

java.lang.Object
  extended by org.jivesoftware.smack.packet.MockPacketFilter
All Implemented Interfaces:
PacketFilter

public class MockPacketFilter
extends java.lang.Object
implements PacketFilter

A mock implementation of the PacketFilter class. Pass in the value you want the accept(..) method to return.


Constructor Summary
MockPacketFilter(boolean acceptValue)
           
 
Method Summary
 boolean accept(Packet packet)
          Tests whether or not the specified packet should pass the filter.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MockPacketFilter

public MockPacketFilter(boolean acceptValue)
Method Detail

accept

public boolean accept(Packet packet)
Description copied from interface: PacketFilter
Tests whether or not the specified packet should pass the filter.

Specified by:
accept in interface PacketFilter
Parameters:
packet - the packet to test.
Returns:
true if and only if packet passes the filter.