Class DebuggerWebsocketClientEndpoint
java.lang.Object
org.eclipse.dirigible.engine.js.graalvm.debugger.DebuggerWebsocketClientEndpoint
public class DebuggerWebsocketClientEndpoint extends Object
Debugger Websocket Proxy Client.
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceDebuggerWebsocketClientEndpoint.MessageHandlerMessage handler. -
Constructor Summary
Constructors Constructor Description DebuggerWebsocketClientEndpoint(URI endpointURI)Instantiates a new debugger websocket client endpoint. -
Method Summary
Modifier and Type Method Description voidaddMessageHandler(DebuggerWebsocketClientEndpoint.MessageHandler messageHandler)Register message handler.javax.websocket.SessiongetSession()Gets the session.voidonClose(javax.websocket.Session session, javax.websocket.CloseReason reason)Callback hook for Connection close events.voidonMessage(ByteBuffer message)Callback hook for Message Events.voidonOpen(javax.websocket.Session session)Callback hook for Connection open events.voidsendMessage(ByteBuffer message)Send a message.
-
Constructor Details
-
DebuggerWebsocketClientEndpoint
Instantiates a new debugger websocket client endpoint.- Parameters:
endpointURI- the endpoint URI
-
-
Method Details
-
getSession
public javax.websocket.Session getSession()Gets the session.- Returns:
- the session
-
onOpen
public void onOpen(javax.websocket.Session session)Callback hook for Connection open events.- Parameters:
session- the session which is opened.
-
onClose
public void onClose(javax.websocket.Session session, javax.websocket.CloseReason reason)Callback hook for Connection close events.- Parameters:
session- the session which is getting closed.reason- the reason for connection close
-
onMessage
Callback hook for Message Events. This method will be invoked when a client send a message.- Parameters:
message- the message
-
addMessageHandler
Register message handler.- Parameters:
messageHandler- the message handler
-
sendMessage
Send a message.- Parameters:
message- the message
-