Class AmqpConnection

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

public class AmqpConnection extends Object implements AmqpProtocolConverter
Implements the mechanics of managing a single remote peer connection.
  • Constructor Details

  • Method Details

    • getConnectionCapabilitiesOffered

      protected org.apache.qpid.proton.amqp.Symbol[] getConnectionCapabilitiesOffered()
      Load and return a []Symbol that contains the connection capabilities offered to new connections
      Returns:
      the capabilities that are offered to new clients on connect.
    • getConnetionProperties

      protected Map<org.apache.qpid.proton.amqp.Symbol,Object> getConnetionProperties()
      Load and return a Map<Symbol, Object> that contains the properties that this connection supplies to incoming connections.
      Returns:
      the properties that are offered to the incoming connection.
    • getFailedConnetionProperties

      protected Map<org.apache.qpid.proton.amqp.Symbol,Object> getFailedConnetionProperties()
      Load and return a Map<Symbol, Object> that contains the properties that this connection supplies to incoming connections when the open has failed and the remote should expect a close to follow.
      Returns:
      the properties that are offered to the incoming connection.
    • 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() throws IOException
      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
      Throws:
      IOException - if an error occurs on writing heart-beats to the wire.
    • getConfiguredReceiverCredit

      public int getConfiguredReceiverCredit()
      Returns:
      the amount of credit assigned to AMQP receiver links created from sender links on the remote peer.
    • getConfiguredTransformer

      public String getConfiguredTransformer()
      Returns:
      the transformer type that was configured for this AMQP transport.
    • getConnectionId

      public org.apache.activemq.command.ConnectionId getConnectionId()
      Returns:
      the ActiveMQ ConnectionId that identifies this AMQP Connection.
    • getClientId

      public String getClientId()
      Returns:
      the Client ID used to create the connection with ActiveMQ
    • getMaxFrameSize

      public long getMaxFrameSize()
      Returns:
      the configured max frame size allowed for incoming messages.
    • 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.
    • processConnectionOpen

      protected void processConnectionOpen(org.apache.qpid.proton.engine.Connection connection) throws Exception
      Throws:
      Exception
    • processConnectionClose

      protected void processConnectionClose(org.apache.qpid.proton.engine.Connection connection) throws Exception
      Throws:
      Exception
    • processSessionOpen

      protected void processSessionOpen(org.apache.qpid.proton.engine.Session protonSession) throws Exception
      Throws:
      Exception
    • processSessionClose

      protected void processSessionClose(org.apache.qpid.proton.engine.Session protonSession) throws Exception
      Throws:
      Exception
    • processLinkOpen

      protected void processLinkOpen(org.apache.qpid.proton.engine.Link link) throws Exception
      Throws:
      Exception
    • processLinkDetach

      protected void processLinkDetach(org.apache.qpid.proton.engine.Link link) throws Exception
      Throws:
      Exception
    • processLinkClose

      protected void processLinkClose(org.apache.qpid.proton.engine.Link link) throws Exception
      Throws:
      Exception
    • processLinkFlow

      protected void processLinkFlow(org.apache.qpid.proton.engine.Link link) throws Exception
      Throws:
      Exception
    • processDelivery

      protected void processDelivery(org.apache.qpid.proton.engine.Delivery delivery) throws Exception
      Throws:
      Exception
    • 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.