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>
ManagedObjectSource for the HttpRequestState.- Author:
- Daniel Sagenschneider
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumDependency keys.Nested classes/interfaces inherited from class net.officefloor.frame.api.managedobject.source.impl.AbstractAsyncManagedObjectSource
AbstractAsyncManagedObjectSource.DependencyLabeller<K extends Enum<K>>, AbstractAsyncManagedObjectSource.ExecutionLabeller, AbstractAsyncManagedObjectSource.Labeller<K extends Enum<K>>, AbstractAsyncManagedObjectSource.MetaDataContext<O extends Enum<O>,F extends Enum<F>>, AbstractAsyncManagedObjectSource.SpecificationContext -
Constructor Summary
ConstructorsConstructorDescriptionHttpRequestStateManagedObjectSource(HttpArgumentParser[] argumentParsers) Instantiate. -
Method Summary
Modifier and TypeMethodDescriptionstatic SerializableexportHttpRequestState(HttpRequestState requestState) Exports a momento for the current state of thisHttpRequestState.protected ManagedObjectSynchronously obtains theManagedObject.static voidimportHttpRequestState(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 voidOverridden to load specifications.Methods inherited from class net.officefloor.frame.api.managedobject.source.impl.AbstractManagedObjectSource
sourceManagedObjectMethods inherited from class net.officefloor.frame.api.managedobject.source.impl.AbstractAsyncManagedObjectSource
getSpecification, init, start, stop
-
Constructor Details
-
HttpRequestStateManagedObjectSource
Instantiate.- Parameters:
argumentParsers-HttpArgumentParserinstances.
-
-
Method Details
-
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(Serializable momento, HttpRequestState requestState) throws IllegalArgumentException Imports the state from the momento.- Parameters:
momento- Momento containing the state for theHttpRequestState.requestState-HttpRequestState- Throws:
IllegalArgumentException- If invalid momento.
-
exportHttpRequestState
Exports a momento for the current state of thisHttpRequestState.- Parameters:
requestState-HttpRequestState.- Returns:
- Momento for the current state of this
HttpRequestState.
-
loadSpecification
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 ExceptionDescription copied from class:AbstractAsyncManagedObjectSourceOverridden to load meta-data.- Specified by:
loadMetaDatain classAbstractAsyncManagedObjectSource<HttpRequestStateManagedObjectSource.HttpRequestStateDependencies,None> - Parameters:
context- Meta-data.- Throws:
Exception- If fails to load the meta-data.
-
getManagedObject
Description copied from class:AbstractManagedObjectSourceSynchronously obtains theManagedObject.- Specified by:
getManagedObjectin classAbstractManagedObjectSource<HttpRequestStateManagedObjectSource.HttpRequestStateDependencies,None> - Returns:
ManagedObject.- Throws:
Throwable- If fails to obtain theManagedObject.
-