com.toremote.gateway.client
Interface SessionInformation


public interface SessionInformation


Field Summary
static int JOIN_MODE_ALL_CONTROL
           
static int JOIN_MODE_ONE_CONTROL
           
static int SESSION_STATUS_CLIENT_DISCONNECTED
           
static int SESSION_STATUS_CONNECTED
           
static int SESSION_STATUS_LOGOFF
           
static int SESSION_STATUS_SERVER_DISCONNECTED
           
static int SESSION_STATUS_UNKOWN
           
static int TYPE_RDP
           
static int TYPE_SSH
           
static int TYPE_VNC
           
 
Method Summary
 void allowJoin(boolean allow)
          enable/disable session shadowing on this session
 java.util.Map<java.lang.String,java.lang.String> getClientProperties()
           
 com.toremote.gateway.SessionConfig getConfig()
           
 InputInterface getInput()
           
 java.util.List<SessionInformation> getJoinedSessions()
           
 int getJoinMode()
           
 int getNumericId()
           
 SessionInformation getParent()
           
 java.util.Map<java.lang.String,java.lang.String> getProperties()
           
 java.lang.String getRecordingFile()
          get recording file path
 SessionSaveInfo getSaveSession()
           
 int getSessioinType()
           
 java.lang.String getSessionId()
           
 int getSessionStatus()
           
 User getUser()
           
 void giveControl()
          give control to current session too, be aware it doesn't take control from others
 boolean hasControl()
           
 void refuseControl()
          reufce contorl request
 void requestControl(SessionInformation from)
          request control from the seeion which has contorl
 void requestJoin(SessionInformation from)
           
 void setJoinMode(int mode)
          set up shadowing/join mode
 void setListener(SessionListener listener)
           
 void setSaveSession(SessionSaveInfo si)
          control if save(cache) the session on gateway
 void setThumbnail(int width, int interval)
           
 void showMessge(java.lang.String message)
          send message to client
 void takeBackControl()
          revoke control from current session
 

Field Detail

SESSION_STATUS_UNKOWN

static final int SESSION_STATUS_UNKOWN
See Also:
Constant Field Values

SESSION_STATUS_CONNECTED

static final int SESSION_STATUS_CONNECTED
See Also:
Constant Field Values

SESSION_STATUS_CLIENT_DISCONNECTED

static final int SESSION_STATUS_CLIENT_DISCONNECTED
See Also:
Constant Field Values

SESSION_STATUS_SERVER_DISCONNECTED

static final int SESSION_STATUS_SERVER_DISCONNECTED
See Also:
Constant Field Values

SESSION_STATUS_LOGOFF

static final int SESSION_STATUS_LOGOFF
See Also:
Constant Field Values

JOIN_MODE_ALL_CONTROL

static final int JOIN_MODE_ALL_CONTROL
See Also:
Constant Field Values

JOIN_MODE_ONE_CONTROL

static final int JOIN_MODE_ONE_CONTROL
See Also:
Constant Field Values

TYPE_RDP

static final int TYPE_RDP
See Also:
Constant Field Values

TYPE_VNC

static final int TYPE_VNC
See Also:
Constant Field Values

TYPE_SSH

static final int TYPE_SSH
See Also:
Constant Field Values
Method Detail

getSessioinType

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

getSessionId

java.lang.String getSessionId()
Returns:
GUID

getNumericId

int getNumericId()
Returns:
the 9 digit number id

getUser

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

getConfig

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

getProperties

java.util.Map<java.lang.String,java.lang.String> getProperties()
Returns:
all parameters for this session, from the client side and parameters configured on server side (plugin)

getClientProperties

java.util.Map<java.lang.String,java.lang.String> getClientProperties()
Returns:
parameters passed from the client side

getRecordingFile

java.lang.String getRecordingFile()
get recording file path

Returns:

getParent

SessionInformation getParent()
Returns:
parent session, the session was shadowed/joined

getJoinedSessions

java.util.List<SessionInformation> getJoinedSessions()
Returns:
all joined sessions

hasControl

boolean hasControl()
Returns:
control status

giveControl

void giveControl()
                 throws java.io.IOException
give control to current session too, be aware it doesn't take control from others

Throws:
java.io.IOException

getJoinMode

int getJoinMode()
Returns:
JOIN_MODE_ALL_CONTROL or JOIN_MODE_ONE_CONTROL

setJoinMode

void setJoinMode(int mode)
                 throws java.io.IOException,
                        com.toremote.websocket.handler.AccessException
set up shadowing/join mode

Parameters:
mode -
Throws:
java.io.IOException
com.toremote.websocket.handler.AccessException

takeBackControl

void takeBackControl()
                     throws java.io.IOException
revoke control from current session

Throws:
java.io.IOException

requestControl

void requestControl(SessionInformation from)
                    throws java.io.IOException
request control from the seeion which has contorl

Parameters:
from -
Throws:
java.io.IOException

requestJoin

void requestJoin(SessionInformation from)
                 throws java.io.IOException
Throws:
java.io.IOException

refuseControl

void refuseControl()
                   throws java.io.IOException
reufce contorl request

Throws:
java.io.IOException

showMessge

void showMessge(java.lang.String message)
                throws java.io.IOException
send message to client

Parameters:
message -
Throws:
java.io.IOException

getInput

InputInterface getInput()
Returns:
input interface

setListener

void setListener(SessionListener listener)
Parameters:
listener - session listner
See Also:
SessionListener

setThumbnail

void setThumbnail(int width,
                  int interval)
                  throws java.io.IOException
Parameters:
width - width of thumbnail, 0 will disable thumbnail
interval - 0 will disable thumbnail
Throws:
java.io.IOException

setSaveSession

void setSaveSession(SessionSaveInfo si)
control if save(cache) the session on gateway

Parameters:
si -
See Also:
SessionSaveInfo

getSaveSession

SessionSaveInfo getSaveSession()
Returns:
configuration for session cache

getSessionStatus

int getSessionStatus()
Returns:
session status, SESSION_STATUS_UNKOWN, SESSION_STATUS_CONNECTED etc

allowJoin

void allowJoin(boolean allow)
               throws java.lang.Exception
enable/disable session shadowing on this session

Parameters:
allow -
Throws:
java.lang.Exception