- All Implemented Interfaces:
public class MessageRouter extends BasicModule
Route message packets throughout the server.
Routing is based on the recipient and sender addresses. The typical packet will often be routed twice, once from the sender to some internal server component for handling or processing, and then back to the router to be delivered to it's final destination.
- Iain Shigeoka
Constructors Constructor Description
MessageRouter()Constructs a message router.
All Methods Instance Methods Concrete Methods Modifier and Type Method Description
initialize(XMPPServer server)Initializes the basic module.
route(org.xmpp.packet.Message packet)Performs the actual packet routing.
routingFailed(org.xmpp.packet.JID recipient, org.xmpp.packet.Packet packet)Notification message indicating that a packet has failed to be routed to the recipient.
Methods inherited from class org.jivesoftware.openfire.container.BasicModule
destroy, getName, start, stop
public void route(org.xmpp.packet.Message packet)
Performs the actual packet routing.
You routing is considered 'quick' and implementations may not take excessive amounts of time to complete the routing. If routing will take a long amount of time, the actual routing should be done in another thread so this method returns quickly.
Be careful to enforce concurrency DbC of concurrent by synchronizing any accesses to class resources.
packet- The packet to route
NullPointerException- If the packet is null
public void initialize(XMPPServer server)Description copied from class:
Initializes the basic module.
Inheriting classes that choose to override this method MUST call this initialize() method before accessing BasicModule resources.
public void routingFailed(org.xmpp.packet.JID recipient, org.xmpp.packet.Packet packet)Notification message indicating that a packet has failed to be routed to the recipient.
recipient- address of the entity that failed to receive the packet.
packet- Message packet that failed to be sent to the recipient.