com.toremote.gateway.connection
Class User

java.lang.Object
  extended by com.toremote.gateway.connection.User
All Implemented Interfaces:
java.lang.Cloneable

public class User
extends java.lang.Object
implements java.lang.Cloneable


Field Summary
 java.lang.String agent
           
 java.util.List<java.lang.String> connectedSessions
           
 java.lang.String cookie
           
 java.lang.String domainServer
           
 long idleStartTime
           
 java.lang.String ip
           
 boolean isDomainUser
           
 java.lang.String lastUpdated
           
 java.lang.String name
           
 java.lang.String password
           
 java.lang.String[] servers
           
 java.lang.String session
           
 long startTime
           
protected  java.lang.Boolean transferCredential
           
 
Constructor Summary
User()
           
 
Method Summary
 java.lang.Object clone()
           
 boolean equals(java.lang.Object obj)
           
 java.lang.String getPassword()
           
 int hashCode()
           
 boolean hasServer(java.lang.String server)
           
 boolean isSessionTimeout()
           
 boolean isTransferCredential()
           
static java.lang.String parseDomain(java.lang.String userNameWithDomain)
           
static java.lang.String parseUser(java.lang.String userNameWithDomain)
           
 void resetIdleTimer()
           
 void sessionConnected(java.lang.String id)
           
 void sessionDisconnected(java.lang.String id)
           
 void setDomainPassword(java.lang.String pwd)
           
 void setTransferCredential(boolean transferCredential)
          set up if use user credential for session (RDP) authentication too.
 void startSession()
           
 void terminateSession()
           
 java.lang.String toJson()
           
 void updateSession()
           
 boolean verifyUser(java.lang.String session, java.lang.String server, java.lang.String ip)
           
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

name

public java.lang.String name

password

public java.lang.String password

servers

public java.lang.String[] servers

session

public java.lang.String session

startTime

public transient long startTime

agent

public transient java.lang.String agent

ip

public transient java.lang.String ip

cookie

public transient java.lang.String cookie

lastUpdated

public transient java.lang.String lastUpdated

idleStartTime

public transient long idleStartTime

connectedSessions

public transient java.util.List<java.lang.String> connectedSessions

isDomainUser

public boolean isDomainUser

domainServer

public java.lang.String domainServer

transferCredential

protected java.lang.Boolean transferCredential
Constructor Detail

User

public User()
Method Detail

isTransferCredential

public boolean isTransferCredential()
Returns:
true if the user credential will be used on session (RDP) authentication

setTransferCredential

public void setTransferCredential(boolean transferCredential)
set up if use user credential for session (RDP) authentication too.

Parameters:
transferCredential -

startSession

public void startSession()

updateSession

public void updateSession()

terminateSession

public void terminateSession()

toJson

public java.lang.String toJson()

hasServer

public boolean hasServer(java.lang.String server)
Parameters:
server -
Returns:
true if use has this server

verifyUser

public boolean verifyUser(java.lang.String session,
                          java.lang.String server,
                          java.lang.String ip)

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

parseUser

public static final java.lang.String parseUser(java.lang.String userNameWithDomain)

parseDomain

public static final java.lang.String parseDomain(java.lang.String userNameWithDomain)

clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
Overrides:
clone in class java.lang.Object
Throws:
java.lang.CloneNotSupportedException

getPassword

public java.lang.String getPassword()

setDomainPassword

public void setDomainPassword(java.lang.String pwd)

resetIdleTimer

public void resetIdleTimer()

sessionConnected

public void sessionConnected(java.lang.String id)

sessionDisconnected

public void sessionDisconnected(java.lang.String id)

isSessionTimeout

public boolean isSessionTimeout()