@Provider public class UpmJsonProvider extends Object implements javax.ws.rs.ext.MessageBodyReader<Object>, javax.ws.rs.ext.MessageBodyWriter<Object>
JsonProvider
is an implementation of the MessageBodyReader
and MessageBodyWriter
interfaces.
It provides serialization and deserialization of objects annotated with Jackson annotations. The implementation
simply wraps the JacksonJsonProvider
which would not be loaded by the REST module otherwise.
This code is lifted from com.atlassian.upm.core.rest.representations.JsonProvider.
Constructor and Description |
---|
UpmJsonProvider(org.codehaus.jackson.jaxrs.JacksonJsonProvider provider) |
Modifier and Type | Method and Description |
---|---|
long |
getSize(Object value,
Class<?> type,
Type genericType,
Annotation[] annotations,
javax.ws.rs.core.MediaType mediaType) |
boolean |
isReadable(Class<?> type,
Type genericType,
Annotation[] annotations,
javax.ws.rs.core.MediaType mediaType) |
boolean |
isWriteable(Class<?> type,
Type genericType,
Annotation[] annotations,
javax.ws.rs.core.MediaType mediaType) |
Object |
readFrom(Class<Object> type,
Type genericType,
Annotation[] annotations,
javax.ws.rs.core.MediaType mediaType,
javax.ws.rs.core.MultivaluedMap<String,String> httpHeaders,
InputStream entityStream) |
void |
writeTo(Object value,
Class<?> type,
Type genericType,
Annotation[] annotations,
javax.ws.rs.core.MediaType mediaType,
javax.ws.rs.core.MultivaluedMap<String,Object> httpHeaders,
OutputStream entityStream) |
public UpmJsonProvider(org.codehaus.jackson.jaxrs.JacksonJsonProvider provider)
public long getSize(Object value, Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)
getSize
in interface javax.ws.rs.ext.MessageBodyWriter<Object>
public boolean isWriteable(Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)
isWriteable
in interface javax.ws.rs.ext.MessageBodyWriter<Object>
public void writeTo(Object value, Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType, javax.ws.rs.core.MultivaluedMap<String,Object> httpHeaders, OutputStream entityStream) throws IOException
writeTo
in interface javax.ws.rs.ext.MessageBodyWriter<Object>
IOException
public boolean isReadable(Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)
isReadable
in interface javax.ws.rs.ext.MessageBodyReader<Object>
public Object readFrom(Class<Object> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType, javax.ws.rs.core.MultivaluedMap<String,String> httpHeaders, InputStream entityStream) throws IOException
readFrom
in interface javax.ws.rs.ext.MessageBodyReader<Object>
IOException
Copyright © 2003–2016 Atlassian. All rights reserved.