Package org.activecomponents.webservice
Class RestWebSocket
- java.lang.Object
-
- javax.websocket.Endpoint
-
- org.activecomponents.webservice.RestWebSocket
-
public class RestWebSocket extends javax.websocket.Endpoint
WebSocket server implementation. Opens web socket at an address and acts as bridge to Jadex. Allows for JavaScript usage of Jadex that comes close to Java programming.
-
-
Field Summary
Fields Modifier and Type Field Description protected javax.websocket.EndpointConfig
config
The endpoint configuration.protected AbstractWebSocketServer
server
The websocket server functionality.
-
Constructor Summary
Constructors Constructor Description RestWebSocket()
Create a new rest websocket.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected javax.servlet.ServletContext
getServletContext()
Get the servlet context.void
onClose(javax.websocket.Session session, javax.websocket.CloseReason reason)
void
onMessage(java.lang.String txt, javax.websocket.Session session)
void
onOpen(javax.websocket.Session session, javax.websocket.EndpointConfig config)
-
-
-
Field Detail
-
config
protected javax.websocket.EndpointConfig config
The endpoint configuration.
-
server
protected AbstractWebSocketServer server
The websocket server functionality.
-
-
Method Detail
-
onOpen
public void onOpen(javax.websocket.Session session, javax.websocket.EndpointConfig config)
- Specified by:
onOpen
in classjavax.websocket.Endpoint
-
onMessage
public void onMessage(java.lang.String txt, javax.websocket.Session session) throws java.io.IOException
- Throws:
java.io.IOException
-
onClose
public void onClose(javax.websocket.Session session, javax.websocket.CloseReason reason)
- Overrides:
onClose
in classjavax.websocket.Endpoint
-
getServletContext
protected javax.servlet.ServletContext getServletContext()
Get the servlet context.- Returns:
- The servlet context.
-
-