@Provider @Produces(value="application/json") @Consumes(value="application/json") public class JsonbJaxrsProvider<T> extends Object implements javax.ws.rs.ext.MessageBodyWriter<T>, javax.ws.rs.ext.MessageBodyReader<T>
Modifier and Type | Field and Description |
---|---|
private JsonbConfig |
config |
private AtomicReference<Jsonb> |
delegate |
private Collection<String> |
ignores |
Modifier | Constructor and Description |
---|---|
|
JsonbJaxrsProvider() |
protected |
JsonbJaxrsProvider(Collection<String> ignores) |
Modifier and Type | Method and Description |
---|---|
protected Jsonb |
createJsonb() |
private Jsonb |
delegate() |
long |
getSize(T t,
Class<?> type,
Type genericType,
Annotation[] annotations,
javax.ws.rs.core.MediaType mediaType) |
private boolean |
isIgnored(Class<?> type) |
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> httpHeaders,
InputStream entityStream) |
void |
setBinaryDataStrategy(String binaryDataStrategy) |
void |
setEncoding(String encoding) |
void |
setIJson(boolean active) |
void |
setNullValues(boolean nulls) |
void |
setPretty(boolean pretty) |
void |
setPropertyNamingStrategy(String propertyNamingStrategy) |
void |
setPropertyOrderStrategy(String propertyOrderStrategy) |
void |
writeTo(T t,
Class<?> type,
Type genericType,
Annotation[] annotations,
javax.ws.rs.core.MediaType mediaType,
javax.ws.rs.core.MultivaluedMap<String,Object> httpHeaders,
OutputStream entityStream) |
private final Collection<String> ignores
private final AtomicReference<Jsonb> delegate
private final JsonbConfig config
public JsonbJaxrsProvider()
protected JsonbJaxrsProvider(Collection<String> ignores)
protected Jsonb createJsonb()
private boolean isIgnored(Class<?> type)
public void setIJson(boolean active)
public void setEncoding(String encoding)
public void setBinaryDataStrategy(String binaryDataStrategy)
public void setPropertyNamingStrategy(String propertyNamingStrategy)
public void setPropertyOrderStrategy(String propertyOrderStrategy)
public void setNullValues(boolean nulls)
public void setPretty(boolean pretty)
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 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 T readFrom(Class<T> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType, javax.ws.rs.core.MultivaluedMap<String,String> httpHeaders, InputStream entityStream) throws IOException, javax.ws.rs.WebApplicationException
readFrom
in interface javax.ws.rs.ext.MessageBodyReader<T>
IOException
javax.ws.rs.WebApplicationException
public void writeTo(T t, Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType, javax.ws.rs.core.MultivaluedMap<String,Object> httpHeaders, OutputStream entityStream) throws IOException, javax.ws.rs.WebApplicationException
writeTo
in interface javax.ws.rs.ext.MessageBodyWriter<T>
IOException
javax.ws.rs.WebApplicationException
private Jsonb delegate()
Copyright © 2014–2016 The Apache Software Foundation. All rights reserved.