Package net.officefloor.web.response
Class ObjectResponseManagedObjectSource
- java.lang.Object
-
- net.officefloor.frame.api.managedobject.source.impl.AbstractAsyncManagedObjectSource<O,F>
-
- net.officefloor.frame.api.managedobject.source.impl.AbstractManagedObjectSource<ObjectResponseManagedObjectSource.ObjectResponseDependencies,None>
-
- net.officefloor.web.response.ObjectResponseManagedObjectSource
-
- All Implemented Interfaces:
ManagedObjectSource<ObjectResponseManagedObjectSource.ObjectResponseDependencies,None>,HttpEscalationHandler
@PrivateSource public class ObjectResponseManagedObjectSource extends AbstractManagedObjectSource<ObjectResponseManagedObjectSource.ObjectResponseDependencies,None> implements HttpEscalationHandler
ManagedObjectSourcefor theObjectResponse.- Author:
- Daniel Sagenschneider
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceObjectResponseManagedObjectSource.DefaultHttpObjectResponderObtains the defaultHttpObjectResponderFactory.static classObjectResponseManagedObjectSource.ObjectResponseDependenciesDependency 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 ObjectResponseManagedObjectSource(HttpStatus httpStatus, java.util.List<HttpObjectResponderFactory> objectResponderFactories, ObjectResponseManagedObjectSource.DefaultHttpObjectResponder defaultHttpObjectResponder)Instantiate.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected ManagedObjectgetManagedObject()Synchronously obtains theManagedObject.booleanhandle(HttpEscalationContext context)Handles theEscalation.protected voidloadMetaData(AbstractAsyncManagedObjectSource.MetaDataContext<ObjectResponseManagedObjectSource.ObjectResponseDependencies,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
-
ObjectResponseManagedObjectSource
public ObjectResponseManagedObjectSource(HttpStatus httpStatus, java.util.List<HttpObjectResponderFactory> objectResponderFactories, ObjectResponseManagedObjectSource.DefaultHttpObjectResponder defaultHttpObjectResponder)
Instantiate.- Parameters:
httpStatus-HttpStatus.objectResponderFactories-ListofHttpObjectResponderFactoryinstances.defaultHttpObjectResponder-ObjectResponseManagedObjectSource.DefaultHttpObjectResponder.
-
-
Method Detail
-
loadSpecification
protected void loadSpecification(AbstractAsyncManagedObjectSource.SpecificationContext context)
Description copied from class:AbstractAsyncManagedObjectSourceOverridden to load specifications.- Specified by:
loadSpecificationin classAbstractAsyncManagedObjectSource<ObjectResponseManagedObjectSource.ObjectResponseDependencies,None>- Parameters:
context- Specifications.
-
loadMetaData
protected void loadMetaData(AbstractAsyncManagedObjectSource.MetaDataContext<ObjectResponseManagedObjectSource.ObjectResponseDependencies,None> context) throws java.lang.Exception
Description copied from class:AbstractAsyncManagedObjectSourceOverridden to load meta-data.- Specified by:
loadMetaDatain classAbstractAsyncManagedObjectSource<ObjectResponseManagedObjectSource.ObjectResponseDependencies,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<ObjectResponseManagedObjectSource.ObjectResponseDependencies,None>- Returns:
ManagedObject.- Throws:
java.lang.Throwable- If fails to obtain theManagedObject.
-
handle
public boolean handle(HttpEscalationContext context) throws java.io.IOException
Description copied from interface:HttpEscalationHandlerHandles theEscalation.- Specified by:
handlein interfaceHttpEscalationHandler- Parameters:
context-HttpEscalationContext.- Returns:
trueif handledEscalationinto theHttpResponse.falseif not able to handle the particularEscalation.- Throws:
java.io.IOException- If fails to write theEscalation.
-
-