net.officefloor.plugin.web.http.application
Class HttpApplicationClassManagedObjectSource.HttpApplicationClassManagedObject

java.lang.Object
  extended by net.officefloor.plugin.web.http.application.HttpApplicationClassManagedObjectSource.HttpApplicationClassManagedObject
All Implemented Interfaces:
CoordinatingManagedObject<HttpApplicationClassManagedObjectSource.Dependencies>, ManagedObject, NameAwareManagedObject
Enclosing class:
HttpApplicationClassManagedObjectSource

public static class HttpApplicationClassManagedObjectSource.HttpApplicationClassManagedObject
extends Object
implements NameAwareManagedObject, CoordinatingManagedObject<HttpApplicationClassManagedObjectSource.Dependencies>

ManagedObject to retrieve the object from the HttpApplicationState.


Constructor Summary
HttpApplicationClassManagedObjectSource.HttpApplicationClassManagedObject(Class<?> objectClass, String bindName)
          Initiate.
 
Method Summary
 Object getObject()
          Obtains the object being managed.
 void loadObjects(ObjectRegistry<HttpApplicationClassManagedObjectSource.Dependencies> registry)
           Loads the Objects of the ManagedObject instances to be referenced by this CoordinatingManagedObject.
 void setBoundManagedObjectName(String boundManagedObjectName)
          Provides the ManagedObject its bound name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HttpApplicationClassManagedObjectSource.HttpApplicationClassManagedObject

public HttpApplicationClassManagedObjectSource.HttpApplicationClassManagedObject(Class<?> objectClass,
                                                                                 String bindName)
Initiate.

Parameters:
objectClass - Class of the object.
bindName - Specific name to bind the object into the HttpApplicationState.
Method Detail

setBoundManagedObjectName

public void setBoundManagedObjectName(String boundManagedObjectName)
Description copied from interface: NameAwareManagedObject
Provides the ManagedObject its bound name.

Specified by:
setBoundManagedObjectName in interface NameAwareManagedObject
Parameters:
boundManagedObjectName - Bound name for the ManagedObject.

loadObjects

public void loadObjects(ObjectRegistry<HttpApplicationClassManagedObjectSource.Dependencies> registry)
                 throws Throwable
Description copied from interface: CoordinatingManagedObject

Loads the Objects of the ManagedObject instances to be referenced by this CoordinatingManagedObject.

References to the loaded Objects must be released on recycling the ManagedObject.

Specified by:
loadObjects in interface CoordinatingManagedObject<HttpApplicationClassManagedObjectSource.Dependencies>
Parameters:
registry - Registry of the Objects for the ManagedObject instances.
Throws:
Throwable - Should this CoordinatingManagedObject fail to load the ManagedObject.

getObject

public Object getObject()
                 throws Throwable
Description copied from interface: ManagedObject
Obtains the object being managed.

Specified by:
getObject in interface ManagedObject
Returns:
Object being managed.
Throws:
Throwable - Indicating failed to obtain the object for use.


Copyright © 2005-2012. All Rights Reserved.