Package jadex.extension.rs.publish
Class JettyWebsocketServer
- java.lang.Object
-
- jadex.extension.rs.publish.JettyWebsocketServer
-
@WebSocket public class JettyWebsocketServer extends java.lang.Object
The websocket impl for jetty. Should be able to use the RestWebSocket class, but jetty complains that the websocket has to implement (jetty) WebsocketListener or use (jetty) @WebSocket annotion.
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.Map<org.eclipse.jetty.websocket.api.Session,java.util.Map<java.lang.String,java.lang.Object>>
props
The websockets per session.protected AbstractWebSocketServer
server
The websocket server functionality.
-
Constructor Summary
Constructors Constructor Description JettyWebsocketServer(IInternalAccess agent)
Create a new rest websocket.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Map<java.lang.String,java.lang.Object>
getUserProperties(org.eclipse.jetty.websocket.api.Session session)
void
onClose(org.eclipse.jetty.websocket.api.Session session, int status, java.lang.String reason)
void
onConnect(org.eclipse.jetty.websocket.api.Session session)
void
onError(java.lang.Throwable error)
void
onText(org.eclipse.jetty.websocket.api.Session session, java.lang.String message)
-
-
-
Field Detail
-
server
protected AbstractWebSocketServer server
The websocket server functionality.
-
props
protected java.util.Map<org.eclipse.jetty.websocket.api.Session,java.util.Map<java.lang.String,java.lang.Object>> props
The websockets per session.
-
-
Constructor Detail
-
JettyWebsocketServer
public JettyWebsocketServer(IInternalAccess agent)
Create a new rest websocket.
-
-
Method Detail
-
onConnect
@OnWebSocketConnect public void onConnect(org.eclipse.jetty.websocket.api.Session session)
-
onText
@OnWebSocketMessage public void onText(org.eclipse.jetty.websocket.api.Session session, java.lang.String message)
-
onClose
@OnWebSocketClose public void onClose(org.eclipse.jetty.websocket.api.Session session, int status, java.lang.String reason)
-
onError
@OnWebSocketError public void onError(java.lang.Throwable error)
-
getUserProperties
public java.util.Map<java.lang.String,java.lang.Object> getUserProperties(org.eclipse.jetty.websocket.api.Session session)
-
-