Class PresenceRouter

  • All Implemented Interfaces:

    public class PresenceRouter
    extends BasicModule

    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.

    Iain Shigeoka
    • Constructor Detail

      • PresenceRouter

        public PresenceRouter()
        Constructs a presence router.
    • Method Detail

      • route

        public void route​(org.xmpp.packet.Presence packet)
        Routes presence packets.
        packet - the packet to route.
        NullPointerException - if the packet is null.
      • 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 interface Module
        initialize in class BasicModule
        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.
        recipient - address of the entity that failed to receive the packet.
        packet - Presence packet that failed to be sent to the recipient.