Smack

org.jivesoftware.smack.filter
Class MessageTypeFilter

java.lang.Object
  extended by org.jivesoftware.smack.filter.MessageTypeFilter
All Implemented Interfaces:
PacketFilter

public class MessageTypeFilter
extends java.lang.Object
implements PacketFilter

Filters for packets of a specific type of Message (e.g. CHAT).

Author:
Ward Harold
See Also:
Message.Type

Constructor Summary
MessageTypeFilter(Message.Type type)
          Creates a new message type filter using the specified message type.
 
Method Summary
 boolean accept(Packet packet)
          Tests whether or not the specified packet should pass the filter.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MessageTypeFilter

public MessageTypeFilter(Message.Type type)
Creates a new message type filter using the specified message type.

Parameters:
type - the message type.
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.

Smack

Copyright © 2003-2007 Jive Software.