Smack

org.jivesoftware.smack
Class Connection.ListenerWrapper

java.lang.Object
  extended by org.jivesoftware.smack.Connection.ListenerWrapper
Enclosing class:
Connection

protected static class Connection.ListenerWrapper
extends java.lang.Object

A wrapper class to associate a packet filter with a listener.


Constructor Summary
Connection.ListenerWrapper(PacketListener packetListener, PacketFilter packetFilter)
          Create a class which associates a packet filter with a listener.
 
Method Summary
 void notifyListener(Packet packet)
          Notify and process the packet listener if the filter matches the packet.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Connection.ListenerWrapper

public Connection.ListenerWrapper(PacketListener packetListener,
                                  PacketFilter packetFilter)
Create a class which associates a packet filter with a listener.

Parameters:
packetListener - the packet listener.
packetFilter - the associated filter or null if it listen for all packets.
Method Detail

notifyListener

public void notifyListener(Packet packet)
Notify and process the packet listener if the filter matches the packet.

Parameters:
packet - the packet which was sent or received.

Smack

Copyright © 2003-2007 Jive Software.