|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sibvisions.rad.server.DetachedSession
public class DetachedSession
The DetachedSession
is an ISession
. It allows access to a specific application
with all its properties but has no connection to the server or other server objects. It has no
builtin support for the SessionContext
.
The DetachedSession
is not bound to a DefaultSessionManager
and does not fire session
created or destroyed events. It is also not validated against the configured security manager.
Constructor Summary | |
---|---|
DetachedSession(String pApplicationName)
Creates a new instance of DetachedSession for a specific application. |
Method Summary | |
---|---|
Object |
call(String pObjectName,
String pMethod,
Object... pParams)
Executes a method from an object in the life-cycle object. |
Object |
callAction(String pAction,
Object... pParams)
Executes an action from the life-cycle object. |
protected void |
finalize()
|
Object |
get(String pObjectName)
Gets an object from the life-cycle object. |
long |
getAliveInterval()
Gets the desired client-side communication interval for this session. |
String |
getApplicationName()
Gets the associated application name of the session. |
IConfiguration |
getConfig()
Gets the IConfiguration of the session. |
Object |
getId()
Gets the session identifier. |
long |
getLastAccessTime()
Gets the time of the last session access. |
long |
getLastAliveTime()
Gets the time of the last communication of the session. |
String |
getLifeCycleName()
Gets the name of the life-cycle object. |
int |
getMaxInactiveInterval()
Returns the maximum time interval, in minutes, that this session will be active. |
String |
getPassword()
Gets the sessions password. |
Hashtable<String,Object> |
getProperties()
Gets all properties. |
Object |
getProperty(String pName)
Gets the value of a property. |
ISecurityManager |
getSecurityManager()
Gets the security manager for this session. |
long |
getStartTime()
Gets the session start/create time. |
String |
getUserName()
Gets the sessions user name. |
boolean |
isAlive(long pAccessTime)
Checks if the session is alive. |
boolean |
isInactive(long pAccessTime)
Checks if the session is inactive. |
Object |
put(String pObjectName,
Object pObject)
Puts an object to the life-cycle object. |
void |
setAliveInterval(long pAliveInterval)
Sets the desired client-side communication interval for this session. |
void |
setMaxInactiveInterval(int pMaxInactiveInterval)
Specifies the time, in minutes, between access before the session will be inactive. |
void |
setPassword(String pPassword)
Sets the password. |
void |
setProperty(String pName,
Object pValue)
Sets the value of a property. |
void |
setUserName(String pUserName)
Sets the username. |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DetachedSession(String pApplicationName) throws Exception
DetachedSession
for a specific application.
pApplicationName
- the application
Exception
- if session creation fails because of security manager validation or
if the application is invalid/unknownMethod Detail |
---|
public Object getId()
getId
in interface ISession
public String getApplicationName()
getApplicationName
in interface ISession
public String getUserName()
getUserName
in interface ISession
public String getPassword()
getPassword
in interface ISession
public Object put(String pObjectName, Object pObject)
put
in interface ISession
pObjectName
- the object namepObject
- the object
public Object get(String pObjectName) throws Throwable
get
in interface ISession
pObjectName
- the object name
Throwable
- if the object was not found or an error occured during object creationpublic Object call(String pObjectName, String pMethod, Object... pParams) throws Throwable
call
in interface ISession
pObjectName
- list of already mapped server object name/aliaspMethod
- method name which should be calledpParams
- parameters for the method call
Throwable
- if the object identified by pObjectName
was found but can not be created
SecurityException
- if the method call is not allowedpublic Object callAction(String pAction, Object... pParams) throws Throwable
callAction
in interface ISession
pAction
- action which should be calledpParams
- the parameters for the action call
Throwable
- communication error, security checks, invalid action, ...public IConfiguration getConfig()
IConfiguration
of the session.
getConfig
in interface ISession
public long getLastAccessTime()
getLastAccessTime
in interface ISession
public long getLastAliveTime()
getLastAliveTime
in interface ISession
public String getLifeCycleName()
getLifeCycleName
in interface ISession
public Hashtable<String,Object> getProperties()
getProperties
in interface ISession
Hashtable
with property names and valuespublic Object getProperty(String pName)
getProperty
in interface ISession
pName
- the property name
null
if the property is not availablepublic void setProperty(String pName, Object pValue)
setProperty
in interface ISession
pName
- the property namepValue
- the value for the property or null
to delete the propertypublic long getStartTime()
getStartTime
in interface ISession
public long getAliveInterval()
getAliveInterval
in interface ISession
public void setAliveInterval(long pAliveInterval)
setAliveInterval
in interface ISession
pAliveInterval
- the alive interval (client-side)public int getMaxInactiveInterval()
setMaxInactiveInterval
method. A zero or negative time indicates the session should never be inactive.
getMaxInactiveInterval
in interface ISession
ISession.setMaxInactiveInterval(int)
public void setMaxInactiveInterval(int pMaxInactiveInterval)
setMaxInactiveInterval
in interface ISession
pMaxInactiveInterval
- time in minutespublic boolean isAlive(long pAccessTime)
isAlive
in interface ISession
pAccessTime
- current access time
true
if the session is aliveISession.getLastAliveTime()
,
ISession.getAliveInterval()
public boolean isInactive(long pAccessTime)
isInactive
in interface ISession
pAccessTime
- current access time
true
if the session is inactiveISession.getMaxInactiveInterval()
,
ISession.getLastAccessTime()
protected void finalize() throws Throwable
finalize
in class Object
Throwable
public void setUserName(String pUserName)
pUserName
- the user namepublic void setPassword(String pPassword)
pPassword
- the passwordpublic ISecurityManager getSecurityManager() throws Exception
Exception
- if creation fails
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |