com.toremote.websocket.handler
Class RdpHandler

java.lang.Object
  extended by com.toremote.websocket.handler.AbstractHandler
      extended by com.toremote.websocket.handler.AbstractSessionHandler
          extended by com.toremote.websocket.handler.RdpHandler
All Implemented Interfaces:
SessionInformation, HandlerInterface, net.protocol.mcs.printer.FileOperationCallBack
Direct Known Subclasses:
JoinHandler

public class RdpHandler
extends AbstractSessionHandler
implements net.protocol.mcs.printer.FileOperationCallBack


Nested Class Summary
(package private)  class RdpHandler.AssistanceListner
           
(package private)  class RdpHandler.ChatGatewayChannel
           
 
Field Summary
protected  net.protocol.rdp.interfaces.RdpConfig cfg
           
protected  com.toremote.websocket.rdp.RdpDataProcessor dataProcess
           
protected static int FEATURE_AUDIO_PLAYBACK
           
protected static int FEATURE_BASIC
           
protected static int FEATURE_CLIPBOARD
           
protected static int FEATURE_FILE
           
protected static int FEATURE_NO_UPLOAD
           
protected static int FEATURE_PRINT
           
protected static int FEATURE_REMOTE_ASSISTANCE
           
protected static int FEATURE_REMOTEAPP
           
protected static int FEATURE_REMOTEFX
           
protected static int FEATURE_SAVE_SESSION
           
protected static int FEATURE_SESSION_REC
           
protected static int FEATURE_SHADOWING
           
protected static int FEATURE_SSH
           
protected  com.toremote.websocket.rdp.RdpRunner runner
           
 
Fields inherited from class com.toremote.websocket.handler.AbstractSessionHandler
control, 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
RdpHandler()
           
 
Method Summary
 void allowJoin(boolean allow)
          enable/disable session shadowing on this session
 void exit()
          close the output
 void fileCreated(java.lang.String s, java.lang.String printerName, java.lang.String printerDriver)
           
 net.protocol.rdp.interfaces.RdpConfig getConfig()
           
 com.toremote.websocket.rdp.clipboard.ClipDataRequest getCopyToText()
           
protected  java.lang.String getExtraJson()
           
 java.io.File getFile(java.lang.String path)
           
 java.lang.String getProtocol()
           
 java.lang.String getRecordingFile()
          get recording file path
protected  com.toremote.websocket.rdp.RdpRunner getRunner()
           
 int getSessioinType()
           
 User getUser()
           
 void onBinaryReceived(byte[] frame)
          process client side binary message.
 void onText(java.lang.String result)
           
protected  void overrideConfigByLicense(com.toremote.license.License lic, net.protocol.rdp.interfaces.RdpConfig cfg)
           
protected  void processClientTextInput(com.toremote.websocket.rdp.RdpRunner 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 processSessionInfo(java.lang.String value)
           
 InputInterface reconnect(int newW, int newH)
           
 void requestControl()
           
protected  void sendNotify(java.lang.String msg, java.lang.String[] ids)
           
protected  void sendSessionInfo(boolean moreInfo)
           
 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, 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

runner

protected com.toremote.websocket.rdp.RdpRunner runner

dataProcess

protected com.toremote.websocket.rdp.RdpDataProcessor dataProcess

cfg

protected net.protocol.rdp.interfaces.RdpConfig cfg

FEATURE_BASIC

protected static final int FEATURE_BASIC
See Also:
Constant Field Values

FEATURE_CLIPBOARD

protected static final int FEATURE_CLIPBOARD
See Also:
Constant Field Values

FEATURE_AUDIO_PLAYBACK

protected static final int FEATURE_AUDIO_PLAYBACK
See Also:
Constant Field Values

FEATURE_PRINT

protected static final int FEATURE_PRINT
See Also:
Constant Field Values

FEATURE_FILE

protected static final int FEATURE_FILE
See Also:
Constant Field Values

FEATURE_REMOTEAPP

protected static final int FEATURE_REMOTEAPP
See Also:
Constant Field Values

FEATURE_SESSION_REC

protected static final int FEATURE_SESSION_REC
See Also:
Constant Field Values

FEATURE_NO_UPLOAD

protected static final int FEATURE_NO_UPLOAD
See Also:
Constant Field Values

FEATURE_SHADOWING

protected static final int FEATURE_SHADOWING
See Also:
Constant Field Values

FEATURE_REMOTEFX

protected static final int FEATURE_REMOTEFX
See Also:
Constant Field Values

FEATURE_SAVE_SESSION

protected static final int FEATURE_SAVE_SESSION
See Also:
Constant Field Values

FEATURE_REMOTE_ASSISTANCE

protected static final int FEATURE_REMOTE_ASSISTANCE
See Also:
Constant Field Values

FEATURE_SSH

protected static final int FEATURE_SSH
See Also:
Constant Field Values
Constructor Detail

RdpHandler

public RdpHandler()
Method Detail

reconnect

public InputInterface reconnect(int newW,
                                int newH)

sendSessionInfo

protected void sendSessionInfo(boolean moreInfo)
                        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

overrideConfigByLicense

protected void overrideConfigByLicense(com.toremote.license.License lic,
                                       net.protocol.rdp.interfaces.RdpConfig cfg)
                                throws java.io.IOException
Throws:
java.io.IOException

onText

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

processClientTextInput

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

sendNotify

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

processNotify

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

processSessionInfo

protected void processSessionInfo(java.lang.String value)

getCopyToText

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

getRunner

protected com.toremote.websocket.rdp.RdpRunner getRunner()
Specified by:
getRunner in class AbstractSessionHandler

fileCreated

public void fileCreated(java.lang.String s,
                        java.lang.String printerName,
                        java.lang.String printerDriver)
Specified by:
fileCreated in interface net.protocol.mcs.printer.FileOperationCallBack

onBinaryReceived

public void onBinaryReceived(byte[] frame)
Description copied from interface: HandlerInterface
process client side binary message.

Specified by:
onBinaryReceived in interface HandlerInterface

exit

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

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

getFile

public java.io.File getFile(java.lang.String path)

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()

getUser

public User getUser()
Specified by:
getUser in interface SessionInformation
Returns:
user who is using this session

getConfig

public net.protocol.rdp.interfaces.RdpConfig getConfig()
Specified by:
getConfig in interface SessionInformation
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

Specified by:
getRecordingFile in interface SessionInformation
Returns:

getSessioinType

public int getSessioinType()
Specified by:
getSessioinType in interface SessionInformation
Returns:
session type, TYPE_RDP, TYPE_VNC or TYPE_SSH

allowJoin

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

Specified by:
allowJoin in interface SessionInformation
Throws:
java.lang.Exception

getProtocol

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

requestControl

public void requestControl()
                    throws java.io.IOException
Overrides:
requestControl in class AbstractSessionHandler
Throws:
java.io.IOException