Package org.apache.activemq.transport.ws
Class AbstractStompSocket
java.lang.Object
org.apache.activemq.util.ServiceSupport
org.apache.activemq.transport.TransportSupport
org.apache.activemq.transport.ws.AbstractStompSocket
- All Implemented Interfaces:
org.apache.activemq.Service,org.apache.activemq.transport.stomp.StompTransport,org.apache.activemq.transport.Transport
- Direct Known Subclasses:
StompSocket
public abstract class AbstractStompSocket
extends org.apache.activemq.transport.TransportSupport
implements org.apache.activemq.transport.stomp.StompTransport
Base implementation of a STOMP based WebSocket handler.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected X509Certificate[]protected org.apache.activemq.transport.stomp.ProtocolConverterprotected ReentrantLockprotected intprotected final Stringprotected final CountDownLatchprotected final org.apache.activemq.transport.stomp.StompInactivityMonitorprotected org.apache.activemq.transport.stomp.StompWireFormat -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voiddoStart()protected voiddoStop(org.apache.activemq.util.ServiceStopper stopper) org.apache.activemq.transport.stomp.StompInactivityMonitorintorg.apache.activemq.transport.stomp.StompWireFormatabstract voidCalled when the transport is stopping to allow the dervied classes a chance to close WebSocket resources.voidprotected voidprocessStompFrame(String data) voidsendToActiveMQ(org.apache.activemq.command.Command command) abstract voidsendToStomp(org.apache.activemq.transport.stomp.StompFrame command) voidsetPeerCertificates(X509Certificate[] certificates) Methods inherited from class org.apache.activemq.transport.TransportSupport
asyncRequest, checkStarted, doConsume, getTransportListener, isConnected, isDisposed, isFaultTolerant, isReconnectSupported, isUpdateURIsSupported, narrow, onException, reconnect, request, request, setTransportListener, updateURIsMethods inherited from class org.apache.activemq.util.ServiceSupport
addServiceListener, dispose, isStarted, isStopped, isStopping, postStop, preStart, removeServiceListener, start, stopMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.activemq.Service
start, stopMethods inherited from interface org.apache.activemq.transport.stomp.StompTransport
onException
-
Field Details
-
protocolLock
-
protocolConverter
protected org.apache.activemq.transport.stomp.ProtocolConverter protocolConverter -
wireFormat
protected org.apache.activemq.transport.stomp.StompWireFormat wireFormat -
socketTransportStarted
-
stompInactivityMonitor
protected final org.apache.activemq.transport.stomp.StompInactivityMonitor stompInactivityMonitor -
receiveCounter
protected volatile int receiveCounter -
remoteAddress
-
certificates
-
-
Constructor Details
-
AbstractStompSocket
-
-
Method Details
-
oneway
- Specified by:
onewayin interfaceorg.apache.activemq.transport.Transport- Throws:
IOException
-
sendToActiveMQ
public void sendToActiveMQ(org.apache.activemq.command.Command command) - Specified by:
sendToActiveMQin interfaceorg.apache.activemq.transport.stomp.StompTransport
-
doStop
- Specified by:
doStopin classorg.apache.activemq.util.ServiceSupport- Throws:
Exception
-
doStart
- Specified by:
doStartin classorg.apache.activemq.util.ServiceSupport- Throws:
Exception
-
sendToStomp
public abstract void sendToStomp(org.apache.activemq.transport.stomp.StompFrame command) throws IOException - Specified by:
sendToStompin interfaceorg.apache.activemq.transport.stomp.StompTransport- Throws:
IOException
-
handleStopped
Called when the transport is stopping to allow the dervied classes a chance to close WebSocket resources.- Throws:
IOException- if an error occurs during the stop.
-
getInactivityMonitor
public org.apache.activemq.transport.stomp.StompInactivityMonitor getInactivityMonitor()- Specified by:
getInactivityMonitorin interfaceorg.apache.activemq.transport.stomp.StompTransport
-
getWireFormat
public org.apache.activemq.transport.stomp.StompWireFormat getWireFormat()- Specified by:
getWireFormatin interfaceorg.apache.activemq.transport.stomp.StompTransport- Specified by:
getWireFormatin interfaceorg.apache.activemq.transport.Transport
-
getRemoteAddress
- Specified by:
getRemoteAddressin interfaceorg.apache.activemq.transport.Transport
-
getReceiveCounter
public int getReceiveCounter()- Specified by:
getReceiveCounterin interfaceorg.apache.activemq.transport.Transport
-
processStompFrame
-
getPeerCertificates
- Specified by:
getPeerCertificatesin interfaceorg.apache.activemq.transport.Transport
-
setPeerCertificates
- Specified by:
setPeerCertificatesin interfaceorg.apache.activemq.transport.Transport
-