|
Openfire 3.6.3 Javadoc | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jivesoftware.openfire.container.BasicModule org.jivesoftware.openfire.handler.IQHandler
public abstract class IQHandler
Base class whose main responsibility is to handle IQ packets. Subclasses may only need to specify the IQHandlerInfo (i.e. name and namespace of the packets to handle) and actually handle the IQ packet. Simplifies creation of simple TYPE_IQ message handlers.
Field Summary | |
---|---|
protected PacketDeliverer |
deliverer
|
protected SessionManager |
sessionManager
|
Constructor Summary | |
---|---|
IQHandler(String moduleName)
Create a basic module with the given name. |
Method Summary | |
---|---|
abstract IQHandlerInfo |
getInfo()
Returns the handler information to help generically handle IQ packets. |
abstract IQ |
handleIQ(IQ packet)
Handles the received IQ packet. |
void |
initialize(XMPPServer server)
Initializes the basic module. |
void |
process(Packet packet)
Process an XMPP packet. |
Methods inherited from class org.jivesoftware.openfire.container.BasicModule |
---|
destroy, getName, start, stop |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected PacketDeliverer deliverer
protected SessionManager sessionManager
Constructor Detail |
---|
public IQHandler(String moduleName)
moduleName
- The name for the module or null to use the defaultMethod Detail |
---|
public void process(Packet packet) throws PacketException
ChannelHandler
process
in interface ChannelHandler
packet
- a packet to process.
PacketException
- thrown if the packet is malformed (results in the sender's
session being shutdown).public abstract IQ handleIQ(IQ packet) throws UnauthorizedException
packet
- the IQ packet to handle.
UnauthorizedException
- if the user that sent the packet is not
authorized to request the given operation.public abstract IQHandlerInfo getInfo()
public void initialize(XMPPServer server)
BasicModule
Initializes the basic module.
Inheriting classes that choose to override this method MUST call this initialize() method before accessing BasicModule resources.
initialize
in interface Module
initialize
in class BasicModule
server
- the server hosting this module.
|
Openfire 3.6.3 Javadoc | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |