javax.ws.rs.core.Context, MessageBodyReader, MessageBodyWriter, ContextResolver, ExceptionMapper
| Modifier and Type | Method and Description |
|---|---|
| public < type of the context. T> ContextResolver | Returns: a matching context resolver instance ornull if no matching
context providers are found.the class of context desired. contextType, MediaType the media type of data for which a context is required. mediaType)Get a context resolver for a particular type of context and media type. |
| public < type of the exception handled by the exception mapping provider. T extends Throwable> ExceptionMapper | getExceptionMapper(Class<T>
the class of exception. type)Get an exception mapping provider for a particular class of exception. |
| public < type of the the object that is to be read. T> MessageBodyReader | Returns: a MessageBodyReader that matches the supplied criteria ornull
if none is found.the class of the object that is to be read. type, Type the type of object to be produced. E.g. if the
message body is to be converted into a method parameter, this will be
the formal type of the method parameter as returned by
genericType, Annotation[] Class.getGenericParameterTypes.an array of the annotations on the declaration of the
artifact that will be initialized with the produced instance. E.g. if
the message body is to be converted into a method parameter, this will
be the annotations on that parameter returned by
annotations, MediaType Class.getParameterAnnotations.the media type of the data that will be read. mediaType)Get a message body reader that matches a set of criteria. |
| public < type of the object that is to be written. T> MessageBodyWriter | Returns: a MessageBodyReader that matches the supplied criteria ornull
if none is found.the class of the object that is to be written. type, Type the type of object to be written. E.g. if the
message body is to be produced from a field, this will be
the declared type of the field as returned by genericType, Annotation[] Field.getGenericType.an array of the annotations on the declaration of the
artifact that will be written. E.g. if the
message body is to be produced from a field, this will be
the annotations on that field returned by
annotations, MediaType Field.getDeclaredAnnotations.the media type of the data that will be written. mediaType)Get a message body writer that matches a set of criteria. |
| getContextResolver | back to summary |
|---|---|
| public <T> ContextResolver Get a context resolver for a particular type of context and media type.
The set of resolvers is first filtered by comparing the supplied value of
| |
| getExceptionMapper | back to summary |
|---|---|
| public <T extends Throwable> ExceptionMapper Get an exception mapping provider for a particular class of exception.
Returns the provider whose generic type is the nearest superclass of
| |
| getMessageBodyReader | back to summary |
|---|---|
| public <T> MessageBodyReader Get a message body reader that matches a set of criteria. The set of
readers is first filtered by comparing the supplied value of
| |
| getMessageBodyWriter | back to summary |
|---|---|
| public <T> MessageBodyWriter Get a message body writer that matches a set of criteria. The set of
writers is first filtered by comparing the supplied value of
| |