Class HttpSessionObjectManagedObject
- java.lang.Object
-
- net.officefloor.web.session.object.HttpSessionObjectManagedObject
-
- All Implemented Interfaces:
ContextAwareManagedObject,CoordinatingManagedObject<HttpSessionObjectManagedObject.Dependencies>,ManagedObject
public class HttpSessionObjectManagedObject extends java.lang.Object implements ContextAwareManagedObject, CoordinatingManagedObject<HttpSessionObjectManagedObject.Dependencies>
- Author:
- Daniel Sagenschneider
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classHttpSessionObjectManagedObject.DependenciesDependency keys for theHttpSessionObjectManagedObject.
-
Constructor Summary
Constructors Constructor Description HttpSessionObjectManagedObject(java.lang.Class<?> objectClass, java.lang.String bindName)Initiate.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.ObjectgetObject()Obtains the object being managed.voidloadObjects(ObjectRegistry<HttpSessionObjectManagedObject.Dependencies> registry)Loads the Objects of theManagedObjectinstances to be referenced by thisCoordinatingManagedObject.voidsetManagedObjectContext(ManagedObjectContext context)Provides theManagedObjectContextto theManagedObject.
-
-
-
Constructor Detail
-
HttpSessionObjectManagedObject
public HttpSessionObjectManagedObject(java.lang.Class<?> objectClass, java.lang.String bindName)Initiate.- Parameters:
objectClass- Class of the object.bindName- Specific name to bind the object into theHttpSession.
-
-
Method Detail
-
setManagedObjectContext
public void setManagedObjectContext(ManagedObjectContext context)
Description copied from interface:ContextAwareManagedObjectProvides theManagedObjectContextto theManagedObject.- Specified by:
setManagedObjectContextin interfaceContextAwareManagedObject- Parameters:
context-ManagedObjectContext.
-
loadObjects
public void loadObjects(ObjectRegistry<HttpSessionObjectManagedObject.Dependencies> registry) throws java.lang.Throwable
Description copied from interface:CoordinatingManagedObjectLoads the Objects of the
ManagedObjectinstances to be referenced by thisCoordinatingManagedObject.References to the loaded Objects must be released on recycling the
ManagedObject.- Specified by:
loadObjectsin interfaceCoordinatingManagedObject<HttpSessionObjectManagedObject.Dependencies>- Parameters:
registry- Registry of the Objects for theManagedObjectinstances.- Throws:
java.lang.Throwable- Should thisCoordinatingManagedObjectfail to load theManagedObject.
-
getObject
public java.lang.Object getObject() throws java.lang.ThrowableDescription copied from interface:ManagedObjectObtains the object being managed.- Specified by:
getObjectin interfaceManagedObject- Returns:
- Object being managed.
- Throws:
java.lang.Throwable- Indicating failed to obtain the object for use.
-
-