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>
AbstractManagedFunction
to sendHttpFile
.- Author:
- Daniel Sagenschneider
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
AbstractSendHttpFileFunction.Dependencies
Dependency keys.static class
AbstractSendHttpFileFunction.Flows
Flow
keys.
-
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 void
execute(ManagedFunctionContext<AbstractSendHttpFileFunction.Dependencies,AbstractSendHttpFileFunction.Flows> context)
Executes the function.protected abstract HttpResource
getHttpResource(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:ManagedFunction
Executes the function.- Parameters:
context
-ManagedFunctionContext
for theManagedFunction
.- Throws:
java.lang.Throwable
- Indicating failure of theManagedFunction
.
-
-