org.jboss.remoting.marshal
Interface UnMarshaller

All Superinterfaces:
Serializable
All Known Implementing Classes:
SerializableUnMarshaller

public interface UnMarshaller
extends Serializable

Takes a marshalled byte array and converts to a Java data object.

Author:
Tom Elrod

Method Summary
 Object read(InputStream inputStream, Map metadata)
          Will read from the inputstream and converty contents to java Object.
 void setClassLoader(ClassLoader classloader)
          Set the class loader to use for unmarhsalling.
 

Method Detail

read

public Object read(InputStream inputStream,
                   Map metadata)
            throws IOException,
                   ClassNotFoundException
Will read from the inputstream and converty contents to java Object.

Parameters:
inputStream - stream to read data from to do conversion
metadata - can be any transport specific metadata (such as headers from http transport). This can be null, depending on if transport supports metadata.
Returns:
Throws:
IOException - all specific i/o exceptions need to be thrown as this.
ClassNotFoundException - will be thrown if during the unmarshalling process can not find a specific class within classloader.

setClassLoader

public void setClassLoader(ClassLoader classloader)
Set the class loader to use for unmarhsalling. This may be needed when need to have access to class definitions that are not part of this unmarshaller's parent classloader (especially when doing remote classloading).

Parameters:
classloader -


Copyright © 2004 JBoss Inc. All Rights Reserved.