Package net.officefloor.web
Class HttpRouteFunction
- java.lang.Object
-
- net.officefloor.web.HttpRouteFunction
-
- All Implemented Interfaces:
ManagedFunction<HttpRouteFunction.HttpRouteDependencies,Indexed>,ManagedFunctionFactory<HttpRouteFunction.HttpRouteDependencies,Indexed>
public class HttpRouteFunction extends java.lang.Object implements ManagedFunctionFactory<HttpRouteFunction.HttpRouteDependencies,Indexed>, ManagedFunction<HttpRouteFunction.HttpRouteDependencies,Indexed>
ManagedFunctionto route theHttpRequest.- Author:
- Daniel Sagenschneider
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classHttpRouteFunction.HttpRouteDependenciesDependency keys.
-
Constructor Summary
Constructors Constructor Description HttpRouteFunction(HttpEscalationHandler escalationHandler, int handleRedirectFlowIndex, HttpRouter router)Instantiate.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ManagedFunction<HttpRouteFunction.HttpRouteDependencies,Indexed>createManagedFunction()Creates theManagedFunction.voidexecute(ManagedFunctionContext<HttpRouteFunction.HttpRouteDependencies,Indexed> context)Executes the function.
-
-
-
Constructor Detail
-
HttpRouteFunction
public HttpRouteFunction(HttpEscalationHandler escalationHandler, int handleRedirectFlowIndex, HttpRouter router)
Instantiate.- Parameters:
escalationHandler-HttpEscalationHandler. May benull.handleRedirectFlowIndex-Flowindex to handle a redirect.router-HttpRouter.
-
-
Method Detail
-
createManagedFunction
public ManagedFunction<HttpRouteFunction.HttpRouteDependencies,Indexed> createManagedFunction()
Description copied from interface:ManagedFunctionFactoryCreates theManagedFunction.- Specified by:
createManagedFunctionin interfaceManagedFunctionFactory<HttpRouteFunction.HttpRouteDependencies,Indexed>- Returns:
ManagedFunction.
-
execute
public void execute(ManagedFunctionContext<HttpRouteFunction.HttpRouteDependencies,Indexed> context) throws java.lang.Exception
Description copied from interface:ManagedFunctionExecutes the function.- Specified by:
executein interfaceManagedFunction<HttpRouteFunction.HttpRouteDependencies,Indexed>- Parameters:
context-ManagedFunctionContextfor theManagedFunction.- Throws:
java.lang.Exception
-
-