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 Default Methods Modifier and Type Method Description default voidbeforeRequest()Called 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 voidrequestFinally()Called at the end of the request (even if an exception occurred).
-
-
-
Method Detail
-
rawRequest
default 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
default 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
default 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
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.
-
-