Class HttpStatusRequestRejectedHandler
- java.lang.Object
- 
- org.springframework.security.web.firewall.HttpStatusRequestRejectedHandler
 
- 
- All Implemented Interfaces:
- RequestRejectedHandler
 
 public class HttpStatusRequestRejectedHandler extends java.lang.Object implements RequestRejectedHandler A simple implementation ofRequestRejectedHandlerthat sends an error with configurable status code.- Since:
- 5.4
 
- 
- 
Constructor SummaryConstructors Constructor Description HttpStatusRequestRejectedHandler()Constructs an instance which uses400as response code.HttpStatusRequestRejectedHandler(int httpError)Constructs an instance which uses a configurable http code as response.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidhandle(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, RequestRejectedException requestRejectedException)Handles an request rejected failure.
 
- 
- 
- 
Constructor Detail- 
HttpStatusRequestRejectedHandlerpublic HttpStatusRequestRejectedHandler() Constructs an instance which uses400as response code.
 - 
HttpStatusRequestRejectedHandlerpublic HttpStatusRequestRejectedHandler(int httpError) Constructs an instance which uses a configurable http code as response.- Parameters:
- httpError- http status code to use
 
 
- 
 - 
Method Detail- 
handlepublic void handle(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, RequestRejectedException requestRejectedException) throws java.io.IOExceptionDescription copied from interface:RequestRejectedHandlerHandles an request rejected failure.- Specified by:
- handlein interface- RequestRejectedHandler
- Parameters:
- request- that resulted in an- RequestRejectedException
- response- so that the user agent can be advised of the failure
- requestRejectedException- that caused the invocation
- Throws:
- java.io.IOException- in the event of an IOException
 
 
- 
 
-