Class DaemonMessagesClientEndpoint
- java.lang.Object
-
- javax.websocket.Endpoint
-
- org.pentaho.di.trans.ael.websocket.DaemonMessagesClientEndpoint
-
public class DaemonMessagesClientEndpoint extends javax.websocket.Endpoint
Created by fcamara on 8/17/17.
-
-
Constructor Summary
Constructors Constructor Description DaemonMessagesClientEndpoint(String host, int port, boolean ssl, MessageEventService messageEventService)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close(String message)
Close the session informing the reason.void
onClose(javax.websocket.Session userSession, javax.websocket.CloseReason reason)
Callback hook for Connection close events.void
onError(javax.websocket.Session userSession, Throwable thr)
Callback hook for Connection close events.void
onOpen(javax.websocket.Session userSession, javax.websocket.EndpointConfig endpointConfig)
Callback hook for Connection open events.void
sendMessage(org.pentaho.di.engine.api.remote.ExecutionRequest request)
Send a execution request message.void
sendMessage(org.pentaho.di.engine.api.remote.StopMessage stopMessage)
Send a stop message to server as result of user request.void
sessionValid()
Validates if the session is open.
-
-
-
Constructor Detail
-
DaemonMessagesClientEndpoint
public DaemonMessagesClientEndpoint(String host, int port, boolean ssl, MessageEventService messageEventService) throws org.pentaho.di.core.exception.KettleException
- Throws:
org.pentaho.di.core.exception.KettleException
-
-
Method Detail
-
onOpen
public void onOpen(javax.websocket.Session userSession, javax.websocket.EndpointConfig endpointConfig)
Callback hook for Connection open events.- Specified by:
onOpen
in classjavax.websocket.Endpoint
- Parameters:
userSession
- the userSession which is opened.
-
onClose
public void onClose(javax.websocket.Session userSession, javax.websocket.CloseReason reason)
Callback hook for Connection close events.- Overrides:
onClose
in classjavax.websocket.Endpoint
- Parameters:
userSession
- the userSession which is getting closed.reason
- the reason for connection close
-
onError
public void onError(javax.websocket.Session userSession, Throwable thr)
Callback hook for Connection close events.- Overrides:
onError
in classjavax.websocket.Endpoint
- Parameters:
userSession
- the userSession which is getting closed.thr
- throwable
-
sendMessage
public void sendMessage(org.pentaho.di.engine.api.remote.ExecutionRequest request) throws org.pentaho.di.core.exception.KettleException
Send a execution request message.- Throws:
org.pentaho.di.core.exception.KettleException
-
sendMessage
public void sendMessage(org.pentaho.di.engine.api.remote.StopMessage stopMessage) throws org.pentaho.di.core.exception.KettleException
Send a stop message to server as result of user request.- Throws:
org.pentaho.di.core.exception.KettleException
-
close
public void close(String message) throws org.pentaho.di.core.exception.KettleException
Close the session informing the reason.- Throws:
org.pentaho.di.core.exception.KettleException
-
sessionValid
public void sessionValid() throws org.pentaho.di.core.exception.KettleException
Validates if the session is open.- Throws:
org.pentaho.di.core.exception.KettleException
-
-