com.toremote.websocket.handler
Class AbstractSessionHandler
java.lang.Object
com.toremote.websocket.handler.AbstractHandler
com.toremote.websocket.handler.AbstractSessionHandler
- All Implemented Interfaces:
- SessionInformation, HandlerInterface
- Direct Known Subclasses:
- RdpHandler, SSHHandler, VncHandler
public abstract class AbstractSessionHandler
- extends AbstractHandler
- implements SessionInformation
Methods inherited from class com.toremote.websocket.handler.AbstractHandler |
checkLicense, exit, getGatewayWebAddress, getSessionId, isTrue, onClientDisconnected, onHandShake, onText, onTextReceived, processHandShake, sendError, sendError, sendError, setHandshakeListener, setOutput, setSessionId, showMessge, showMessge, toJson |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
usr
public User usr
numericId
protected int numericId
readOnly
protected boolean readOnly
control
protected boolean control
joinMode
protected int joinMode
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_ALL
protected static final int FEATURE_ALL
- See Also:
- Constant Field Values
AbstractSessionHandler
protected AbstractSessionHandler()
getRunner
protected abstract com.toremote.websocket.general.Runner getRunner()
getCopyToText
public abstract com.toremote.websocket.rdp.clipboard.ClipDataRequest getCopyToText()
getJoinedSessionsWithParent
public java.util.List<SessionInformation> getJoinedSessionsWithParent()
refuseControl
public void refuseControl(int id)
throws java.io.IOException
- Throws:
java.io.IOException
refuseControl
public void refuseControl()
throws java.io.IOException
- Description copied from interface:
SessionInformation
- reufce contorl request
- Specified by:
refuseControl
in interface SessionInformation
- Throws:
java.io.IOException
requestControl
public void requestControl()
throws java.io.IOException
- Throws:
java.io.IOException
setJoinMode
public void setJoinMode(int mode)
throws java.io.IOException,
AccessException
- Description copied from interface:
SessionInformation
- set up shadowing/join mode
- Specified by:
setJoinMode
in interface SessionInformation
- Throws:
java.io.IOException
AccessException
getJoinMode
public int getJoinMode()
- Specified by:
getJoinMode
in interface SessionInformation
- Returns:
- JOIN_MODE_ALL_CONTROL or JOIN_MODE_ONE_CONTROL
getNumericId
public int getNumericId()
- Specified by:
getNumericId
in interface SessionInformation
- Returns:
- the 9 digit number id
getParent
public SessionInformation getParent()
- Specified by:
getParent
in interface SessionInformation
- Returns:
- parent session, the session was shadowed/joined
getJoinedSessions
public java.util.List<SessionInformation> getJoinedSessions()
- Specified by:
getJoinedSessions
in interface SessionInformation
- Returns:
- all joined sessions
hasControl
public boolean hasControl()
- Specified by:
hasControl
in interface SessionInformation
- Returns:
- control status
giveControl
public void giveControl()
throws java.io.IOException
- Description copied from interface:
SessionInformation
- give control to current session too, be aware it doesn't take control from others
- Specified by:
giveControl
in interface SessionInformation
- Throws:
java.io.IOException
takeBackControl
public void takeBackControl()
throws java.io.IOException
- Description copied from interface:
SessionInformation
- revoke control from current session
- Specified by:
takeBackControl
in interface SessionInformation
- Throws:
java.io.IOException
requestControl
public void requestControl(SessionInformation from)
throws java.io.IOException
- Description copied from interface:
SessionInformation
- request control from the seeion which has contorl
- Specified by:
requestControl
in interface SessionInformation
- Throws:
java.io.IOException
requestJoin
public void requestJoin(SessionInformation from)
throws java.io.IOException
- Specified by:
requestJoin
in interface SessionInformation
- Throws:
java.io.IOException
getInput
public InputInterface getInput()
- Specified by:
getInput
in interface SessionInformation
- Returns:
- input interface
setListener
public void setListener(SessionListener sl)
- Specified by:
setListener
in interface SessionInformation
- Parameters:
sl
- session listner- See Also:
SessionListener
setThumbnail
public void setThumbnail(int width,
int interval)
throws java.io.IOException
- Specified by:
setThumbnail
in interface SessionInformation
- Parameters:
width
- width of thumbnail, 0 will disable thumbnailinterval
- 0 will disable thumbnail
- Throws:
java.io.IOException
getProperties
public java.util.Map<java.lang.String,java.lang.String> getProperties()
- Specified by:
getProperties
in interface SessionInformation
- Returns:
- all parameters for this session, from the client side and parameters configured on server side (plugin)
getClientProperties
public java.util.Map<java.lang.String,java.lang.String> getClientProperties()
- Specified by:
getClientProperties
in interface SessionInformation
- Returns:
- parameters passed from the client side
setSaveSession
public void setSaveSession(SessionSaveInfo si)
- Description copied from interface:
SessionInformation
- control if save(cache) the session on gateway
- Specified by:
setSaveSession
in interface SessionInformation
- See Also:
SessionSaveInfo
getSaveSession
public SessionSaveInfo getSaveSession()
- Specified by:
getSaveSession
in interface SessionInformation
- Returns:
- configuration for session cache
getSessionStatus
public int getSessionStatus()
- Specified by:
getSessionStatus
in interface SessionInformation
- Returns:
- session status, SESSION_STATUS_UNKOWN, SESSION_STATUS_CONNECTED etc
setSessionStaus
public void setSessionStaus(int value)
handshake
protected void handshake(java.lang.String action,
java.util.Map<java.lang.String,java.lang.String> properties)
throws java.lang.Exception
- Overrides:
handshake
in class AbstractHandler
- Throws:
java.lang.Exception
toJsonTableRow
public abstract java.lang.String toJsonTableRow()
getProtocol
public abstract java.lang.String getProtocol()