Package com.adaptris.core
Class XStreamJsonMarshaller
- java.lang.Object
-
- com.adaptris.core.AbstractMarshaller
-
- com.adaptris.core.XStreamMarshallerImpl
-
- com.adaptris.core.XStreamJsonMarshaller
-
- All Implemented Interfaces:
AdaptrisMarshaller
public class XStreamJsonMarshaller extends XStreamMarshallerImpl
JSON implementation ofAdaptrisMarshaller
using XStream.This implementation is not intended to be used for marshalling adapter configuration (although it might be possible), but is intended for use where JSON is the desired data format used for transfer between systems. It uses
JettisonMappedXmlDriver
which allows conversion to and from java objects. However, restrictions will apply as detailed in the XStream JSON TutorialIn the adapter configuration file this class is aliased as xstream-json-marshaller which is the preferred alternative to the fully qualified classname when building your configuration.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.adaptris.core.AbstractMarshaller
AbstractMarshaller.Deserializer, AbstractMarshaller.Serializer
-
Nested classes/interfaces inherited from interface com.adaptris.core.AdaptrisMarshaller
AdaptrisMarshaller.MarshalInputStream, AdaptrisMarshaller.MarshalOutputStream
-
-
Field Summary
-
Fields inherited from class com.adaptris.core.XStreamMarshallerImpl
instance
-
-
Constructor Summary
Constructors Constructor Description XStreamJsonMarshaller()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected com.thoughtworks.xstream.XStream
getInstance()
Typically it will do something like this:--
Methods inherited from class com.adaptris.core.XStreamMarshallerImpl
marshal, marshal, unmarshal
-
Methods inherited from class com.adaptris.core.AbstractMarshaller
invokeDeserialize, invokeSerialize, marshal, marshal, marshal, marshal, unmarshal, unmarshal, unmarshal, unmarshal, unmarshal
-
-
-
-
Method Detail
-
getInstance
protected com.thoughtworks.xstream.XStream getInstance()
Description copied from class:XStreamMarshallerImpl
Typically it will do something like this:-if (instance == null){ create and configure a new instance } return instance;
- Specified by:
getInstance
in classXStreamMarshallerImpl
- Returns:
- a pre-configured instance.
-
-