|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.rad.server.SessionContext
public abstract class SessionContext
A SessionContext
contains all of the per-request state information related to the processing
of a single server call. It is passed to, and potentially modified by, each phase of the request processing
lifecycle.
Constructor Summary | |
---|---|
SessionContext()
|
Method Summary | |
---|---|
protected abstract void |
destroy()
Destroyes any resources associated with this SessionContext instance. |
static SessionContext |
getCurrentInstance()
Gets the current/last instance of SessionContext . |
static IConfiguration |
getCurrentServerConfig()
Gets the IConfiguration from the current instance of SessionContext . |
static ISession |
getCurrentSession()
Gets the ISession from the current instance of SessionContext . |
static IConfiguration |
getCurrentSessionConfig()
Gets the IConfiguration from the current instance of SessionContext . |
abstract String |
getMethodName()
Gets the name of the method which will be called. |
SessionContext |
getNextContext()
Gets the next SessionContext, if available. |
abstract InjectObject |
getObject(String pName)
Gets an already added inject object. |
abstract String |
getObjectName()
Gets the name of the object from which a method will be called. |
SessionContext |
getPreviousContext()
Gets the previous SessionContext, if available. |
abstract IConfiguration |
getServerConfig()
Gets the server IConfiguration . |
abstract IConnection |
getServerConnection()
Gets a connection to the server. |
abstract ISession |
getSession()
Gets the ISession instance for this context. |
abstract IConfiguration |
getSessionConfig()
Gets the IConfiguration for the session. |
boolean |
isReleased()
Gets the release state of this SessionContext . |
abstract InjectObject |
putObject(InjectObject pObject)
Puts an object to this SessionContext . |
InjectObject |
putObject(String pName,
Object pObject)
Puts an object with a specific name to this SessionContext . |
void |
release()
Release any resources associated with this SessionContext instance. |
abstract InjectObject |
removeObject(InjectObject pObject)
Removes an inject object from this SessionContext . |
InjectObject |
removeObject(String pName)
Removes an inject object from this SessionContext . |
protected void |
setCurrentInstance(SessionContext pContext)
Sets the current SessionContext instance. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SessionContext()
Method Detail |
---|
protected abstract void destroy()
public abstract ISession getSession()
ISession
instance for this context.
ISession
instancepublic abstract IConfiguration getSessionConfig()
IConfiguration
for the session.
IConfiguration
public abstract IConfiguration getServerConfig()
IConfiguration
.
IConfiguration
public abstract IConnection getServerConnection()
public abstract String getObjectName()
SessionContext
will be initialized through a method call with or without object name. The method call without
object name is known as action call.
null
if an action will be calledgetMethodName()
public abstract String getMethodName()
public abstract InjectObject putObject(InjectObject pObject)
SessionContext
.
pObject
- the inject object
null
if the object was not knownpublic abstract InjectObject removeObject(InjectObject pObject)
SessionContext
.
pObject
- the inject object
null
if the object was not putpublic abstract InjectObject getObject(String pName)
pName
- the object name
null
if there is no object with the pName
public void release()
isReleased()
public static SessionContext getCurrentInstance()
SessionContext
.
public static ISession getCurrentSession()
ISession
from the current instance of SessionContext
.
ISession
public static IConfiguration getCurrentSessionConfig()
IConfiguration
from the current instance of SessionContext
.
IConfiguration
public static IConfiguration getCurrentServerConfig()
IConfiguration
from the current instance of SessionContext
.
IConfiguration
public boolean isReleased()
SessionContext
.
true
if there is no current instance of SessionContext
(means
that the SessionContext
is released); otherwise false
protected void setCurrentInstance(SessionContext pContext)
null
as parameter for the current instance.
pContext
- the current SessionContext
or null
to unset the current
instancepublic InjectObject putObject(String pName, Object pObject)
SessionContext
.
pName
- the object namepObject
- the object or null
to remove the object with pName
null
if the object was not putpublic InjectObject removeObject(String pName)
SessionContext
.
pName
- the name of the inject object
null
if the object was not putpublic SessionContext getPreviousContext()
null
if there is no previous created contextpublic SessionContext getNextContext()
null
if this context is the current context
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |