Class OfflinePacketDeliverer

  • All Implemented Interfaces:
    PacketDeliverer

    public class OfflinePacketDeliverer
    extends Object
    implements PacketDeliverer
    Fallback method used by NIOConnection when a connection fails to send a Packet (likely because it was closed). Message packets will be stored offline for later retrieval. IQ and Presence packets are dropped.

    Author:
    Tom Evans
    • Constructor Detail

      • OfflinePacketDeliverer

        public OfflinePacketDeliverer()
    • Method Detail

      • deliver

        public void deliver​(org.xmpp.packet.Packet packet)
                     throws UnauthorizedException,
                            PacketException
        Description copied from interface: PacketDeliverer
        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.
        Specified by:
        deliver in interface PacketDeliverer
        Parameters:
        packet - the packet to route
        Throws:
        UnauthorizedException - if the user is not authorised
        PacketException - if the packet is null or the packet could not be routed.