Package org.activecomponents.webservice
Class RestWebSocket
- java.lang.Object
-
- javax.websocket.Endpoint
-
- org.activecomponents.webservice.RestWebSocket
-
public class RestWebSocket extends javax.websocket.EndpointWebSocket 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.EndpointConfigconfigThe endpoint configuration.protected AbstractWebSocketServerserverThe 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.ServletContextgetServletContext()Get the servlet context.voidonClose(javax.websocket.Session session, javax.websocket.CloseReason reason)voidonMessage(java.lang.String txt, javax.websocket.Session session)voidonOpen(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:
onOpenin 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:
onClosein classjavax.websocket.Endpoint
-
getServletContext
protected javax.servlet.ServletContext getServletContext()
Get the servlet context.- Returns:
- The servlet context.
-
-