public static class GenericContext.ForwardResult
extends java.lang.Object
A helper class to contain information about forwarding a request to actions. It has three fields. The forward field simply indicates whether the request should be forwarded on. The responded field indicates whether a response has already been sent to the user. This could be the case, for example, if a login page is sent as a reply and the request should not be forwarded until the user has logged in. Finally, the user field contains the logged in user, or null if not relevant or not logged in.
All three parameters can be passed straight to the constructor in the order forward, responded, user. There is also a two-parameter constructor without the user, which will then be set to null. A normal forward with no other handling would be new ForwardResult(true,false,null) and normal blocking new ForwardResult(false,false,null). If you resolved a user, add it as the last parameter in case the login attempt succeeded.
Modifier and Type | Field and Description |
---|---|
boolean |
forward
Indicates if the request should be forwarded on to other actions.
|
ModulesServlet.HttpMethod |
method
Overwritten method.
|
javax.servlet.http.HttpServletRequest |
request
Overwritten request object.
|
boolean |
responded
Indicates if a reply has already been sent to the request.
|
javax.servlet.http.HttpServletResponse |
response
Overwritten response object.
|
User |
user
The user that's logged in.
|
Constructor and Description |
---|
ForwardResult() |
ForwardResult(boolean forward,
boolean responded) |
ForwardResult(boolean forward,
boolean responded,
User user) |
public boolean forward
public boolean responded
public User user
public javax.servlet.http.HttpServletRequest request
public javax.servlet.http.HttpServletResponse response
public ModulesServlet.HttpMethod method
public ForwardResult()
public ForwardResult(boolean forward, boolean responded)
public ForwardResult(boolean forward, boolean responded, User user)
Copyright 2004-2015 Wandora Team