Package org.jivesoftware.openfire.spi
Class PacketDelivererImpl
java.lang.Object
org.jivesoftware.openfire.container.BasicModule
org.jivesoftware.openfire.spi.PacketDelivererImpl
- All Implemented Interfaces:
Module
,PacketDeliverer
In-memory implementation of the packet deliverer service
- Author:
- Iain Shigeoka
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected SocketPacketWriteHandler
The handler that does the actual delivery (could be a channel instead) -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class org.jivesoftware.openfire.container.BasicModule
destroy, getName, initialize
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.jivesoftware.openfire.PacketDeliverer
deliverAsync
-
Field Details
-
deliverHandler
The handler that does the actual delivery (could be a channel instead)
-
-
Constructor Details
-
PacketDelivererImpl
public PacketDelivererImpl()
-
-
Method Details
-
deliver
public void deliver(@Nonnull org.xmpp.packet.Packet packet) throws UnauthorizedException, PacketException Description copied from interface:PacketDeliverer
Delivers the given stanza based on its recipient and sender. Invocation of this method blocks until the deliverer finishes processing the stanza. The deliverer defers actual routing decisions to other classes.- Specified by:
deliver
in interfacePacketDeliverer
- Parameters:
packet
- the stanza to route- Throws:
UnauthorizedException
- if the user is not authorisedPacketException
- if the packet is null or the packet could not be routed.
-
start
Description copied from class:BasicModule
Starts the basic module.
Inheriting classes that choose to override this method MUST call this start() method before accessing BasicModule resources.
- Specified by:
start
in interfaceModule
- Overrides:
start
in classBasicModule
- Throws:
IllegalStateException
- If start is called before initialize successfully returns
-
stop
public void stop()Description copied from class:BasicModule
Stops the basic module.
Inheriting classes that choose to override this method MUST call this stop() method before accessing BasicModule resources.
- Specified by:
stop
in interfaceModule
- Overrides:
stop
in classBasicModule
-