Class AmqpProtocolDiscriminator

java.lang.Object
org.apache.activemq.transport.amqp.AmqpProtocolDiscriminator
All Implemented Interfaces:
AmqpProtocolConverter

public class AmqpProtocolDiscriminator extends Object implements AmqpProtocolConverter
Used to assign the best implementation of a AmqpProtocolConverter to the AmqpTransport based on the AmqpHeader that the client sends us.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    long
    Perform any keep alive processing for the connection such as sending empty frames or closing connections due to remote end being inactive for to long.
    void
    onActiveMQCommand(org.apache.activemq.command.Command command)
    Incoming Command object from ActiveMQ.
    void
    onAMQPData(Object command)
    A new incoming data packet from the remote peer is handed off to the protocol converter for processing.
    void
    Called when the transport detects an exception that the converter needs to respond to.
    void
    On changes to the transport tracing options the Protocol Converter should update its internal state so that the proper AMQP data is logged.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Constructor Details

  • Method Details

    • onAMQPData

      public void onAMQPData(Object command) throws Exception
      Description copied from interface: AmqpProtocolConverter
      A new incoming data packet from the remote peer is handed off to the protocol converter for processing. The type can vary and be either an AmqpHeader at the handshake phase or a byte buffer containing the next incoming frame data from the remote.
      Specified by:
      onAMQPData in interface AmqpProtocolConverter
      Parameters:
      command - the next incoming data object from the remote peer.
      Throws:
      Exception - if an error occurs processing the incoming data packet.
    • onAMQPException

      public void onAMQPException(IOException error)
      Description copied from interface: AmqpProtocolConverter
      Called when the transport detects an exception that the converter needs to respond to.
      Specified by:
      onAMQPException in interface AmqpProtocolConverter
      Parameters:
      error - the error that triggered this call.
    • onActiveMQCommand

      public void onActiveMQCommand(org.apache.activemq.command.Command command) throws Exception
      Description copied from interface: AmqpProtocolConverter
      Incoming Command object from ActiveMQ.
      Specified by:
      onActiveMQCommand in interface AmqpProtocolConverter
      Parameters:
      command - the next incoming command from the broker.
      Throws:
      Exception - if an error occurs processing the command.
    • updateTracer

      public void updateTracer()
      Description copied from interface: AmqpProtocolConverter
      On changes to the transport tracing options the Protocol Converter should update its internal state so that the proper AMQP data is logged.
      Specified by:
      updateTracer in interface AmqpProtocolConverter
    • keepAlive

      public long keepAlive()
      Description copied from interface: AmqpProtocolConverter
      Perform any keep alive processing for the connection such as sending empty frames or closing connections due to remote end being inactive for to long.
      Specified by:
      keepAlive in interface AmqpProtocolConverter