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
public class PacketDelivererImpl extends BasicModule implements PacketDeliverer
In-memory implementation of the packet deliverer service- Author:
- Iain Shigeoka
-
-
Field Summary
Fields Modifier and Type Field Description protected SocketPacketWriteHandlerdeliverHandlerThe handler that does the actual delivery (could be a channel instead)
-
Constructor Summary
Constructors Constructor Description PacketDelivererImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddeliver(org.xmpp.packet.Packet packet)Delivers the given packet based on packet recipient and sender.voidstart()Starts the basic module.voidstop()Stops the basic module.-
Methods inherited from class org.jivesoftware.openfire.container.BasicModule
destroy, getName, initialize
-
-
-
-
Field Detail
-
deliverHandler
protected SocketPacketWriteHandler deliverHandler
The handler that does the actual delivery (could be a channel instead)
-
-
Method Detail
-
deliver
public void deliver(org.xmpp.packet.Packet packet) throws UnauthorizedException, PacketExceptionDescription copied from interface:PacketDelivererDelivers the given packet based on packet recipient and sender. The deliverer defers actual routing decisions to other classes.Warning
Be careful to enforce concurrency DbC of concurrent by synchronizing any accesses to class resources.- Specified by:
deliverin interfacePacketDeliverer- Parameters:
packet- the packet to route- Throws:
UnauthorizedException- if the user is not authorisedPacketException- if the packet is null or the packet could not be routed.
-
start
public void start() throws IllegalStateExceptionDescription copied from class:BasicModuleStarts the basic module.
Inheriting classes that choose to override this method MUST call this start() method before accessing BasicModule resources.
- Specified by:
startin interfaceModule- Overrides:
startin classBasicModule- Throws:
IllegalStateException- If start is called before initialize successfully returns
-
stop
public void stop()
Description copied from class:BasicModuleStops the basic module.
Inheriting classes that choose to override this method MUST call this stop() method before accessing BasicModule resources.
- Specified by:
stopin interfaceModule- Overrides:
stopin classBasicModule
-
-