Package org.jivesoftware.openfire.spi
Class PacketTransporterImpl
java.lang.Object
org.jivesoftware.openfire.container.BasicModule
org.jivesoftware.openfire.spi.PacketTransporterImpl
- All Implemented Interfaces:
Module
In-memory implementation of the packet transporter service.
- Author:
- Iain Shigeoka
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddeliver(org.xmpp.packet.Packet packet) Delivers the given packet based on packet recipient and sender.Obtain the transport handler that this transporter uses for delivering transport packets.voidinitialize(XMPPServer server) Initializes the basic module.Methods inherited from class org.jivesoftware.openfire.container.BasicModule
destroy, getName, start, stop
-
Constructor Details
-
PacketTransporterImpl
public PacketTransporterImpl()This is a singleton, you can't create one. Be very careful not to do anything that refers back to the factory's create method. Do initialization in the init() method if at all possible.
-
-
Method Details
-
getTransportHandler
Obtain the transport handler that this transporter uses for delivering transport packets.- Returns:
- The transport handler instance used by this transporter
-
deliver
Delivers 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.- Parameters:
packet- The packet to route- Throws:
NullPointerException- If the packet is null or the packet could not be routedUnauthorizedException- if the user is not authorisedPacketException
-
initialize
Description copied from class:BasicModuleInitializes the basic module.
Inheriting classes that choose to override this method MUST call this initialize() method before accessing BasicModule resources.
- Specified by:
initializein interfaceModule- Overrides:
initializein classBasicModule- Parameters:
server- the server hosting this module.
-