public class HttpStatusRequestRejectedHandler extends java.lang.Object implements RequestRejectedHandler
RequestRejectedHandler
that sends an error with
configurable status code.Constructor and Description |
---|
HttpStatusRequestRejectedHandler()
Constructs an instance which uses
400 as response code. |
HttpStatusRequestRejectedHandler(int httpError)
Constructs an instance which uses a configurable http code as response.
|
Modifier and Type | Method and Description |
---|---|
void |
handle(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
RequestRejectedException requestRejectedException)
Handles an request rejected failure.
|
public HttpStatusRequestRejectedHandler()
400
as response code.public HttpStatusRequestRejectedHandler(int httpError)
httpError
- http status code to usepublic void handle(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, RequestRejectedException requestRejectedException) throws java.io.IOException
RequestRejectedHandler
handle
in interface RequestRejectedHandler
request
- that resulted in an RequestRejectedException
response
- so that the user agent can be advised of the failurerequestRejectedException
- that caused the invocationjava.io.IOException
- in the event of an IOException