Class StompSocket
- java.lang.Object
-
- org.apache.activemq.util.ServiceSupport
-
- org.apache.activemq.transport.TransportSupport
-
- org.apache.activemq.transport.ws.AbstractStompSocket
-
- org.apache.activemq.transport.ws.jetty9.StompSocket
-
- All Implemented Interfaces:
Service
,StompTransport
,Transport
,org.eclipse.jetty.websocket.api.WebSocketConnectionListener
,org.eclipse.jetty.websocket.api.WebSocketListener
public class StompSocket extends AbstractStompSocket implements org.eclipse.jetty.websocket.api.WebSocketListener
Implements web socket and mediates between servlet and the broker
-
-
Field Summary
-
Fields inherited from class org.apache.activemq.transport.ws.AbstractStompSocket
certificates, protocolConverter, protocolLock, receiveCounter, remoteAddress, socketTransportStarted, stompInactivityMonitor, wireFormat
-
-
Constructor Summary
Constructors Constructor Description StompSocket(String remoteAddress)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
handleStopped()
Called when the transport is stopping to allow the dervied classes a chance to close WebSocket resources.void
onWebSocketBinary(byte[] arg0, int arg1, int arg2)
void
onWebSocketClose(int arg0, String arg1)
void
onWebSocketConnect(org.eclipse.jetty.websocket.api.Session session)
void
onWebSocketError(Throwable arg0)
void
onWebSocketText(String data)
void
sendToStomp(StompFrame command)
-
Methods inherited from class org.apache.activemq.transport.ws.AbstractStompSocket
doStart, doStop, getInactivityMonitor, getPeerCertificates, getReceiveCounter, getRemoteAddress, getWireFormat, oneway, processStompFrame, sendToActiveMQ, setPeerCertificates
-
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.stomp.StompTransport
onException
-
-
-
-
Constructor Detail
-
StompSocket
public StompSocket(String remoteAddress)
-
-
Method Detail
-
sendToStomp
public void sendToStomp(StompFrame command) throws IOException
- Specified by:
sendToStomp
in interfaceStompTransport
- Specified by:
sendToStomp
in classAbstractStompSocket
- Throws:
IOException
-
handleStopped
public void handleStopped() throws IOException
Description copied from class:AbstractStompSocket
Called when the transport is stopping to allow the dervied classes a chance to close WebSocket resources.- Specified by:
handleStopped
in classAbstractStompSocket
- Throws:
IOException
- if an error occurs during the stop.
-
onWebSocketBinary
public void onWebSocketBinary(byte[] arg0, int arg1, int arg2)
- Specified by:
onWebSocketBinary
in interfaceorg.eclipse.jetty.websocket.api.WebSocketListener
-
onWebSocketClose
public void onWebSocketClose(int arg0, String arg1)
- Specified by:
onWebSocketClose
in interfaceorg.eclipse.jetty.websocket.api.WebSocketConnectionListener
-
onWebSocketConnect
public void onWebSocketConnect(org.eclipse.jetty.websocket.api.Session session)
- Specified by:
onWebSocketConnect
in interfaceorg.eclipse.jetty.websocket.api.WebSocketConnectionListener
-
onWebSocketError
public void onWebSocketError(Throwable arg0)
- Specified by:
onWebSocketError
in interfaceorg.eclipse.jetty.websocket.api.WebSocketConnectionListener
-
onWebSocketText
public void onWebSocketText(String data)
- Specified by:
onWebSocketText
in interfaceorg.eclipse.jetty.websocket.api.WebSocketListener
-
-