Class AmqpWSTransport
- java.lang.Object
-
- org.apache.activemq.util.ServiceSupport
-
- org.apache.activemq.transport.TransportSupport
-
- org.apache.activemq.transport.amqp.AmqpWSTransport
-
- All Implemented Interfaces:
org.apache.activemq.Service,AmqpFrameParser.AMQPFrameSink,Transport,WSTransport
public class AmqpWSTransport extends TransportSupport implements WSTransport, AmqpFrameParser.AMQPFrameSink
An AMQP based WebSocket transport implementation.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.activemq.transport.ws.WSTransport
WSTransport.WSTransportSink
-
-
Constructor Summary
Constructors Constructor Description AmqpWSTransport(URI location, org.apache.activemq.wireformat.WireFormat wireFormat)Create a new Transport instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voiddoStart()protected voiddoStop(ServiceStopper stopper)intgetMaxFrameSize()X509Certificate[]getPeerCertificates()intgetReceiveCounter()StringgetRemoteAddress()StringgetSubProtocol()org.apache.activemq.wireformat.WireFormatgetWireFormat()voidoneway(Object command)voidonFrame(Object frame)voidonWebSocketBinary(ByteBuffer data)voidonWebSocketClosed()voidonWebSocketText(String data)voidsetPeerCertificates(X509Certificate[] certificates)voidsetTransportSink(WSTransport.WSTransportSink outputSink)-
Methods inherited from class org.apache.activemq.transport.TransportSupport
asyncRequest, checkStarted, doConsume, getTransportListener, isConnected, isDisposed, isFaultTolerant, isReconnectSupported, isUpdateURIsSupported, narrow, onException, reconnect, request, request, setTransportListener, updateURIs
-
Methods inherited from class org.apache.activemq.util.ServiceSupport
addServiceListener, dispose, isStarted, isStopped, isStopping, postStop, preStart, removeServiceListener, start, stop
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.activemq.transport.Transport
asyncRequest, getTransportListener, isConnected, isDisposed, isFaultTolerant, isReconnectSupported, isUpdateURIsSupported, narrow, reconnect, request, request, setTransportListener, updateURIs
-
-
-
-
Constructor Detail
-
AmqpWSTransport
public AmqpWSTransport(URI location, org.apache.activemq.wireformat.WireFormat wireFormat)
Create a new Transport instance.- Parameters:
location- the remote location where the client connection is from.wireFormat- the WireFormat instance that configures this Transport.
-
-
Method Detail
-
setTransportSink
public void setTransportSink(WSTransport.WSTransportSink outputSink)
- Specified by:
setTransportSinkin interfaceWSTransport
-
oneway
public void oneway(Object command) throws IOException
- Specified by:
onewayin interfaceTransport- Throws:
IOException
-
getRemoteAddress
public String getRemoteAddress()
- Specified by:
getRemoteAddressin interfaceTransport
-
getReceiveCounter
public int getReceiveCounter()
- Specified by:
getReceiveCounterin interfaceTransport
-
getPeerCertificates
public X509Certificate[] getPeerCertificates()
- Specified by:
getPeerCertificatesin interfaceTransport
-
setPeerCertificates
public void setPeerCertificates(X509Certificate[] certificates)
- Specified by:
setPeerCertificatesin interfaceTransport
-
getSubProtocol
public String getSubProtocol()
- Specified by:
getSubProtocolin interfaceWSTransport
-
getWireFormat
public org.apache.activemq.wireformat.WireFormat getWireFormat()
- Specified by:
getWireFormatin interfaceTransport
-
getMaxFrameSize
public int getMaxFrameSize()
- Specified by:
getMaxFrameSizein interfaceWSTransport
-
doStop
protected void doStop(ServiceStopper stopper) throws Exception
- Specified by:
doStopin classServiceSupport- Throws:
Exception
-
doStart
protected void doStart() throws Exception
- Specified by:
doStartin classServiceSupport- Throws:
Exception
-
onWebSocketText
public void onWebSocketText(String data) throws IOException
- Specified by:
onWebSocketTextin interfaceWSTransport- Throws:
IOException
-
onWebSocketBinary
public void onWebSocketBinary(ByteBuffer data) throws IOException
- Specified by:
onWebSocketBinaryin interfaceWSTransport- Throws:
IOException
-
onWebSocketClosed
public void onWebSocketClosed() throws IOException
- Specified by:
onWebSocketClosedin interfaceWSTransport- Throws:
IOException
-
onFrame
public void onFrame(Object frame)
- Specified by:
onFramein interfaceAmqpFrameParser.AMQPFrameSink
-
-