|
||||||||||
| 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 Map |
createInstance(AbstractSession pSession,
String pInstanceName)
Creates a new Map instance with a specific class name and, if possible, sets a parent object. |
protected Map |
getApplicationObject(AbstractSession pSession)
Gets the life-cycle object for an application. |
protected ClassLoader |
getClassLoader(AbstractSession pSession)
Gets the classloader for loading LCOs. |
Object |
getObject(ISession pSession,
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 Map |
getSessionObject(ISession pSession)
Gets the life-cycle object for a session. |
Object |
invoke(ISession pSession,
String pObjectName,
String pMethodName,
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(Object pInstance)
Gets whether the given object is an isolated object. |
Object |
putObject(ISession pSession,
String pObjectName,
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,
Map pInstance,
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 server| Method Detail |
|---|
public void sessionCreated(ISession pSession)
sessionCreated in interface ISessionListenerpSession - the newly created sessionpublic void sessionDestroyed(ISession pSession)
sessionDestroyed in interface ISessionListenerpSession - the destroyed session
public Object getObject(ISession pSession,
String pObjectName)
throws Throwable
ISession.
getObject in class AbstractObjectProviderpSession - the sessionpObjectName - the object name (can be an EL)
null for the life-cycle object container
Throwable - if the life-cycle object is not available
public Object putObject(ISession pSession,
String pObjectName,
Object pObject)
throws Throwable
ISession.
putObject in class AbstractObjectProviderpSession - 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
Throwable - if the life-cycle object is not available
public Object invoke(ISession pSession,
String pObjectName,
String pMethodName,
Object... pParams)
throws Throwable
invoke in class AbstractObjectProviderpSession - the sessionpObjectName - the object namepMethodName - the method to invokepParams - the method parameters
Throwable - if the life-cycle object is not available or the method was not foundpublic Server getServer()
IServer.
getServer in class AbstractObjectProvider
protected Map getSessionObject(ISession pSession)
throws Exception
pSession - the accessing session
Exception - if the life-cycle object can not be created
protected Map getApplicationObject(AbstractSession pSession)
throws Exception
pSession - the accessing session
Exception - if the life-cycle object can not be created
protected Map createInstance(AbstractSession pSession,
String pInstanceName)
throws 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
Exception - if the instance can not be createdprotected ClassLoader getClassLoader(AbstractSession pSession)
pSession - the session
null to use the default class loaderprotected boolean isIsolated(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 otherwise
protected void setParent(ISession pSession,
Map pInstance,
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 | |||||||||