public class HttpSessionAttributeManagedObject extends Object implements NameAwareManagedObject, CoordinatingManagedObject<HttpSessionAttributeManagedObjectSource.HttpSessionAttributeDependencies>, HttpSessionAttribute<Serializable>
ManagedObject
for the HttpSessionAttribute
.Constructor and Description |
---|
HttpSessionAttributeManagedObject() |
Modifier and Type | Method and Description |
---|---|
Object |
getObject()
Obtains the object being managed.
|
Serializable |
getSessionObject()
Obtains the
Object from the HttpSession . |
void |
loadObjects(ObjectRegistry<HttpSessionAttributeManagedObjectSource.HttpSessionAttributeDependencies> registry)
Loads the Objects of the
ManagedObject instances to be referenced
by this CoordinatingManagedObject . |
void |
setBoundManagedObjectName(String boundManagedObjectName)
Provides the
ManagedObject its bound name. |
void |
setSessionObject(Serializable sessionObject)
Sets the
Object into the HttpSession . |
public void setBoundManagedObjectName(String boundManagedObjectName)
NameAwareManagedObject
ManagedObject
its bound name.setBoundManagedObjectName
in interface NameAwareManagedObject
boundManagedObjectName
- Bound name for the ManagedObject
.public void loadObjects(ObjectRegistry<HttpSessionAttributeManagedObjectSource.HttpSessionAttributeDependencies> registry) throws Throwable
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
.
loadObjects
in interface CoordinatingManagedObject<HttpSessionAttributeManagedObjectSource.HttpSessionAttributeDependencies>
registry
- Registry of the Objects for the ManagedObject
instances.Throwable
- Should this CoordinatingManagedObject
fail to load
the ManagedObject
.public Object getObject() throws Throwable
ManagedObject
getObject
in interface ManagedObject
Throwable
- Indicating failed to obtain the object for use.public Serializable getSessionObject()
HttpSessionAttribute
Object
from the HttpSession
.getSessionObject
in interface HttpSessionAttribute<Serializable>
Object
from the HttpSession
. May be
null
if not within the HttpSession
.public void setSessionObject(Serializable sessionObject)
HttpSessionAttribute
Object
into the HttpSession
.setSessionObject
in interface HttpSessionAttribute<Serializable>
sessionObject
- HttpSession
Object
.Copyright © 2005–2016. All rights reserved.