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>
ManagedFunction
to send a redirect.- Author:
- Daniel Sagenschneider
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
HttpRedirectFunction.HttpRedirectDependencies
Dependency keys.
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
REDIRECT_COOKIE_NAME
Name ofHttpResponseCookie
to indicate a redirect.static java.lang.String
SESSION_ATTRIBUTE_REDIRECT_MOMENTO
Name of theHttpSession
attribute containing theHttpRequestState
momento.
-
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
.void
execute(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 theHttpSession
attribute containing theHttpRequestState
momento.- See Also:
- Constant Field Values
-
REDIRECT_COOKIE_NAME
public static final java.lang.String REDIRECT_COOKIE_NAME
Name ofHttpResponseCookie
to 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:ManagedFunctionFactory
Creates theManagedFunction
.- Specified by:
createManagedFunction
in interfaceManagedFunctionFactory<HttpRedirectFunction.HttpRedirectDependencies,None>
- Returns:
ManagedFunction
.
-
execute
public void execute(ManagedFunctionContext<HttpRedirectFunction.HttpRedirectDependencies,None> context) throws java.lang.Exception
Description copied from interface:ManagedFunction
Executes the function.- Specified by:
execute
in interfaceManagedFunction<HttpRedirectFunction.HttpRedirectDependencies,None>
- Parameters:
context
-ManagedFunctionContext
for theManagedFunction
.- Throws:
java.lang.Exception
-
-