Package net.officefloor.web.state
Class HttpRequestStateManagedObjectSource
- java.lang.Object
-
- net.officefloor.frame.api.managedobject.source.impl.AbstractAsyncManagedObjectSource<O,F>
-
- net.officefloor.frame.api.managedobject.source.impl.AbstractManagedObjectSource<HttpRequestStateManagedObjectSource.HttpRequestStateDependencies,None>
-
- net.officefloor.web.state.HttpRequestStateManagedObjectSource
-
- All Implemented Interfaces:
ManagedObjectSource<HttpRequestStateManagedObjectSource.HttpRequestStateDependencies,None>
@PrivateSource public class HttpRequestStateManagedObjectSource extends AbstractManagedObjectSource<HttpRequestStateManagedObjectSource.HttpRequestStateDependencies,None>
ManagedObjectSourcefor theHttpRequestState.- Author:
- Daniel Sagenschneider
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classHttpRequestStateManagedObjectSource.HttpRequestStateDependenciesDependency keys.-
Nested classes/interfaces inherited from class net.officefloor.frame.api.managedobject.source.impl.AbstractAsyncManagedObjectSource
AbstractAsyncManagedObjectSource.DependencyLabeller<K extends java.lang.Enum<K>>, AbstractAsyncManagedObjectSource.ExecutionLabeller, AbstractAsyncManagedObjectSource.Labeller<K extends java.lang.Enum<K>>, AbstractAsyncManagedObjectSource.MetaDataContext<O extends java.lang.Enum<O>,F extends java.lang.Enum<F>>, AbstractAsyncManagedObjectSource.SpecificationContext
-
-
Constructor Summary
Constructors Constructor Description HttpRequestStateManagedObjectSource(HttpArgumentParser[] argumentParsers)Instantiate.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static java.io.SerializableexportHttpRequestState(HttpRequestState requestState)Exports a momento for the current state of thisHttpRequestState.protected ManagedObjectgetManagedObject()Synchronously obtains theManagedObject.static voidimportHttpRequestState(java.io.Serializable momento, HttpRequestState requestState)Imports the state from the momento.static voidinitialiseHttpRequestState(HttpArgument pathArguments, HttpRequestState requestState)Initialises theHttpRequestState.protected voidloadMetaData(AbstractAsyncManagedObjectSource.MetaDataContext<HttpRequestStateManagedObjectSource.HttpRequestStateDependencies,None> context)Overridden to load meta-data.protected voidloadSpecification(AbstractAsyncManagedObjectSource.SpecificationContext context)Overridden to load specifications.-
Methods inherited from class net.officefloor.frame.api.managedobject.source.impl.AbstractManagedObjectSource
sourceManagedObject
-
Methods inherited from class net.officefloor.frame.api.managedobject.source.impl.AbstractAsyncManagedObjectSource
getSpecification, init, start, stop
-
-
-
-
Constructor Detail
-
HttpRequestStateManagedObjectSource
public HttpRequestStateManagedObjectSource(HttpArgumentParser[] argumentParsers)
Instantiate.- Parameters:
argumentParsers-HttpArgumentParserinstances.
-
-
Method Detail
-
initialiseHttpRequestState
public static void initialiseHttpRequestState(HttpArgument pathArguments, HttpRequestState requestState)
Initialises theHttpRequestState.- Parameters:
pathArguments- Head pathHttpArgumentof the linked list ofHttpArgumentinstances.requestState-HttpRequestState.
-
importHttpRequestState
public static void importHttpRequestState(java.io.Serializable momento, HttpRequestState requestState) throws java.lang.IllegalArgumentExceptionImports the state from the momento.- Parameters:
momento- Momento containing the state for theHttpRequestState.requestState-HttpRequestState- Throws:
java.lang.IllegalArgumentException- If invalid momento.
-
exportHttpRequestState
public static java.io.Serializable exportHttpRequestState(HttpRequestState requestState)
Exports a momento for the current state of thisHttpRequestState.- Parameters:
requestState-HttpRequestState.- Returns:
- Momento for the current state of this
HttpRequestState.
-
loadSpecification
protected void loadSpecification(AbstractAsyncManagedObjectSource.SpecificationContext context)
Description copied from class:AbstractAsyncManagedObjectSourceOverridden to load specifications.- Specified by:
loadSpecificationin classAbstractAsyncManagedObjectSource<HttpRequestStateManagedObjectSource.HttpRequestStateDependencies,None>- Parameters:
context- Specifications.
-
loadMetaData
protected void loadMetaData(AbstractAsyncManagedObjectSource.MetaDataContext<HttpRequestStateManagedObjectSource.HttpRequestStateDependencies,None> context) throws java.lang.Exception
Description copied from class:AbstractAsyncManagedObjectSourceOverridden to load meta-data.- Specified by:
loadMetaDatain classAbstractAsyncManagedObjectSource<HttpRequestStateManagedObjectSource.HttpRequestStateDependencies,None>- Parameters:
context- Meta-data.- Throws:
java.lang.Exception- If fails to load the meta-data.
-
getManagedObject
protected ManagedObject getManagedObject() throws java.lang.Throwable
Description copied from class:AbstractManagedObjectSourceSynchronously obtains theManagedObject.- Specified by:
getManagedObjectin classAbstractManagedObjectSource<HttpRequestStateManagedObjectSource.HttpRequestStateDependencies,None>- Returns:
ManagedObject.- Throws:
java.lang.Throwable- If fails to obtain theManagedObject.
-
-