Package net.officefloor.web.session
Class HttpSessionManagedObject
java.lang.Object
net.officefloor.web.session.HttpSessionManagedObject
- All Implemented Interfaces:
AsynchronousManagedObject,ContextAwareManagedObject,CoordinatingManagedObject<Indexed>,ManagedObject
public class HttpSessionManagedObject
extends Object
implements CoordinatingManagedObject<Indexed>, AsynchronousManagedObject, ContextAwareManagedObject
ManagedObject for a HttpSession.- Author:
- Daniel Sagenschneider
-
Constructor Summary
ConstructorsConstructorDescriptionHttpSessionManagedObject(String sessionIdCookieName, int serverHttpConnectionIndex, int httpSessionIdGeneratorIndex, HttpSessionIdGenerator httpSessionIdGenerator, int httpSessionStoreIndex, HttpSessionStore httpSessionStore) Initiate. -
Method Summary
Modifier and TypeMethodDescriptionObtains the object being managed.voidloadObjects(ObjectRegistry<Indexed> registry) Loads the Objects of theManagedObjectinstances to be referenced by thisCoordinatingManagedObject.voidsetAsynchronousContext(AsynchronousContext asynchronousContext) Provides theAsynchronousContextto theAsynchronousManagedObjectto enable call back to notify state and completion of asynchronous processing.voidProvides theManagedObjectContextto theManagedObject.
-
Constructor Details
-
HttpSessionManagedObject
public HttpSessionManagedObject(String sessionIdCookieName, int serverHttpConnectionIndex, int httpSessionIdGeneratorIndex, HttpSessionIdGenerator httpSessionIdGenerator, int httpSessionStoreIndex, HttpSessionStore httpSessionStore) Initiate.- Parameters:
sessionIdCookieName- Name of theHttpCookiecontaining the Session Id.serverHttpConnectionIndex- Index of the dependencyServerHttpConnection.httpSessionIdGeneratorIndex- Index of the dependencyHttpSessionIdGenerator.httpSessionIdGenerator-HttpSessionIdGenerator.nullto obtain via dependency.httpSessionStoreIndex- Index of the dependencyHttpSessionStore.httpSessionStore-HttpSessionStore.nullto obtain via dependency.
-
-
Method Details
-
setManagedObjectContext
Description copied from interface:ContextAwareManagedObjectProvides theManagedObjectContextto theManagedObject.- Specified by:
setManagedObjectContextin interfaceContextAwareManagedObject- Parameters:
context-ManagedObjectContext.
-
setAsynchronousContext
Description copied from interface:AsynchronousManagedObjectProvides theAsynchronousContextto theAsynchronousManagedObjectto enable call back to notify state and completion of asynchronous processing.- Specified by:
setAsynchronousContextin interfaceAsynchronousManagedObject- Parameters:
asynchronousContext-AsynchronousContext.
-
loadObjects
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<Indexed>- Parameters:
registry- Registry of the Objects for theManagedObjectinstances.- Throws:
Throwable- Should thisCoordinatingManagedObjectfail to load theManagedObject.
-
getObject
Description copied from interface:ManagedObjectObtains the object being managed.- Specified by:
getObjectin interfaceManagedObject- Returns:
- Object being managed.
- Throws:
Throwable- Indicating failed to obtain the object for use.
-