org.androidpn.server.xmpp.handler
Class IQHandler

java.lang.Object
  extended by org.androidpn.server.xmpp.handler.IQHandler
Direct Known Subclasses:
IQAuthHandler, IQRegisterHandler, IQRosterHandler

public abstract class IQHandler
extends java.lang.Object

This is an abstract class to handle routed IQ packets.

Author:
Sehwan Noh (devnoh@gmail.com)

Constructor Summary
IQHandler()
          Constructor.
 
Method Summary
abstract  java.lang.String getNamespace()
          Returns the namespace of the handler.
abstract  org.xmpp.packet.IQ handleIQ(org.xmpp.packet.IQ packet)
          Handles the received IQ packet.
 void process(org.xmpp.packet.Packet packet)
          Processes the received IQ packet.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IQHandler

public IQHandler()
Constructor.

Method Detail

process

public void process(org.xmpp.packet.Packet packet)
Processes the received IQ packet.

Parameters:
packet - the packet

handleIQ

public abstract org.xmpp.packet.IQ handleIQ(org.xmpp.packet.IQ packet)
                                     throws UnauthorizedException
Handles the received IQ packet.

Parameters:
packet - the packet
Returns:
the response to send back
Throws:
UnauthorizedException - if the user is not authorized

getNamespace

public abstract java.lang.String getNamespace()
Returns the namespace of the handler.

Returns:
the namespace