Package org.zeroturnaround.javarebel
Interface RequestListener
public interface RequestListener
An HTTP request listener.
- Since:
- 3.6
- Author:
- Rein Raudjärv
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptiondefault voidCalled before the server handles an HTTP request.default intpriority()Returns the priority of the listener that defines the order of listener invocation.default booleanrawRequest(Object context, Object request, Object response) Give a chance to this listener to fully manage this request.default voidCalled at the end of the request (even if an exception occurred).
-
Method Details
-
rawRequest
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- any Exception
-
beforeRequest
Called 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- any Exception
-
requestFinally
Called 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- any Exception
-
priority
default 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.- Returns:
- the priority of the listener
-