Interface PacketDeliverer

All Known Implementing Classes:
MultiplexerPacketDeliverer, OfflinePacketDeliverer, PacketDelivererImpl

public interface PacketDeliverer
Delivers packets to locally connected streams. This is the opposite of the packet transporter.
Author:
Iain Shigeoka
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    deliver(org.xmpp.packet.Packet stanza)
    Delivers the given stanza based on its recipient and sender.
    deliverAsync(org.xmpp.packet.Packet stanza)
    /** Delivers the given stanza based on its recipient and sender.
  • Method Details

    • deliver

      void deliver(@Nonnull org.xmpp.packet.Packet stanza) throws UnauthorizedException, PacketException
      Delivers the given stanza based on its recipient and sender. Invocation of this method blocks until the deliverer finishes processing the stanza. The deliverer defers actual routing decisions to other classes.
      Parameters:
      stanza - the stanza to route
      Throws:
      PacketException - if the packet is null or the packet could not be routed.
      UnauthorizedException - if the user is not authorised
    • deliverAsync

      default CompletableFuture<Void> deliverAsync(@Nonnull org.xmpp.packet.Packet stanza)
      /** Delivers the given stanza based on its recipient and sender. Invocation of this method blocks until the deliverer finishes processing the stanza. The deliverer defers actual routing decisions to other classes.
      Parameters:
      stanza - the stanza to route
      Returns:
      A future from which any exception thrown while processing the stanza can be obtained.