org.jivesoftware.smack.filter
Class ToContainsFilter
java.lang.Object
org.jivesoftware.smack.filter.ToContainsFilter
- All Implemented Interfaces:
- PacketFilter
public class ToContainsFilter
- extends Object
- implements PacketFilter
Filters for packets where the "to" field contains a specified value. For example,
the filter could be used to listen for all packets sent to a group chat nickname.
- Author:
- Matt Tucker
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 |
ToContainsFilter
public ToContainsFilter(String to)
- Creates a "to" contains filter using the "to" field part.
- Parameters:
to
- the to field value the packet must contain.
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.
Copyright © 2003 Jive Software.