Package se.fortnox.reactivewizard.jaxrs
Interface JaxRsResourceInterceptor
public interface JaxRsResourceInterceptor
Interface that allows for customized JaxRsResource call handling.
Applications may register interceptors to add pre- or post processing behaviour common to all resource calls without
having to modify the resources.
The preHandle and postHandle methods will be run in the same thread but the execution of the call will run
asynchronously. Any processing of the actual call should be made on the resourceCall observable in postHandle.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceThe information available to the interceptors. -
Method Summary
Modifier and TypeMethodDescriptiondefault voidpostHandle(JaxRsResourceInterceptor.JaxRsResourceContext context, org.reactivestreams.Publisher<Void> resourceCall) Intercept the call to a JaxRsResource.default voidIntercept the call to a JaxRsResource.
-
Method Details
-
preHandle
Intercept the call to a JaxRsResource. Called after the resource has been determined but before the resource has been called.- Parameters:
context- describing the request
-
postHandle
default void postHandle(JaxRsResourceInterceptor.JaxRsResourceContext context, org.reactivestreams.Publisher<Void> resourceCall) Intercept the call to a JaxRsResource. Called after the resource call. The resource call results in a Publisher that has not yet been subscribed to.- Parameters:
context- describing the requestresourceCall- the processing of the request
-