|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.wicket.request.http.handler.ErrorCodeResponseHandler
public final class ErrorCodeResponseHandler
Response target that is to be used in a servlet environment to send an error code and optionally
a message. NOTE: this target can only be used in a servlet environment with
org.apache.wicket.protocol.http.WebRequestCycle
s.
Constructor Summary | |
---|---|
ErrorCodeResponseHandler(int errorCode)
Construct. |
|
ErrorCodeResponseHandler(int errorCode,
java.lang.String message)
Construct. |
Method Summary | |
---|---|
void |
detach(IRequestCycle requestCycle)
This method is called at the end of a request cycle to indicate that processing is done and that cleaning up of the subject(s) of this target may be done. |
int |
getErrorCode()
Gets the servlet error code. |
java.lang.String |
getMessage()
Gets the optional message to send to the client. |
void |
respond(IRequestCycle requestCycle)
Respond by sending the set errorCode and optionally the message to the browser. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ErrorCodeResponseHandler(int errorCode)
errorCode
- the servlet error code; use one of the
HttpServletResponse
constantsHttpServletResponse
public ErrorCodeResponseHandler(int errorCode, java.lang.String message)
errorCode
- the servlet error code; use one of the
HttpServletResponse
constantsmessage
- the optional message to send to the clientHttpServletResponse
Method Detail |
---|
public void respond(IRequestCycle requestCycle)
respond
in interface IRequestHandler
requestCycle
- the current request cycleorg.apache.wicket.request.IRequestHandler#respond(org.apache.wicket.request.cycle.RequestCycle)
public final int getErrorCode()
public final java.lang.String getMessage()
public void detach(IRequestCycle requestCycle)
IRequestHandler
detach
in interface IRequestHandler
requestCycle
- the current request cycleorg.apache.wicket.request.IRequestHandler#detach(org.apache.wicket.request.cycle.RequestCycle)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |