Class AmqpTransportFilter
- java.lang.Object
-
- org.apache.activemq.transport.TransportFilter
-
- org.apache.activemq.transport.amqp.AmqpTransportFilter
-
- All Implemented Interfaces:
Service
,AmqpTransport
,Transport
,TransportListener
public class AmqpTransportFilter extends TransportFilter implements AmqpTransport
The AMQPTransportFilter normally sits on top of a TcpTransport that has been configured with the AmqpWireFormat and is used to convert AMQP commands to ActiveMQ commands. All of the conversion work is done by delegating to the AMQPProtocolConverter
-
-
Field Summary
Fields Modifier and Type Field Description static org.slf4j.Logger
TRACE_FRAMES
-
Fields inherited from class org.apache.activemq.transport.TransportFilter
next, transportListener
-
-
Constructor Summary
Constructors Constructor Description AmqpTransportFilter(Transport next, WireFormat wireFormat, BrokerService brokerService)
-
Method Summary
-
Methods inherited from class org.apache.activemq.transport.TransportFilter
asyncRequest, getNext, getReceiveCounter, getRemoteAddress, getTransportListener, isConnected, isDisposed, isFaultTolerant, isReconnectSupported, isUpdateURIsSupported, narrow, reconnect, request, request, setPeerCertificates, setTransportListener, stop, toString, transportInterupted, transportResumed, updateURIs
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.apache.activemq.transport.amqp.AmqpTransport
getRemoteAddress, stop
-
-
-
-
Constructor Detail
-
AmqpTransportFilter
public AmqpTransportFilter(Transport next, WireFormat wireFormat, BrokerService brokerService)
-
-
Method Detail
-
start
public void start() throws Exception
- Specified by:
start
in interfaceService
- Overrides:
start
in classTransportFilter
- Throws:
Exception
- See Also:
Service.start()
-
oneway
public void oneway(Object o) throws IOException
Description copied from interface:Transport
A one way asynchronous send- Specified by:
oneway
in interfaceTransport
- Overrides:
oneway
in classTransportFilter
- Throws:
IOException
-
onException
public void onException(IOException error)
Description copied from interface:TransportListener
An unrecoverable exception has occured on the transport- Specified by:
onException
in interfaceAmqpTransport
- Specified by:
onException
in interfaceTransportListener
- Overrides:
onException
in classTransportFilter
-
sendToActiveMQ
public void sendToActiveMQ(IOException error)
- Specified by:
sendToActiveMQ
in interfaceAmqpTransport
-
onCommand
public void onCommand(Object command)
Description copied from interface:TransportListener
called to process a command- Specified by:
onCommand
in interfaceTransportListener
- Overrides:
onCommand
in classTransportFilter
-
sendToActiveMQ
public void sendToActiveMQ(Command command)
- Specified by:
sendToActiveMQ
in interfaceAmqpTransport
-
sendToAmqp
public void sendToAmqp(Object command) throws IOException
- Specified by:
sendToAmqp
in interfaceAmqpTransport
- Throws:
IOException
-
keepAlive
public long keepAlive()
- Specified by:
keepAlive
in interfaceAmqpTransport
-
getPeerCertificates
public X509Certificate[] getPeerCertificates()
- Specified by:
getPeerCertificates
in interfaceAmqpTransport
- Specified by:
getPeerCertificates
in interfaceTransport
- Overrides:
getPeerCertificates
in classTransportFilter
- Returns:
- the Certificates provided by the peer, or null if not a secure channel.
-
isTrace
public boolean isTrace()
- Specified by:
isTrace
in interfaceAmqpTransport
-
setTrace
public void setTrace(boolean trace)
-
getWireFormat
public AmqpWireFormat getWireFormat()
Description copied from interface:Transport
Retrieves the WireFormat instance associated with this Transport instance.- Specified by:
getWireFormat
in interfaceAmqpTransport
- Specified by:
getWireFormat
in interfaceTransport
- Overrides:
getWireFormat
in classTransportFilter
- Returns:
- the WireFormat in use.
-
handleException
public void handleException(IOException e)
-
getTransformer
public String getTransformer()
- Specified by:
getTransformer
in interfaceAmqpTransport
-
setTransformer
public void setTransformer(String transformer)
-
getProtocolConverter
public AmqpProtocolConverter getProtocolConverter()
- Specified by:
getProtocolConverter
in interfaceAmqpTransport
-
setProtocolConverter
public void setProtocolConverter(AmqpProtocolConverter protocolConverter)
- Specified by:
setProtocolConverter
in interfaceAmqpTransport
-
setProducerCredit
public void setProducerCredit(int producerCredit)
-
getProducerCredit
public int getProducerCredit()
-
setInactivityMonitor
public void setInactivityMonitor(AmqpInactivityMonitor monitor)
- Specified by:
setInactivityMonitor
in interfaceAmqpTransport
-
getInactivityMonitor
public AmqpInactivityMonitor getInactivityMonitor()
- Specified by:
getInactivityMonitor
in interfaceAmqpTransport
-
isUseInactivityMonitor
public boolean isUseInactivityMonitor()
- Specified by:
isUseInactivityMonitor
in interfaceAmqpTransport
-
getConnectAttemptTimeout
public int getConnectAttemptTimeout()
-
setConnectAttemptTimeout
public void setConnectAttemptTimeout(int connectAttemptTimeout)
-
getMaxFrameSize
public long getMaxFrameSize()
-
setMaxFrameSize
public void setMaxFrameSize(long maxFrameSize)
-
-