|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface MessageBodyWorkers
An injectable interface providing lookup of MessageBodyReader
and
MessageBodyWriter
instances.
Context
,
MessageBodyReader
,
MessageBodyWriter
Method Summary | ||
---|---|---|
|
getMessageBodyReaders(MediaType mediaType,
java.lang.Class<T> type,
java.lang.reflect.Type genericType,
java.lang.annotation.Annotation[] annotations)
Get a list of message body readers that match a set of criteria. |
|
|
getMessageBodyWriters(MediaType mediaType,
java.lang.Class<T> type,
java.lang.reflect.Type genericType,
java.lang.annotation.Annotation[] annotations)
Get a list of message body writers that match a set of criteria. |
Method Detail |
---|
<T> java.util.List<MessageBodyReader<T>> getMessageBodyReaders(MediaType mediaType, java.lang.Class<T> type, java.lang.reflect.Type genericType, java.lang.annotation.Annotation[] annotations)
mediaType
- the media type of the data that will be read, this will
be compared to the values of ConsumeMime
for
each candidate reader and only matching readers will be included.type
- the class of object to be produced.genericType
- 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
Class.getGenericParameterTypes
.annotations
- 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
Class.getParameterAnnotations
.
<T> java.util.List<MessageBodyWriter<T>> getMessageBodyWriters(MediaType mediaType, java.lang.Class<T> type, java.lang.reflect.Type genericType, java.lang.annotation.Annotation[] annotations)
mediaType
- the media type of the data that will be written, this will
be compared to the values of ProduceMime
for
each candidate writer and only matching writers will be included.type
- the class of object that is to be written.genericType
- 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
Field.getGenericType
.annotations
- 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
Field.getDeclaredAnnotations
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |