@Provider @Consumes(value={"application/*+json","text/json"}) @Produces(value={"application/*+json","text/json"}) public class ResteasyJacksonProvider extends org.codehaus.jackson.jaxrs.JacksonJsonProvider
| Constructor and Description |
|---|
ResteasyJacksonProvider() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
isReadable(Class<?> aClass,
Type type,
Annotation[] annotations,
MediaType mediaType)
Ascertain if the MessageBodyReader can produce an instance of a
particular type.
|
boolean |
isWriteable(Class<?> aClass,
Type type,
Annotation[] annotations,
MediaType mediaType)
Ascertain if the MessageBodyWriter supports a particular type.
|
_containedIn, _findView, addUntouchable, checkCanDeserialize, checkCanSerialize, configure, configure, configure, configure, disable, disable, disable, disable, enable, enable, enable, enable, findEncoding, getSize, isJsonType, locateMapper, readFrom, setAnnotationsToUse, setJSONPFunctionName, setMapper, version, writeTopublic boolean isReadable(Class<?> aClass, Type type, Annotation[] annotations, MediaType mediaType)
MessageBodyReadertype parameter gives the
class of the instance that should be produced, the genericType parameter
gives the java.lang.reflect.Type of the instance
that should be produced.
E.g. if the instance to be produced is List<String>, the type parameter
will be java.util.List and the genericType parameter will be
java.lang.reflect.ParameterizedType.isReadable in interface MessageBodyReader<Object>isReadable in class org.codehaus.jackson.jaxrs.JacksonJsonProvideraClass - the class of instance to be produced.type - the type of instance 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
Method.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
Method.getParameterAnnotations.mediaType - the media type of the HTTP entity, if one is not
specified in the request then application/octet-stream is
used.true if the type is supported, otherwise false.public boolean isWriteable(Class<?> aClass, Type type, Annotation[] annotations, MediaType mediaType)
MessageBodyWriterisWriteable in interface MessageBodyWriter<Object>isWriteable in class org.codehaus.jackson.jaxrs.JacksonJsonProvideraClass - the class of instance that is to be written.type - the type of instance to be written, obtained either
by reflection of a resource method return type or via inspection
of the returned instance. GenericEntity
provides a way to specify this information at runtime.annotations - an array of the annotations attached to the message entity instance.mediaType - the media type of the HTTP entity.true if the type is supported, otherwise false.Copyright © 2013. All Rights Reserved.