|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sibvisions.rad.server.AbstractSessionContext.WrappedSession
protected static final class AbstractSessionContext.WrappedSession
The WrappedSession allows restricted access to the
AbstractSession.
| Field Summary | |
|---|---|
protected AbstractSession |
session
the "hidden" session. |
| Constructor Summary | |
|---|---|
protected |
AbstractSessionContext.WrappedSession(AbstractSession pSession)
Creates a new instance of WrappedSession for an ISession. |
| 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. |
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. |
protected IServer |
getServer()
Gets the referenced server. |
protected IConfiguration |
getServerConfig()
Gets the server configuration. |
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 |
setProperty(String pName,
Object pValue)
Sets the value of a property. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected final AbstractSession session
| Constructor Detail |
|---|
protected AbstractSessionContext.WrappedSession(AbstractSession pSession)
WrappedSession for an ISession.
pSession - an ISession implementation| Method Detail |
|---|
public Object getId()
getId in interface ISessionpublic String getLifeCycleName()
getLifeCycleName in interface ISessionpublic String getApplicationName()
getApplicationName in interface ISessionpublic String getUserName()
getUserName in interface ISessionpublic String getPassword()
getPassword in interface ISessionpublic Object getProperty(String pName)
getProperty in interface ISessionpName - the property name
null if the property is not availablepublic Hashtable<String,Object> getProperties()
getProperties in interface ISessionHashtable with property names and values
public void setProperty(String pName,
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 getLastAccessTime()
getLastAccessTime in interface ISessionpublic long getLastAliveTime()
getLastAliveTime in interface ISessionpublic void setAliveInterval(long pAliveInterval)
setAliveInterval in interface ISessionpAliveInterval - the alive interval (client-side)public long getAliveInterval()
getAliveInterval in interface ISessionpublic boolean isAlive(long pAccessTime)
isAlive in interface ISessionpAccessTime - current access time
true if the session is aliveISession.getLastAliveTime(),
ISession.getAliveInterval()public void setMaxInactiveInterval(int pMaxInactiveInterval)
setMaxInactiveInterval in interface ISessionpMaxInactiveInterval - time in minutespublic int getMaxInactiveInterval()
setMaxInactiveInterval method. A zero or negative time indicates the session should never be inactive.
getMaxInactiveInterval in interface ISessionISession.setMaxInactiveInterval(int)public boolean isInactive(long pAccessTime)
isInactive in interface ISessionpAccessTime - current access time
true if the session is inactiveISession.getMaxInactiveInterval(),
ISession.getLastAccessTime()
public Object call(String pObjectName,
String pMethod,
Object... pParams)
throws Throwable
call in interface ISessionpObjectName - 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 allowed
public Object callAction(String pAction,
Object... pParams)
throws Throwable
callAction in interface ISessionpAction - action which should be calledpParams - the parameters for the action call
Throwable - communication error, security checks, invalid action, ...
public Object get(String pObjectName)
throws Throwable
get in interface ISessionpObjectName - the object name
Throwable - if the object was not found or an error occured during object creation
public Object put(String pObjectName,
Object pObject)
throws Throwable
put in interface ISessionpObjectName - the object namepObject - the object
Throwable - if an unknown error occurs while putting the objectpublic IConfiguration getConfig()
IConfiguration of the session.
getConfig in interface ISessionprotected IConfiguration getServerConfig()
protected IServer getServer()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||