org.androidpn.server.xmpp.router
Class IQRouter

java.lang.Object
  extended by org.androidpn.server.xmpp.router.IQRouter

public class IQRouter
extends java.lang.Object

This class is to route IQ packets to their corresponding handler.

Author:
Sehwan Noh (devnoh@gmail.com)

Constructor Summary
IQRouter()
          Constucts a packet router registering new IQ handlers.
 
Method Summary
 void addHandler(IQHandler handler)
          Adds a new IQHandler to the list of registered handler.
 void removeHandler(IQHandler handler)
          Removes an IQHandler from the list of registered handler.
 void route(org.xmpp.packet.IQ packet)
          Routes the IQ packet based on its namespace.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IQRouter

public IQRouter()
Constucts a packet router registering new IQ handlers.

Method Detail

route

public void route(org.xmpp.packet.IQ packet)
Routes the IQ packet based on its namespace.

Parameters:
packet - the packet to route

addHandler

public void addHandler(IQHandler handler)
Adds a new IQHandler to the list of registered handler.

Parameters:
handler - the IQHandler

removeHandler

public void removeHandler(IQHandler handler)
Removes an IQHandler from the list of registered handler.

Parameters:
handler - the IQHandler