javax.rad.server
Class AbstractObjectProvider

java.lang.Object
  extended by javax.rad.server.AbstractObjectProvider
Direct Known Subclasses:
DefaultObjectProvider

public abstract class AbstractObjectProvider
extends Object

An AbstractObjectProvider handles the access to the life-cycle objects for all sessions. A life-cycle object holds references to the server-side objects which are available for the client within a specific session.


Constructor Summary
protected AbstractObjectProvider(IServer pServer)
          Creates a new instance of AbstractObjectProvider for a specific IServer.
 
Method Summary
abstract  Object getObject(ISession pSession, String pObjectName)
          Returns an object from the life-cycle object container for an ISession.
 IServer getServer()
          Gets the associated IServer.
abstract  Object invoke(ISession pSession, String pObjectName, String pMethodName, Object... pParams)
          Invokes a method from a specific life-cycle object.
abstract  Object putObject(ISession pSession, String pObjectName, Object pObject)
          Puts an object to the life-cycle object container for an ISession.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractObjectProvider

protected AbstractObjectProvider(IServer pServer)
Creates a new instance of AbstractObjectProvider for a specific IServer.

Parameters:
pServer - the server
Method Detail

getObject

public abstract Object getObject(ISession pSession,
                                 String pObjectName)
                          throws Throwable
Returns an object from the life-cycle object container for an ISession.

Parameters:
pSession - the session
pObjectName - the object name (can be an EL)
Returns:
the object for the session or null for the life-cycle object container
Throws:
Throwable - if the life-cycle object is not available

putObject

public abstract Object putObject(ISession pSession,
                                 String pObjectName,
                                 Object pObject)
                          throws Throwable
Puts an object to the life-cycle object container for an ISession.

Parameters:
pSession - the session
pObjectName - the object name
pObject - the object or null to remove the object
Returns:
null if there was no object under the specified name, otherwise the previous object for the specified name
Throws:
Throwable - if the life-cycle object is not available

invoke

public abstract Object invoke(ISession pSession,
                              String pObjectName,
                              String pMethodName,
                              Object... pParams)
                       throws Throwable
Invokes a method from a specific life-cycle object.

Parameters:
pSession - the session
pObjectName - the object name
pMethodName - the method to invoke
pParams - the method parameters
Returns:
the return value of the invoked method
Throws:
Throwable - if the life-cycle object is not available or the method was not found

getServer

public IServer getServer()
Gets the associated IServer.

Returns:
the server


Copyright © 2009 SIB Visions GmbH. All Rights Reserved.