|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.rad.server.AbstractObjectProvider
com.sibvisions.rad.server.DefaultObjectProvider
public class DefaultObjectProvider
The DefaultObjectProvider
manages the remote accessible objects. It compiles
source files and offers always the current object.
Nested Class Summary | |
---|---|
static class |
DefaultObjectProvider.ImplicitLifeCycleObject
A marker class. |
Constructor Summary | |
---|---|
protected |
DefaultObjectProvider(Server pServer)
Creates an instance of AbstractObjectProvider . |
Method Summary | |
---|---|
protected java.util.Map |
createInstance(AbstractSession pSession,
java.lang.String pInstanceName)
Creates a new Map instance with a specific class name and, if possible, sets a parent object. |
protected java.util.Map |
getApplicationObject(AbstractSession pSession)
Gets the life-cycle object for an application. |
protected java.lang.ClassLoader |
getClassLoader(AbstractSession pSession)
Gets the classloader for loading LCOs. |
java.lang.Object |
getObject(ISession pSession,
java.lang.String pObjectName)
Returns an object from the life-cycle object container for an ISession . |
IObjectAccessController |
getObjectAccessController()
Gets the object access controller. |
Server |
getServer()
Gets the associated IServer . |
protected java.util.Map |
getSessionObject(ISession pSession)
Gets the life-cycle object for a session. |
boolean |
hasObject(ISession pSession)
Gets whether this object provider contains least one object for the given session. |
java.lang.Object |
invoke(ISession pSession,
java.lang.String pObjectName,
java.lang.String pMethodName,
java.lang.Object... pParams)
Invokes a method from a specific life-cycle object. |
static boolean |
isIsolated(AbstractSession pSession)
Gets whether the given session is isolated. |
protected boolean |
isIsolated(java.lang.Object pInstance)
Gets whether the given object is an isolated object. |
java.lang.Object |
putObject(ISession pSession,
java.lang.String pObjectName,
java.lang.Object pObject)
Puts an object to the life-cycle object container for an ISession . |
void |
sessionCreated(ISession pSession)
Invoked when a session was created and is ready to use. |
void |
sessionDestroyed(ISession pSession)
Invoked when a session was destroyed an can not be used anymore. |
void |
setObjectAccessController(IObjectAccessController pController)
Sets the object access controller. |
protected void |
setParent(ISession pSession,
java.util.Map pInstance,
java.util.Map pParent)
Sets the parent for a LCO. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected DefaultObjectProvider(Server pServer)
AbstractObjectProvider
.
pServer
- communication serverMethod Detail |
---|
public void sessionCreated(ISession pSession)
sessionCreated
in interface ISessionListener
pSession
- the newly created sessionpublic void sessionDestroyed(ISession pSession)
sessionDestroyed
in interface ISessionListener
pSession
- the destroyed sessionpublic java.lang.Object getObject(ISession pSession, java.lang.String pObjectName) throws java.lang.Throwable
ISession
.
getObject
in class AbstractObjectProvider
pSession
- the sessionpObjectName
- the object name (can be an EL)
null
for the life-cycle object container
java.lang.Throwable
- if the life-cycle object is not availablepublic java.lang.Object putObject(ISession pSession, java.lang.String pObjectName, java.lang.Object pObject) throws java.lang.Throwable
ISession
.
putObject
in class AbstractObjectProvider
pSession
- the sessionpObjectName
- the object namepObject
- the object or null
to remove the object
null
if there was no object under the specified name, otherwise the previous object
for the specified name
java.lang.Throwable
- if the life-cycle object is not availablepublic java.lang.Object invoke(ISession pSession, java.lang.String pObjectName, java.lang.String pMethodName, java.lang.Object... pParams) throws java.lang.Throwable
invoke
in class AbstractObjectProvider
pSession
- the sessionpObjectName
- the object namepMethodName
- the method to invokepParams
- the method parameters
java.lang.Throwable
- if the life-cycle object is not available or the method was not foundpublic Server getServer()
IServer
.
getServer
in class AbstractObjectProvider
protected java.util.Map getSessionObject(ISession pSession) throws java.lang.Exception
pSession
- the accessing session
java.lang.Exception
- if the life-cycle object can not be createdpublic boolean hasObject(ISession pSession)
pSession
- the session
true
if this provider contains at least one object for pSession
,
false
otherwiseprotected java.util.Map getApplicationObject(AbstractSession pSession) throws java.lang.Exception
pSession
- the accessing session
java.lang.Exception
- if the life-cycle object can not be createdprotected java.util.Map createInstance(AbstractSession pSession, java.lang.String pInstanceName) throws java.lang.Exception
Map
instance with a specific class name and, if possible, sets a parent object.
pSession
- the calling sessionpInstanceName
- the full qualified class name for the instance
java.lang.Exception
- if the instance can not be createdprotected java.lang.ClassLoader getClassLoader(AbstractSession pSession)
pSession
- the session
null
to use the default class loaderprotected boolean isIsolated(java.lang.Object pInstance)
StrictIsolation
annotation was added.
pInstance
- the object to check
true
if isolated, false
otherwisepublic static boolean isIsolated(AbstractSession pSession)
StrictIsolation
annotation.
pSession
- the session to check
true
if isolated, false
otherwiseprotected void setParent(ISession pSession, java.util.Map pInstance, java.util.Map pParent)
GenericBean
or given parent
is not a Bean
.
pSession
- the current sessionpInstance
- the LCOpParent
- the parentpublic void setObjectAccessController(IObjectAccessController pController)
pController
- the controllerpublic IObjectAccessController getObjectAccessController()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |