Package net.officefloor.web
Class HttpRedirectFunction<T>
- java.lang.Object
-
- net.officefloor.web.HttpRedirectFunction<T>
-
- All Implemented Interfaces:
ManagedFunction<HttpRedirectFunction.HttpRedirectDependencies,None>,ManagedFunctionFactory<HttpRedirectFunction.HttpRedirectDependencies,None>
public class HttpRedirectFunction<T> extends java.lang.Object implements ManagedFunctionFactory<HttpRedirectFunction.HttpRedirectDependencies,None>, ManagedFunction<HttpRedirectFunction.HttpRedirectDependencies,None>
ManagedFunctionto send a redirect.- Author:
- Daniel Sagenschneider
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classHttpRedirectFunction.HttpRedirectDependenciesDependency keys.
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringREDIRECT_COOKIE_NAMEName ofHttpResponseCookieto indicate a redirect.static java.lang.StringSESSION_ATTRIBUTE_REDIRECT_MOMENTOName of theHttpSessionattribute containing theHttpRequestStatemomento.
-
Constructor Summary
Constructors Constructor Description HttpRedirectFunction(boolean isSecure, HttpPathFactory<T> pathFactory)Instantiate.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ManagedFunction<HttpRedirectFunction.HttpRedirectDependencies,None>createManagedFunction()Creates theManagedFunction.voidexecute(ManagedFunctionContext<HttpRedirectFunction.HttpRedirectDependencies,None> context)Executes the function.
-
-
-
Field Detail
-
SESSION_ATTRIBUTE_REDIRECT_MOMENTO
public static final java.lang.String SESSION_ATTRIBUTE_REDIRECT_MOMENTO
Name of theHttpSessionattribute containing theHttpRequestStatemomento.- See Also:
- Constant Field Values
-
REDIRECT_COOKIE_NAME
public static final java.lang.String REDIRECT_COOKIE_NAME
Name ofHttpResponseCookieto indicate a redirect.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
HttpRedirectFunction
public HttpRedirectFunction(boolean isSecure, HttpPathFactory<T> pathFactory)Instantiate.- Parameters:
isSecure- Indicates if redirect to secure port.pathFactory-HttpPathFactory.
-
-
Method Detail
-
createManagedFunction
public ManagedFunction<HttpRedirectFunction.HttpRedirectDependencies,None> createManagedFunction()
Description copied from interface:ManagedFunctionFactoryCreates theManagedFunction.- Specified by:
createManagedFunctionin interfaceManagedFunctionFactory<HttpRedirectFunction.HttpRedirectDependencies,None>- Returns:
ManagedFunction.
-
execute
public void execute(ManagedFunctionContext<HttpRedirectFunction.HttpRedirectDependencies,None> context) throws java.lang.Exception
Description copied from interface:ManagedFunctionExecutes the function.- Specified by:
executein interfaceManagedFunction<HttpRedirectFunction.HttpRedirectDependencies,None>- Parameters:
context-ManagedFunctionContextfor theManagedFunction.- Throws:
java.lang.Exception
-
-