public class BrooklynJacksonJsonProvider extends org.codehaus.jackson.jaxrs.JacksonJsonProvider implements ManagementContextInjectable
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 org.codehaus.jackson.map.ObjectMapper |
findAnyObjectMapper(javax.servlet.ServletContext servletContext,
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 org.codehaus.jackson.map.ObjectMapper |
findSharedObjectMapper(javax.servlet.ServletContext servletContext,
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. |
static ManagementContext |
getManagementContext(javax.servlet.ServletContext servletContext) |
void |
injectManagementContext(ManagementContext mgmt)
Sets the
ManagementContext reference. |
org.codehaus.jackson.map.ObjectMapper |
locateMapper(java.lang.Class<?> type,
javax.ws.rs.core.MediaType mediaType) |
static org.codehaus.jackson.map.ObjectMapper |
newPrivateObjectMapper(ManagementContext mgmt) |
addUntouchable, checkCanDeserialize, checkCanSerialize, configure, configure, configure, configure, disable, disable, disable, disable, enable, enable, enable, enable, getSize, isReadable, isWriteable, readFrom, setAnnotationsToUse, setJSONPFunctionName, setMapper, version, writeTo
public static final java.lang.String BROOKLYN_REST_OBJECT_MAPPER
public org.codehaus.jackson.map.ObjectMapper locateMapper(java.lang.Class<?> type, javax.ws.rs.core.MediaType mediaType)
locateMapper
in class org.codehaus.jackson.jaxrs.JacksonJsonProvider
public static org.codehaus.jackson.map.ObjectMapper findSharedObjectMapper(javax.servlet.ServletContext servletContext, ManagementContext mgmt)
ObjectMapper
or makes a new one, stored against the servlet context;
returns null if a shared instance cannot be created.public static org.codehaus.jackson.map.ObjectMapper findAnyObjectMapper(javax.servlet.ServletContext servletContext, 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 org.codehaus.jackson.map.ObjectMapper newPrivateObjectMapper(ManagementContext mgmt)
findSharedObjectMapper(ServletContext, ManagementContext)
is preferredpublic static ManagementContext getManagementContext(javax.servlet.ServletContext servletContext)
public void injectManagementContext(ManagementContext mgmt)
ManagementContextInjectable
ManagementContext
reference.injectManagementContext
in interface ManagementContextInjectable