Skip navigation links

Oracle® Coherence Java API Reference
Release 3.7.1.0

E22843-01


com.tangosol.coherence.rest.io
Class JsonJacksonMarshaller

java.lang.Object
  extended by com.tangosol.coherence.rest.io.AbstractMarshaller
      extended by com.tangosol.coherence.rest.io.JsonJacksonMarshaller

All Implemented Interfaces:
Marshaller

public class JsonJacksonMarshaller
extends AbstractMarshaller

Jackson-based marshaller that marshals object to/from JSON.

Author:
as 2011.07.13

Field Summary

 

Fields inherited from interface com.tangosol.coherence.rest.io.Marshaller
FORMAT_OUTPUT

 

Constructor Summary
JsonJacksonMarshaller(java.lang.Class clzRoot)
          Construct JsonJacksonMarshaller instance.

 

Method Summary
protected  void configureObjectMapper(ObjectMapper mapper)
          Configure a Jackson ObjectMapper.
 void marshal(java.lang.Object oValue, java.io.OutputStream out)
          Write the specified object into the given stream.
 java.lang.Object unmarshal(java.io.InputStream in)
          Read an object from the specified stream.

 

Methods inherited from class com.tangosol.coherence.rest.io.AbstractMarshaller
getRootClass, marshalAsFragment

 

Constructor Detail

JsonJacksonMarshaller

public JsonJacksonMarshaller(java.lang.Class clzRoot)
Construct JsonJacksonMarshaller instance.
Parameters:
clzRoot - class of the root object this marshaller is for

Method Detail

marshal

public void marshal(java.lang.Object oValue,
                    java.io.OutputStream out)
             throws java.io.IOException
Write the specified object into the given stream.
Parameters:
oValue - object to marshall
out - stream to write to
Throws:
java.io.IOException - if an error occurs during marshalling

unmarshal

public java.lang.Object unmarshal(java.io.InputStream in)
                           throws java.io.IOException
Read an object from the specified stream.
Parameters:
in - stream to read from
Returns:
unmarshalled object instance
Throws:
java.io.IOException - if an error occurs during unmarshalling

configureObjectMapper

protected void configureObjectMapper(ObjectMapper mapper)
Configure a Jackson ObjectMapper.
Parameters:
mapper - object mapper to configure

Skip navigation links

Oracle® Coherence Java API Reference
Release 3.7.1.0

E22843-01


Copyright © 2000, 2011, Oracle and/or its affiliates. All rights reserved.