Class ForgeProxyMarshaller

  • All Implemented Interfaces:
    com.fasterxml.jackson.core.Versioned, javax.ws.rs.ext.MessageBodyReader<Object>, javax.ws.rs.ext.MessageBodyWriter<Object>

    @Provider
    @Produces("application/json")
    public class ForgeProxyMarshaller
    extends com.fasterxml.jackson.jaxrs.json.JacksonJsonProvider
    This prevents Forge Proxies of the specified types from having their handler method serialized. In many cases this is necessary to prevent cyclic properties.
    Author:
    Jesse Sightler
    • Field Summary

      • Fields inherited from class com.fasterxml.jackson.jaxrs.json.JacksonJsonProvider

        _jsonpFunctionName, _providers, BASIC_ANNOTATIONS, MIME_JAVASCRIPT, MIME_JAVASCRIPT_MS
      • Fields inherited from class com.fasterxml.jackson.jaxrs.base.ProviderBase

        _cfgCheckCanDeserialize, _cfgCheckCanSerialize, _cfgCustomUntouchables, _defaultReadView, _defaultWriteView, _jaxRSFeatures, _mapperConfig, _noContentExceptionRef, _readers, _unreadableClasses, _untouchables, _unwritableClasses, _writers, CLASS_NAME_NO_CONTENT_EXCEPTION, DEFAULT_UNREADABLES, DEFAULT_UNTOUCHABLES, DEFAULT_UNWRITABLES, HEADER_CONTENT_TYPE_OPTIONS, JAXRS_FEATURE_DEFAULTS, noContentExceptionSupplier
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void writeTo​(Object value, Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType, javax.ws.rs.core.MultivaluedMap<String,​Object> httpHeaders, OutputStream entityStream)  
      • Methods inherited from class com.fasterxml.jackson.jaxrs.json.JacksonJsonProvider

        _configForReading, _configForWriting, _locateMapperViaProvider, hasMatchingMediaType, setJSONPFunctionName, version
      • Methods inherited from class com.fasterxml.jackson.jaxrs.base.ProviderBase

        _addSuperTypes, _configForReading, _configForWriting, _containedIn, _createGenerator, _createNoContentException, _createParser, _endpointForReading, _endpointForWriting, _findCustomUntouchable, _isIgnorableForReading, _isIgnorableForWriting, _isSpecialReadable, _modifyHeaders, addUntouchable, checkCanDeserialize, checkCanSerialize, configure, configure, configure, configure, configure, disable, disable, disable, disable, disable, disable, enable, enable, enable, enable, enable, enable, findEncoding, findSuperTypes, findSuperTypes, getSize, hasMatchingMediaTypeForReading, hasMatchingMediaTypeForWriting, isEnabled, isReadable, isWriteable, locateMapper, readFrom, removeUntouchable, setAnnotationsToUse, setDefaultReadView, setDefaultView, setDefaultWriteView, setMapper
    • Constructor Detail

      • ForgeProxyMarshaller

        public ForgeProxyMarshaller()
    • Method Detail

      • writeTo

        public void writeTo​(Object value,
                            Class<?> type,
                            Type genericType,
                            Annotation[] annotations,
                            javax.ws.rs.core.MediaType mediaType,
                            javax.ws.rs.core.MultivaluedMap<String,​Object> httpHeaders,
                            OutputStream entityStream)
                     throws IOException
        Specified by:
        writeTo in interface javax.ws.rs.ext.MessageBodyWriter<Object>
        Overrides:
        writeTo 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>
        Throws:
        IOException