Class AmqpConnection
java.lang.Object
org.apache.activemq.transport.amqp.protocol.AmqpConnection
- All Implemented Interfaces:
AmqpProtocolConverter
Implements the mechanics of managing a single remote peer connection.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintprotected org.apache.qpid.proton.amqp.Symbol[]Load and return a[]Symbolthat contains the connection capabilities offered to new connectionsorg.apache.activemq.command.ConnectionIdLoad and return aMap<Symbol, Object>that contains the properties that this connection supplies to incoming connections.Load and return aMap<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.longlongPerform any keep alive processing for the connection such as sending empty frames or closing connections due to remote end being inactive for to long.voidonActiveMQCommand(org.apache.activemq.command.Command command) Incoming Command object from ActiveMQ.voidonAMQPData(Object command) A new incoming data packet from the remote peer is handed off to the protocol converter for processing.voidonAMQPException(IOException error) Called when the transport detects an exception that the converter needs to respond to.protected voidprocessConnectionClose(org.apache.qpid.proton.engine.Connection connection) protected voidprocessConnectionOpen(org.apache.qpid.proton.engine.Connection connection) protected voidprocessDelivery(org.apache.qpid.proton.engine.Delivery delivery) protected voidprocessLinkClose(org.apache.qpid.proton.engine.Link link) protected voidprocessLinkDetach(org.apache.qpid.proton.engine.Link link) protected voidprocessLinkFlow(org.apache.qpid.proton.engine.Link link) protected voidprocessLinkOpen(org.apache.qpid.proton.engine.Link link) protected voidprocessSessionClose(org.apache.qpid.proton.engine.Session protonSession) protected voidprocessSessionOpen(org.apache.qpid.proton.engine.Session protonSession) voidOn changes to the transport tracing options the Protocol Converter should update its internal state so that the proper AMQP data is logged.
-
Constructor Details
-
AmqpConnection
-
-
Method Details
-
getConnectionCapabilitiesOffered
protected org.apache.qpid.proton.amqp.Symbol[] getConnectionCapabilitiesOffered()Load and return a[]Symbolthat contains the connection capabilities offered to new connections- Returns:
- the capabilities that are offered to new clients on connect.
-
getConnetionProperties
Load and return aMap<Symbol, Object>that contains the properties that this connection supplies to incoming connections.- Returns:
- the properties that are offered to the incoming connection.
-
getFailedConnetionProperties
Load and return aMap<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:AmqpProtocolConverterOn changes to the transport tracing options the Protocol Converter should update its internal state so that the proper AMQP data is logged.- Specified by:
updateTracerin interfaceAmqpProtocolConverter
-
keepAlive
Description copied from interface:AmqpProtocolConverterPerform 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:
keepAlivein interfaceAmqpProtocolConverter- 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
- 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
- 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
Description copied from interface:AmqpProtocolConverterA 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:
onAMQPDatain interfaceAmqpProtocolConverter- 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
- Throws:
Exception
-
processLinkDetach
- Throws:
Exception
-
processLinkClose
- Throws:
Exception
-
processLinkFlow
- Throws:
Exception
-
processDelivery
- Throws:
Exception
-
onAMQPException
Description copied from interface:AmqpProtocolConverterCalled when the transport detects an exception that the converter needs to respond to.- Specified by:
onAMQPExceptionin interfaceAmqpProtocolConverter- Parameters:
error- the error that triggered this call.
-
onActiveMQCommand
Description copied from interface:AmqpProtocolConverterIncoming Command object from ActiveMQ.- Specified by:
onActiveMQCommandin interfaceAmqpProtocolConverter- Parameters:
command- the next incoming command from the broker.- Throws:
Exception- if an error occurs processing the command.
-