Class SessionPacketRouter

  • All Implemented Interfaces:
    PacketRouter
    Direct Known Subclasses:
    StreamManagementPacketRouter

    public class SessionPacketRouter
    extends Object
    implements PacketRouter
    Handles the routing of packets to a particular session. It will invoke all of the appropriate interceptors, before and after having the server process the message.
    Author:
    Alexander Wenckus
    • Constructor Detail

    • Method Detail

      • setSkipJIDValidation

        public void setSkipJIDValidation​(boolean skipJIDValidation)
        Sets if TO addresses of Elements being routed should be validated. Doing stringprep operations is very expensive and sometimes we already validated the TO address so there is no need to validate again the address. For instance, when using Connection Managers the validation is done by the Connection Manager so we can just trust the TO address. On the other hand, the FROM address is set by the server so there is no need to validate it.

        By default validation is enabled.

        Parameters:
        skipJIDValidation - true if validation of TO address is enabled.
      • route

        public void route​(org.xmpp.packet.Packet packet)
        Description copied from interface: PacketRouter
        Routes the given packet based on its type.
        Specified by:
        route in interface PacketRouter
        Parameters:
        packet - The packet to route.
      • route

        public void route​(org.xmpp.packet.IQ packet)
        Description copied from interface: PacketRouter
        Routes the given IQ packet.
        Specified by:
        route in interface PacketRouter
        Parameters:
        packet - The packet to route.
      • route

        public void route​(org.xmpp.packet.Message packet)
        Description copied from interface: PacketRouter
        Routes the given Message packet.
        Specified by:
        route in interface PacketRouter
        Parameters:
        packet - The packet to route.
      • route

        public void route​(org.xmpp.packet.Presence packet)
        Description copied from interface: PacketRouter
        Routes the given Presence packet.
        Specified by:
        route in interface PacketRouter
        Parameters:
        packet - The packet to route.