Interface AmqpProtocolConverter
- All Known Implementing Classes:
AmqpConnection,AmqpProtocolDiscriminator
public interface AmqpProtocolConverter
Interface that defines the API for any AMQP protocol converter ised to
map AMQP mechanics to ActiveMQ and back.
-
Method Summary
Modifier and TypeMethodDescriptionlongPerform 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 data) 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.voidOn changes to the transport tracing options the Protocol Converter should update its internal state so that the proper AMQP data is logged.
-
Method Details
-
onAMQPData
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.- Parameters:
data- the next incoming data object from the remote peer.- Throws:
Exception- if an error occurs processing the incoming data packet.
-
onAMQPException
Called when the transport detects an exception that the converter needs to respond to.- Parameters:
error- the error that triggered this call.
-
onActiveMQCommand
Incoming Command object from ActiveMQ.- Parameters:
command- the next incoming command from the broker.- Throws:
Exception- if an error occurs processing the command.
-
updateTracer
void updateTracer()On changes to the transport tracing options the Protocol Converter should update its internal state so that the proper AMQP data is logged. -
keepAlive
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.- Throws:
IOException- if an error occurs on writing heart-beats to the wire.
-