Package org.zeroturnaround.javarebel
Interface RequestListener
-
public interface RequestListenerAn HTTP request listener.- Since:
- 3.6
- Author:
- Rein Raudjärv
- See Also:
RequestIntegration
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidbeforeRequest()Called before the server handles an HTTP request.intpriority()Returns the priority of the listener that defines the order of listener invocation.booleanrawRequest(Object context, Object request, Object response)Give a chance to this listener to fully manage this request.voidrequestFinally()Called at the end of the request (even if an exception occurred).
-
-
-
Method Detail
-
rawRequest
boolean rawRequest(Object context, Object request, Object response) throws Exception
Give a chance to this listener to fully manage this request.If
trueis returned neither the server itself nor any other request listener have a chance to manage this request.Any exceptions will be caught and logged to the standard output.
- Parameters:
context- an instance oforg.zeroturnaround.javarebel.RebelServletContext.request- an instance ofjavax.servlet.http.HttpServletRequest.response- an instance ofjavax.servlet.http.HttpServletResponse.- Returns:
- true if this listener has managed this request.
- Throws:
Exception
-
beforeRequest
void beforeRequest() throws ExceptionCalled before the server handles an HTTP request.Only called if no listener managed this request.
Any exceptions will be caught and logged to the standard output.
- Throws:
Exception
-
requestFinally
void requestFinally() throws ExceptionCalled at the end of the request (even if an exception occurred).Only called if no listener managed this request.
Any exceptions will be caught and logged to the standard output.
- Throws:
Exception
-
priority
int priority()
Returns the priority of the listener that defines the order of listener invocation. First run the listener with greatest priority value. Negative values are the latest.
-
-