Class AbstractSendHttpFileFunction<R>
- java.lang.Object
-
- net.officefloor.frame.api.function.StaticManagedFunction<AbstractSendHttpFileFunction.Dependencies,AbstractSendHttpFileFunction.Flows>
-
- net.officefloor.web.resource.source.AbstractSendHttpFileFunction<R>
-
- All Implemented Interfaces:
ManagedFunction<AbstractSendHttpFileFunction.Dependencies,AbstractSendHttpFileFunction.Flows>,ManagedFunctionFactory<AbstractSendHttpFileFunction.Dependencies,AbstractSendHttpFileFunction.Flows>
- Direct Known Subclasses:
SendCachedHttpFileFunction,SendStoreHttpFileFunction
public abstract class AbstractSendHttpFileFunction<R> extends StaticManagedFunction<AbstractSendHttpFileFunction.Dependencies,AbstractSendHttpFileFunction.Flows>
AbstractManagedFunctionto sendHttpFile.- Author:
- Daniel Sagenschneider
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classAbstractSendHttpFileFunction.DependenciesDependency keys.static classAbstractSendHttpFileFunction.FlowsFlowkeys.
-
Constructor Summary
Constructors Constructor Description AbstractSendHttpFileFunction(java.lang.String contextPath)Instantiate.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidexecute(ManagedFunctionContext<AbstractSendHttpFileFunction.Dependencies,AbstractSendHttpFileFunction.Flows> context)Executes the function.protected abstract HttpResourcegetHttpResource(R resources, java.lang.String resourcePath)Obtains theHttpResource.-
Methods inherited from class net.officefloor.frame.api.function.StaticManagedFunction
createManagedFunction
-
-
-
-
Method Detail
-
getHttpResource
protected abstract HttpResource getHttpResource(R resources, java.lang.String resourcePath) throws java.io.IOException
Obtains theHttpResource.- Parameters:
resources- Resources.resourcePath- Path to theHttpResource.- Returns:
HttpResource.- Throws:
java.io.IOException- If fails to obtain theHttpResource.
-
execute
public void execute(ManagedFunctionContext<AbstractSendHttpFileFunction.Dependencies,AbstractSendHttpFileFunction.Flows> context) throws java.lang.Throwable
Description copied from interface:ManagedFunctionExecutes the function.- Parameters:
context-ManagedFunctionContextfor theManagedFunction.- Throws:
java.lang.Throwable- Indicating failure of theManagedFunction.
-
-