|
||||||||||
| 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(java.lang.String pApplicationName)
Creates a new instance of DetachedSession for a specific application. |
|
| Method Summary | |
|---|---|
java.lang.Object |
call(java.lang.String pObjectName,
java.lang.String pMethod,
java.lang.Object... pParams)
Executes a method from an object in the life-cycle object. |
java.lang.Object |
callAction(java.lang.String pAction,
java.lang.Object... pParams)
Executes an action from the life-cycle object. |
protected void |
finalize()
|
java.lang.Object |
get(java.lang.String pObjectName)
Gets an object from the life-cycle object. |
long |
getAliveInterval()
Gets the desired client-side communication interval for this session. |
java.lang.String |
getApplicationName()
Gets the associated application name of the session. |
IConfiguration |
getConfig()
Gets the IConfiguration of the session. |
java.lang.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. |
java.lang.String |
getLifeCycleName()
Gets the name of the life-cycle object. |
int |
getMaxInactiveInterval()
Returns the maximum time interval, in seconds, that this session will be active. |
java.lang.String |
getPassword()
Gets the sessions password. |
java.util.Hashtable<java.lang.String,java.lang.Object> |
getProperties()
Gets all properties. |
java.lang.Object |
getProperty(java.lang.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. |
java.lang.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. |
java.lang.Object |
put(java.lang.String pObjectName,
java.lang.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 seconds, before the session will be inactive. |
void |
setPassword(java.lang.String pPassword)
Sets the password. |
void |
setProperty(java.lang.String pName,
java.lang.Object pValue)
Sets the value of a property. |
void |
setUserName(java.lang.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(java.lang.String pApplicationName)
throws java.lang.Exception
DetachedSession for a specific application.
pApplicationName - the application
java.lang.Exception - if session creation fails because of security manager validation or
if the application is invalid/unknown| Method Detail |
|---|
public java.lang.Object getId()
getId in interface ISessionpublic java.lang.String getApplicationName()
getApplicationName in interface ISessionpublic java.lang.String getUserName()
getUserName in interface ISessionpublic java.lang.String getPassword()
getPassword in interface ISession
public java.lang.Object put(java.lang.String pObjectName,
java.lang.Object pObject)
put in interface ISessionpObjectName - the object namepObject - the object
public java.lang.Object get(java.lang.String pObjectName)
throws java.lang.Throwable
get in interface ISessionpObjectName - the object name
java.lang.Throwable - if the object was not found or an error occured during object creation
public java.lang.Object call(java.lang.String pObjectName,
java.lang.String pMethod,
java.lang.Object... pParams)
throws java.lang.Throwable
call in interface ISessionpObjectName - list of already mapped server object name/aliaspMethod - method name which should be calledpParams - parameters for the method call
java.lang.Throwable - if the object identified by pObjectName was found but can not be created
java.lang.SecurityException - if the method call is not allowed
public java.lang.Object callAction(java.lang.String pAction,
java.lang.Object... pParams)
throws java.lang.Throwable
callAction in interface ISessionpAction - action which should be calledpParams - the parameters for the action call
java.lang.Throwable - communication error, security checks, invalid action, ...public IConfiguration getConfig()
IConfiguration of the session.
getConfig in interface ISessionpublic long getLastAccessTime()
getLastAccessTime in interface ISessionpublic long getLastAliveTime()
getLastAliveTime in interface ISessionpublic java.lang.String getLifeCycleName()
getLifeCycleName in interface ISessionpublic java.util.Hashtable<java.lang.String,java.lang.Object> getProperties()
getProperties in interface ISessionHashtable with property names and valuespublic java.lang.Object getProperty(java.lang.String pName)
getProperty in interface ISessionpName - the property name
null if the property is not available
public void setProperty(java.lang.String pName,
java.lang.Object pValue)
setProperty in interface ISessionpName - the property namepValue - the value for the property or null to delete the propertypublic long getStartTime()
getStartTime in interface ISessionpublic long getAliveInterval()
getAliveInterval in interface ISessionpublic void setAliveInterval(long pAliveInterval)
setAliveInterval in interface ISessionpAliveInterval - 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 ISessionISession.setMaxInactiveInterval(int)public void setMaxInactiveInterval(int pMaxInactiveInterval)
setMaxInactiveInterval in interface ISessionpMaxInactiveInterval - time in secondspublic boolean isAlive(long pAccessTime)
isAlive in interface ISessionpAccessTime - current access time
true if the session is aliveISession.getLastAliveTime(),
ISession.getAliveInterval()public boolean isInactive(long pAccessTime)
isInactive in interface ISessionpAccessTime - current access time
true if the session is inactiveISession.getMaxInactiveInterval(),
ISession.getLastAccessTime()
protected void finalize()
throws java.lang.Throwable
finalize in class java.lang.Objectjava.lang.Throwablepublic void setUserName(java.lang.String pUserName)
pUserName - the user namepublic void setPassword(java.lang.String pPassword)
pPassword - the password
public ISecurityManager getSecurityManager()
throws java.lang.Exception
java.lang.Exception - if creation fails
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||