public class GuacamoleSession extends Object
Constructor and Description |
---|
GuacamoleSession(Environment environment,
AuthenticatedUser authenticatedUser,
List<UserContext> userContexts)
Creates a new Guacamole session associated with the given
AuthenticatedUser and UserContexts.
|
Modifier and Type | Method and Description |
---|---|
void |
access()
Updates this session, marking it as accessed.
|
void |
addTunnel(GuacamoleTunnel tunnel)
Associates the given tunnel with this session, such that it is taken
into account when determining session activity.
|
AuthenticatedUser |
getAuthenticatedUser()
Returns the authenticated user associated with this session.
|
long |
getLastAccessedTime()
Returns the time this session was last accessed, as the number of
milliseconds since midnight January 1, 1970 GMT.
|
Map<String,GuacamoleTunnel> |
getTunnels()
Returns a map of all active tunnels associated with this session, where
each key is the String representation of the tunnel's UUID.
|
List<UserContext> |
getUserContexts()
Returns a list of all UserContexts associated with this session.
|
boolean |
hasTunnels()
Returns whether this session has any associated active tunnels.
|
void |
invalidate()
Closes all associated tunnels and prevents any further use of this
session.
|
boolean |
removeTunnel(String uuid)
Disassociates the tunnel having the given UUID from this session.
|
void |
setAuthenticatedUser(AuthenticatedUser authenticatedUser)
Replaces the authenticated user associated with this session with the
given authenticated user.
|
void |
setUserContexts(List<UserContext> userContexts)
Replaces all UserContexts associated with this session with the given
List of UserContexts.
|
public GuacamoleSession(Environment environment, AuthenticatedUser authenticatedUser, List<UserContext> userContexts) throws GuacamoleException
environment
- The environment of the Guacamole server associated with this new
session.authenticatedUser
- The authenticated user to associate this session with.userContexts
- The List of UserContexts to associate with this session.GuacamoleException
- If an error prevents the session from being created.public AuthenticatedUser getAuthenticatedUser()
public void setAuthenticatedUser(AuthenticatedUser authenticatedUser)
authenticatedUser
- The authenticated user to associated with this session.public List<UserContext> getUserContexts()
public void setUserContexts(List<UserContext> userContexts)
userContexts
- The List of UserContexts to associate with this session.public boolean hasTunnels()
public Map<String,GuacamoleTunnel> getTunnels()
public void addTunnel(GuacamoleTunnel tunnel)
tunnel
- The tunnel to associate with this session.public boolean removeTunnel(String uuid)
uuid
- The UUID of the tunnel to disassociate from this session.public void access()
public long getLastAccessedTime()
public void invalidate()
Copyright © 2016. All rights reserved.