Package net.officefloor.web.state
Class HttpApplicationObjectManagedObjectSource.HttpApplicationObjectManagedObject
- java.lang.Object
-
- net.officefloor.web.state.HttpApplicationObjectManagedObjectSource.HttpApplicationObjectManagedObject
-
- All Implemented Interfaces:
ContextAwareManagedObject
,CoordinatingManagedObject<HttpApplicationObjectManagedObjectSource.Dependencies>
,ManagedObject
- Enclosing class:
- HttpApplicationObjectManagedObjectSource
public static class HttpApplicationObjectManagedObjectSource.HttpApplicationObjectManagedObject extends java.lang.Object implements ContextAwareManagedObject, CoordinatingManagedObject<HttpApplicationObjectManagedObjectSource.Dependencies>
ManagedObject
to retrieve the object from theHttpApplicationState
.
-
-
Constructor Summary
Constructors Constructor Description HttpApplicationObjectManagedObject(java.lang.Class<?> objectClass, java.lang.String bindName)
Initiate.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object
getObject()
Obtains the object being managed.void
loadObjects(ObjectRegistry<HttpApplicationObjectManagedObjectSource.Dependencies> registry)
Loads the Objects of theManagedObject
instances to be referenced by thisCoordinatingManagedObject
.void
setManagedObjectContext(ManagedObjectContext context)
Provides theManagedObjectContext
to theManagedObject
.
-
-
-
Constructor Detail
-
HttpApplicationObjectManagedObject
public HttpApplicationObjectManagedObject(java.lang.Class<?> objectClass, java.lang.String bindName)
Initiate.- Parameters:
objectClass
- Class of the object.bindName
- Specific name to bind the object into theHttpApplicationState
.
-
-
Method Detail
-
setManagedObjectContext
public void setManagedObjectContext(ManagedObjectContext context)
Description copied from interface:ContextAwareManagedObject
Provides theManagedObjectContext
to theManagedObject
.- Specified by:
setManagedObjectContext
in interfaceContextAwareManagedObject
- Parameters:
context
-ManagedObjectContext
.
-
loadObjects
public void loadObjects(ObjectRegistry<HttpApplicationObjectManagedObjectSource.Dependencies> registry) throws java.lang.Throwable
Description copied from interface:CoordinatingManagedObject
Loads the Objects of the
ManagedObject
instances to be referenced by thisCoordinatingManagedObject
.References to the loaded Objects must be released on recycling the
ManagedObject
.- Specified by:
loadObjects
in interfaceCoordinatingManagedObject<HttpApplicationObjectManagedObjectSource.Dependencies>
- Parameters:
registry
- Registry of the Objects for theManagedObject
instances.- Throws:
java.lang.Throwable
- Should thisCoordinatingManagedObject
fail to load theManagedObject
.
-
getObject
public java.lang.Object getObject() throws java.lang.Throwable
Description copied from interface:ManagedObject
Obtains the object being managed.- Specified by:
getObject
in interfaceManagedObject
- Returns:
- Object being managed.
- Throws:
java.lang.Throwable
- Indicating failed to obtain the object for use.
-
-