Top Description Methods
jakarta.ws.rs.ext

public Interface ReaderInterceptor


Interface for message body reader interceptors that wrap around calls to jakarta.ws.rs.ext.MessageBodyReader#readFrom.

Providers implementing ReaderInterceptor contract must be either programmatically registered in a JAX-RS runtime or must be annotated with @Provider annotation to be automatically discovered by the JAX-RS runtime during a provider scanning phase. Message body interceptor instances may also be discovered and bound dynamically to particular resource methods.

Authors
Santiago Pericas-Geertsen, Bill Burke, Marek Potociar
Since
2.0
See Also
MessageBodyReader

Method Summary

Modifier and TypeMethod and Description
public Object

Returns:

result of next interceptor invoked or the wrapped method if last interceptor in chain.
aroundReadFrom
(ReaderInterceptorContext
invocation context.
context
)

Interceptor method wrapping calls to MessageBodyReader#readFrom method.

Method Detail

aroundReadFromback to summary
public Object aroundReadFrom(ReaderInterceptorContext context) throws IOException, WebApplicationException

Interceptor method wrapping calls to MessageBodyReader#readFrom method. The parameters of the wrapped method called are available from context. Implementations of this method SHOULD explicitly call ReaderInterceptorContext#proceed to invoke the next interceptor in the chain, and ultimately the wrapped MessageBodyReader#readFrom method.

Parameters
context:ReaderInterceptorContext

invocation context.

Returns:Object

result of next interceptor invoked or the wrapped method if last interceptor in chain.

Exceptions
IOException:
if an IO error arises or is thrown by the wrapped MessageBodyReader.readFrom method.
WebApplicationException:
thrown by the wrapped MessageBodyReader.readFrom method.