@Provider @Produces(value="application/json") @Consumes(value="application/json") @Priority(value=4900) public class JsonbJaxrsProvider<T> extends Object implements javax.ws.rs.ext.MessageBodyWriter<T>, javax.ws.rs.ext.MessageBodyReader<T>, AutoCloseable
Modifier and Type | Class and Description |
---|---|
private static class |
JsonbJaxrsProvider.DynamicInstance |
private static class |
JsonbJaxrsProvider.ProvidedInstance |
Modifier and Type | Field and Description |
---|---|
protected javax.json.bind.JsonbConfig |
config |
private boolean |
customized |
protected Function<Class<?>,javax.json.bind.Jsonb> |
delegate |
protected Collection<String> |
ignores |
private javax.ws.rs.ext.Providers |
providers |
Modifier | Constructor and Description |
---|---|
|
JsonbJaxrsProvider() |
protected |
JsonbJaxrsProvider(Collection<String> ignores) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
protected javax.json.bind.Jsonb |
createJsonb() |
protected javax.json.bind.Jsonb |
getJsonb(Class<?> type) |
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 |
setFailOnMissingCreatorValues(boolean failOnMissingCreatorValues) |
void |
setFailOnUnknownProperties(boolean active) |
void |
setIJson(boolean active) |
void |
setInterfaceImplementationMapping(Map<String,String> interfaceImplementationMapping) |
void |
setNullValues(boolean nulls) |
void |
setOtherProperties(String others) |
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) |
protected final Collection<String> ignores
protected final javax.json.bind.JsonbConfig config
private boolean customized
@Context private javax.ws.rs.ext.Providers providers
public JsonbJaxrsProvider()
protected JsonbJaxrsProvider(Collection<String> ignores)
private boolean isIgnored(Class<?> type)
public void setFailOnUnknownProperties(boolean active)
public void setOtherProperties(String others)
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 void setFailOnMissingCreatorValues(boolean failOnMissingCreatorValues)
public void setInterfaceImplementationMapping(Map<String,String> interfaceImplementationMapping)
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
protected javax.json.bind.Jsonb createJsonb()
protected javax.json.bind.Jsonb getJsonb(Class<?> type)
public void close() throws Exception
close
in interface AutoCloseable
Exception
Copyright © 2014–2019 The Apache Software Foundation. All rights reserved.