@Produces(value="application/json") @Consumes(value="application/json") public class SimpleTypeJsonProvider<T> extends AbstractConfigurableProvider implements javax.ws.rs.ext.MessageBodyWriter<T>, javax.ws.rs.ext.MessageBodyReader<T>
BUNDLE, LOG
Constructor and Description |
---|
SimpleTypeJsonProvider() |
Modifier and Type | Method and Description |
---|---|
long |
getSize(T t,
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) |
T |
readFrom(Class<T> type,
Type genericType,
Annotation[] annotations,
javax.ws.rs.core.MediaType mediaType,
javax.ws.rs.core.MultivaluedMap<String,String> headers,
InputStream is) |
void |
setSupportSimpleTypesOnly(boolean supportSimpleTypesOnly) |
void |
writeTo(T t,
Class<?> type,
Type genericType,
Annotation[] annotations,
javax.ws.rs.core.MediaType mediaType,
javax.ws.rs.core.MultivaluedMap<String,Object> headers,
OutputStream os) |
getBus, getConsumeMediaTypes, getEnableBuffering, getEnableStreaming, getProduceMediaTypes, init, isPayloadEmpty, isPayloadEmpty, reportEmptyContentLength, setBus, setConsumeMediaTypes, setEnableBuffering, setEnableStreaming, setProduceMediaTypes
public boolean isWriteable(Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)
isWriteable
in interface javax.ws.rs.ext.MessageBodyWriter<T>
public long getSize(T t, Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)
getSize
in interface javax.ws.rs.ext.MessageBodyWriter<T>
public void writeTo(T t, Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType, javax.ws.rs.core.MultivaluedMap<String,Object> headers, OutputStream os) throws IOException, javax.ws.rs.WebApplicationException
writeTo
in interface javax.ws.rs.ext.MessageBodyWriter<T>
IOException
javax.ws.rs.WebApplicationException
public void setSupportSimpleTypesOnly(boolean supportSimpleTypesOnly)
public boolean isReadable(Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)
isReadable
in interface javax.ws.rs.ext.MessageBodyReader<T>
public T readFrom(Class<T> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType, javax.ws.rs.core.MultivaluedMap<String,String> headers, InputStream is) throws IOException, javax.ws.rs.WebApplicationException
readFrom
in interface javax.ws.rs.ext.MessageBodyReader<T>
IOException
javax.ws.rs.WebApplicationException
Apache CXF