Class TransportHandler

java.lang.Object
org.jivesoftware.openfire.container.BasicModule
org.jivesoftware.openfire.transport.TransportHandler
All Implemented Interfaces:
ChannelHandler<org.xmpp.packet.Packet>, Module

public class TransportHandler extends BasicModule implements ChannelHandler<org.xmpp.packet.Packet>
Routes packets to the appropriate transport gateway or drops the packet.
Author:
Iain Shigeoka
  • Constructor Details

    • TransportHandler

      public TransportHandler()
  • Method Details

    • addTransport

      public void addTransport(Channel<org.xmpp.packet.Packet> transport)
    • process

      public void process(org.xmpp.packet.Packet packet) throws UnauthorizedException, PacketException
      Description copied from interface: ChannelHandler
      Process an XMPP packet.
      Specified by:
      process in interface ChannelHandler<org.xmpp.packet.Packet>
      Parameters:
      packet - a packet to process.
      Throws:
      UnauthorizedException - if not allowed to process the packet.
      PacketException - thrown if the packet is malformed (results in the sender's session being shutdown).
    • 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
      Overrides:
      initialize in class BasicModule
      Parameters:
      server - the server hosting this module.