Package org.jivesoftware.openfire
Class PresenceRouter
java.lang.Object
org.jivesoftware.openfire.container.BasicModule
org.jivesoftware.openfire.PresenceRouter
- All Implemented Interfaces:
Module
Route presence 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.
- Author:
- Iain Shigeoka
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
initialize
(XMPPServer server) Initializes the basic module.void
route
(org.xmpp.packet.Presence packet) Routes presence packets.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.Methods inherited from class org.jivesoftware.openfire.container.BasicModule
destroy, getName, start, stop
-
Constructor Details
-
PresenceRouter
public PresenceRouter()Constructs a presence router.
-
-
Method Details
-
route
public void route(org.xmpp.packet.Presence packet) Routes presence packets.- Parameters:
packet
- the packet to route.- Throws:
NullPointerException
- if the packet is null.
-
initialize
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.
-
routingFailed
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.- Parameters:
recipient
- address of the entity that failed to receive the packet.packet
- Presence packet that failed to be sent to the recipient.
-