Package org.apache.activemq.transport.ws
Class StompWSConnection
- java.lang.Object
-
- org.eclipse.jetty.websocket.api.WebSocketAdapter
-
- org.apache.activemq.transport.ws.StompWSConnection
-
- All Implemented Interfaces:
org.eclipse.jetty.websocket.api.WebSocketConnectionListener
,org.eclipse.jetty.websocket.api.WebSocketListener
public class StompWSConnection extends org.eclipse.jetty.websocket.api.WebSocketAdapter implements org.eclipse.jetty.websocket.api.WebSocketListener
STOMP over WS based Connection class
-
-
Constructor Summary
Constructors Constructor Description StompWSConnection()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
awaitConnection()
boolean
awaitConnection(long time, TimeUnit unit)
void
close()
int
getCloseCode()
String
getCloseMessage()
protected org.eclipse.jetty.websocket.api.Session
getConnection()
boolean
isConnected()
void
keepAlive()
void
onWebSocketClose(int statusCode, String reason)
void
onWebSocketConnect(org.eclipse.jetty.websocket.api.Session session)
void
onWebSocketText(String data)
String
receive()
String
receive(long timeout, TimeUnit unit)
String
receiveNoWait()
void
sendFrame(StompFrame frame)
void
sendRawFrame(String rawFrame)
-
Methods inherited from class org.eclipse.jetty.websocket.api.WebSocketAdapter
getRemote, getSession, isNotConnected, onWebSocketBinary, onWebSocketError
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
-
-
Method Detail
-
isConnected
public boolean isConnected()
- Overrides:
isConnected
in classorg.eclipse.jetty.websocket.api.WebSocketAdapter
-
close
public void close()
-
getConnection
protected org.eclipse.jetty.websocket.api.Session getConnection()
-
sendFrame
public void sendFrame(StompFrame frame) throws Exception
- Throws:
Exception
-
awaitConnection
public void awaitConnection() throws InterruptedException
- Throws:
InterruptedException
-
awaitConnection
public boolean awaitConnection(long time, TimeUnit unit) throws InterruptedException
- Throws:
InterruptedException
-
getCloseCode
public int getCloseCode()
-
getCloseMessage
public String getCloseMessage()
-
onWebSocketText
public void onWebSocketText(String data)
- Specified by:
onWebSocketText
in interfaceorg.eclipse.jetty.websocket.api.WebSocketListener
- Overrides:
onWebSocketText
in classorg.eclipse.jetty.websocket.api.WebSocketAdapter
-
onWebSocketClose
public void onWebSocketClose(int statusCode, String reason)
- Specified by:
onWebSocketClose
in interfaceorg.eclipse.jetty.websocket.api.WebSocketConnectionListener
- Overrides:
onWebSocketClose
in classorg.eclipse.jetty.websocket.api.WebSocketAdapter
-
onWebSocketConnect
public void onWebSocketConnect(org.eclipse.jetty.websocket.api.Session session)
- Specified by:
onWebSocketConnect
in interfaceorg.eclipse.jetty.websocket.api.WebSocketConnectionListener
- Overrides:
onWebSocketConnect
in classorg.eclipse.jetty.websocket.api.WebSocketAdapter
-
-