GridGain™ 2.1.0
Java API Specification

org.gridgain.grid.marshaller.xstream
Class GridXstreamMarshaller

java.lang.Object
  extended by org.gridgain.grid.marshaller.xstream.GridXstreamMarshaller
All Implemented Interfaces:
GridMarshaller

public class GridXstreamMarshaller
extends Object
implements GridMarshaller

Marshaller that usese XStream to marshal objects. This marshaller does not require objects to implement Serializable.



See Also:

  Documentation
  Email Support
  Online Forums
  Issue Tracking

Author:   2005-2008 Copyright © GridGain Systems. All Rights Reserved. ver. 2.1.0

 

Field Summary
 
Fields inherited from interface org.gridgain.grid.marshaller.GridMarshaller
EXCLUDED_GRID_CLASSES
 
Constructor Summary
GridXstreamMarshaller()
          Initializes XStream marshaller.
 
Method Summary
 void marshal(Object obj, OutputStream out)
          Marshals object to the output stream.
 String toString()
          
<T> T
unmarshal(InputStream in, ClassLoader clsLoader)
          Unmarshals object from the output stream using given class loader.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

GridXstreamMarshaller

public GridXstreamMarshaller()
Initializes XStream marshaller.

Method Detail

marshal

public void marshal(Object obj,
                    OutputStream out)
             throws GridException
Marshals object to the output stream. This method should not close given output stream.

Specified by:
marshal in interface GridMarshaller
Throws:
GridException - If marshalling failed.
Parameters:
obj - Object to marshal.
out - Output stream to marshal into.

unmarshal

public <T> T unmarshal(InputStream in,
                       ClassLoader clsLoader)
            throws GridException
Unmarshals object from the output stream using given class loader. This method should not close given input stream.

Specified by:
unmarshal in interface GridMarshaller
Throws:
GridException - If unmarshalling failed.
Type Parameters:
T - Type of unmarshalled object.
Parameters:
in - Input stream.
clsLoader - Class loader to use.
Returns:
Unmarshalled object.

toString

public String toString()

Overrides:
toString in class Object

GridGain™ 2.1.0
Java API Specification

GridGain™ - Grid Computing Made Simple, ver. 2.1.0.19122008
2005-2008 Copyright © GridGain Systems. All Rights Reserved.