com.toremote.websocket.handler
Class VncHandler

java.lang.Object
  extended by com.toremote.websocket.handler.AbstractHandler
      extended by com.toremote.websocket.handler.AbstractSessionHandler
          extended by com.toremote.websocket.handler.VncHandler
All Implemented Interfaces:
SessionInformation, HandlerInterface
Direct Known Subclasses:
JoinVncHandler

public class VncHandler
extends AbstractSessionHandler


Field Summary
protected  com.toremote.websocket.vnc.VncConfig cfg
           
protected  com.toremote.websocket.vnc.VncDataProcessor dataProcess
           
(package private)  boolean mouseDown
           
 
Fields inherited from class com.toremote.websocket.handler.AbstractSessionHandler
control, FEATURE_ALL, FEATURE_AUDIO_PLAYBACK, FEATURE_BASIC, FEATURE_CLIPBOARD, FEATURE_FILE, FEATURE_NO_UPLOAD, FEATURE_PRINT, FEATURE_REMOTEAPP, FEATURE_REMOTEFX, FEATURE_SESSION_REC, FEATURE_SHADOWING, joinMode, numericId, readOnly, usr
 
Fields inherited from class com.toremote.websocket.handler.AbstractHandler
CLIENT_CLOSE, clientProperties, INFO_TAG, listener, out, properties, startTime, userAgent, userIp, WARGIN_TAG
 
Fields inherited from interface com.toremote.gateway.client.SessionInformation
JOIN_MODE_ALL_CONTROL, JOIN_MODE_ONE_CONTROL, SESSION_STATUS_CLIENT_DISCONNECTED, SESSION_STATUS_CONNECTED, SESSION_STATUS_LOGOFF, SESSION_STATUS_SERVER_DISCONNECTED, SESSION_STATUS_UNKOWN, TYPE_RDP, TYPE_SSH, TYPE_VNC
 
Fields inherited from interface com.toremote.websocket.handler.HandlerInterface
ARG_CLIENT_IP, ARG_HOST
 
Constructor Summary
VncHandler()
           
 
Method Summary
 void allowJoin(boolean allow)
          enable/disable session shadowing on this session
 void exit()
          close the output
 com.toremote.websocket.vnc.VncConfig getConfig()
           
 com.toremote.websocket.rdp.clipboard.ClipDataRequest getCopyToText()
           
protected  java.lang.String getExtraJson()
           
 java.lang.String getProtocol()
           
 java.lang.String getRecordingFile()
          get recording file path
protected  com.toremote.websocket.general.Runner getRunner()
           
 int getSessioinType()
           
 User getUser()
           
 void onBinaryReceived(byte[] data)
          process client side binary message.
 void onText(java.lang.String result)
           
protected  void overrideConfigByLicense(com.toremote.license.License lic)
           
protected  void processClientTextInput(com.toremote.websocket.vnc.VncRunner rr, java.lang.String result)
           
 void processHandShake(java.lang.String action, java.util.Map<java.lang.String,java.lang.String> properties)
           
protected  void processNotify(java.lang.String value)
           
protected  void sendNotify(java.lang.String msg, java.lang.String[] ids)
           
protected  void sendSessionInfo()
           
 java.lang.String toJson()
           
 java.lang.String toJsonTableRow()
           
 
Methods inherited from class com.toremote.websocket.handler.AbstractSessionHandler
getClientProperties, getInput, getJoinedSessions, getJoinedSessionsWithParent, getJoinMode, getNumericId, getParent, getProperties, getSaveSession, getSessionStatus, giveControl, handshake, hasControl, refuseControl, refuseControl, requestControl, requestControl, requestJoin, setJoinMode, setListener, setSaveSession, setSessionStaus, setThumbnail, takeBackControl
 
Methods inherited from class com.toremote.websocket.handler.AbstractHandler
checkLicense, getGatewayWebAddress, getSessionId, isTrue, onClientDisconnected, onHandShake, onTextReceived, sendError, sendError, sendError, setHandshakeListener, setOutput, setSessionId, showMessge, showMessge
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.toremote.gateway.client.SessionInformation
getSessionId, showMessge
 

Field Detail

dataProcess

protected com.toremote.websocket.vnc.VncDataProcessor dataProcess

mouseDown

boolean mouseDown

cfg

protected com.toremote.websocket.vnc.VncConfig cfg
Constructor Detail

VncHandler

public VncHandler()
Method Detail

overrideConfigByLicense

protected void overrideConfigByLicense(com.toremote.license.License lic)
                                throws java.io.IOException
Throws:
java.io.IOException

sendSessionInfo

protected void sendSessionInfo()
                        throws java.io.IOException
Throws:
java.io.IOException

processHandShake

public void processHandShake(java.lang.String action,
                             java.util.Map<java.lang.String,java.lang.String> properties)
                      throws java.lang.Exception
Specified by:
processHandShake in class AbstractHandler
Throws:
java.lang.Exception

onText

public void onText(java.lang.String result)
            throws java.lang.Exception
Specified by:
onText in class AbstractHandler
Throws:
java.lang.Exception

onBinaryReceived

public void onBinaryReceived(byte[] data)
                      throws java.lang.Exception
Description copied from interface: HandlerInterface
process client side binary message.

Throws:
java.lang.Exception

processClientTextInput

protected void processClientTextInput(com.toremote.websocket.vnc.VncRunner rr,
                                      java.lang.String result)
                               throws java.io.IOException,
                                      AccessException
Throws:
java.io.IOException
AccessException

processNotify

protected void processNotify(java.lang.String value)
                      throws java.io.IOException
Throws:
java.io.IOException

sendNotify

protected void sendNotify(java.lang.String msg,
                          java.lang.String[] ids)
                   throws java.io.IOException
Throws:
java.io.IOException

exit

public void exit()
Description copied from interface: HandlerInterface
close the output

Specified by:
exit in interface HandlerInterface
Overrides:
exit in class AbstractHandler

getUser

public User getUser()
Returns:
user who is using this session

getConfig

public com.toremote.websocket.vnc.VncConfig getConfig()
Returns:
The session configuration, it can be RdpConfig, VncConfig, SSHConfig based on the session type

getRecordingFile

public java.lang.String getRecordingFile()
Description copied from interface: SessionInformation
get recording file path

Returns:

getRunner

protected com.toremote.websocket.general.Runner getRunner()
Specified by:
getRunner in class AbstractSessionHandler

getSessioinType

public int getSessioinType()
Returns:
session type, TYPE_RDP, TYPE_VNC or TYPE_SSH

toJson

public java.lang.String toJson()
Specified by:
toJson in interface HandlerInterface
Overrides:
toJson in class AbstractHandler

toJsonTableRow

public java.lang.String toJsonTableRow()
Specified by:
toJsonTableRow in class AbstractSessionHandler

getExtraJson

protected java.lang.String getExtraJson()

getCopyToText

public com.toremote.websocket.rdp.clipboard.ClipDataRequest getCopyToText()
Specified by:
getCopyToText in class AbstractSessionHandler

allowJoin

public void allowJoin(boolean allow)
               throws java.lang.Exception
Description copied from interface: SessionInformation
enable/disable session shadowing on this session

Throws:
java.lang.Exception

getProtocol

public java.lang.String getProtocol()
Specified by:
getProtocol in class AbstractSessionHandler