Class AmqpProtocolDiscriminator
java.lang.Object
org.apache.activemq.transport.amqp.AmqpProtocolDiscriminator
- All Implemented Interfaces:
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 -
Constructor Summary
ConstructorsConstructorDescriptionAmqpProtocolDiscriminator(AmqpTransport transport, BrokerService brokerService) -
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 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.voidOn changes to the transport tracing options the Protocol Converter should update its internal state so that the proper AMQP data is logged.
-
Field Details
-
DEFAULT_PREFETCH
public static final int DEFAULT_PREFETCH- See Also:
-
-
Constructor Details
-
AmqpProtocolDiscriminator
-
-
Method Details
-
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.
-
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.
-
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
public long 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
-