Package org.jivesoftware.openfire.spi
Class PacketTransporterImpl
- java.lang.Object
-
- org.jivesoftware.openfire.container.BasicModule
-
- org.jivesoftware.openfire.spi.PacketTransporterImpl
-
- All Implemented Interfaces:
Module
public class PacketTransporterImpl extends BasicModule
In-memory implementation of the packet transporter service.- Author:
- Iain Shigeoka
-
-
Constructor Summary
Constructors Constructor Description PacketTransporterImpl()
This is a singleton, you can't create one.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
deliver(org.xmpp.packet.Packet packet)
Delivers the given packet based on packet recipient and sender.TransportHandler
getTransportHandler()
Obtain the transport handler that this transporter uses for delivering transport packets.void
initialize(XMPPServer server)
Initializes the basic module.-
Methods inherited from class org.jivesoftware.openfire.container.BasicModule
destroy, getName, start, stop
-
-
-
-
Method Detail
-
getTransportHandler
public TransportHandler getTransportHandler()
Obtain the transport handler that this transporter uses for delivering transport packets.- Returns:
- The transport handler instance used by this transporter
-
deliver
public void deliver(org.xmpp.packet.Packet packet) throws UnauthorizedException, PacketException
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
public void initialize(XMPPServer server)
Description copied from class:BasicModule
Initializes the basic module.
Inheriting classes that choose to override this method MUST call this initialize() method before accessing BasicModule resources.
- Specified by:
initialize
in interfaceModule
- Overrides:
initialize
in classBasicModule
- Parameters:
server
- the server hosting this module.
-
-