@Provider
public class BrooklynJacksonJsonProvider
extends com.fasterxml.jackson.jaxrs.json.JacksonJsonProvider
implements javax.ws.rs.ext.MessageBodyWriter<java.lang.Object>, javax.ws.rs.ext.MessageBodyReader<java.lang.Object>
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
BROOKLYN_REST_OBJECT_MAPPER |
Constructor and Description |
---|
BrooklynJacksonJsonProvider() |
Modifier and Type | Method and Description |
---|---|
static com.fasterxml.jackson.databind.ObjectMapper |
findAnyObjectMapper(ManagementContext mgmt)
Like
#findSharedObjectMapper(ServletContext, ManagementContext) but will create a private
ObjectMapper if it can, from the servlet context and/or the management context, or else fail |
static com.fasterxml.jackson.databind.ObjectMapper |
findSharedObjectMapper(ManagementContext mgmt)
Finds a shared
ObjectMapper or makes a new one, stored against the servlet context;
returns null if a shared instance cannot be created. |
com.fasterxml.jackson.databind.ObjectMapper |
locateMapper(java.lang.Class<?> type,
javax.ws.rs.core.MediaType mediaType) |
static com.fasterxml.jackson.databind.ObjectMapper |
newPrivateObjectMapper(ManagementContext mgmt) |
setJSONPFunctionName, version
addUntouchable, checkCanDeserialize, checkCanSerialize, configure, configure, configure, configure, configure, disable, disable, disable, disable, disable, disable, enable, enable, enable, enable, enable, enable, getSize, isEnabled, isReadable, isWriteable, readFrom, removeUntouchable, setAnnotationsToUse, setDefaultReadView, setDefaultView, setDefaultWriteView, setMapper, writeTo
public static final java.lang.String BROOKLYN_REST_OBJECT_MAPPER
public com.fasterxml.jackson.databind.ObjectMapper locateMapper(java.lang.Class<?> type, javax.ws.rs.core.MediaType mediaType)
locateMapper
in class com.fasterxml.jackson.jaxrs.base.ProviderBase<com.fasterxml.jackson.jaxrs.json.JacksonJsonProvider,com.fasterxml.jackson.databind.ObjectMapper,com.fasterxml.jackson.jaxrs.json.JsonEndpointConfig,com.fasterxml.jackson.jaxrs.json.JsonMapperConfigurator>
public static com.fasterxml.jackson.databind.ObjectMapper findSharedObjectMapper(ManagementContext mgmt)
ObjectMapper
or makes a new one, stored against the servlet context;
returns null if a shared instance cannot be created.public static com.fasterxml.jackson.databind.ObjectMapper findAnyObjectMapper(ManagementContext mgmt)
#findSharedObjectMapper(ServletContext, ManagementContext)
but will create a private
ObjectMapper if it can, from the servlet context and/or the management context, or else failpublic static com.fasterxml.jackson.databind.ObjectMapper newPrivateObjectMapper(ManagementContext mgmt)
findSharedObjectMapper(ManagementContext)
is preferred