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>
ManagedFunction
to route theHttpRequest
.- Author:
- Daniel Sagenschneider
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
HttpRouteFunction.HttpRouteDependencies
Dependency 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
.void
execute(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
-Flow
index to handle a redirect.router
-HttpRouter
.
-
-
Method Detail
-
createManagedFunction
public ManagedFunction<HttpRouteFunction.HttpRouteDependencies,Indexed> createManagedFunction()
Description copied from interface:ManagedFunctionFactory
Creates theManagedFunction
.- Specified by:
createManagedFunction
in interfaceManagedFunctionFactory<HttpRouteFunction.HttpRouteDependencies,Indexed>
- Returns:
ManagedFunction
.
-
execute
public void execute(ManagedFunctionContext<HttpRouteFunction.HttpRouteDependencies,Indexed> context) throws java.lang.Exception
Description copied from interface:ManagedFunction
Executes the function.- Specified by:
execute
in interfaceManagedFunction<HttpRouteFunction.HttpRouteDependencies,Indexed>
- Parameters:
context
-ManagedFunctionContext
for theManagedFunction
.- Throws:
java.lang.Exception
-
-