KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > remoting > marshal > UnMarshaller


1 /*
2  * JBoss, the OpenSource J2EE webOS
3  *
4  * Distributable under LGPL license.
5  * See terms of license at gnu.org.
6  */

7 package org.jboss.remoting.marshal;
8
9 import java.io.IOException JavaDoc;
10 import java.io.InputStream JavaDoc;
11 import java.io.Serializable JavaDoc;
12 import java.util.Map JavaDoc;
13
14 /**
15  * Takes a marshalled byte array and converts to a Java
16  * data object.
17  *
18  * @author <a HREF="mailto:tom@jboss.org">Tom Elrod</a>
19  */

20 public interface UnMarshaller extends Serializable JavaDoc
21 {
22    /**
23     * Will read from the inputstream and converty contents to java Object.
24     *
25     * @param inputStream stream to read data from to do conversion
26     * @param metadata can be any transport specific metadata (such as headers from http transport).
27     * This can be null, depending on if transport supports metadata.
28     * @return
29     * @throws IOException all specific i/o exceptions need to be thrown as this.
30     * @throws ClassNotFoundException will be thrown if during the unmarshalling process can not find a specific class
31     * within classloader.
32     */

33    public Object JavaDoc read(InputStream JavaDoc inputStream, Map JavaDoc metadata) throws IOException JavaDoc, ClassNotFoundException JavaDoc;
34
35    /**
36     * Set the class loader to use for unmarhsalling. This may
37     * be needed when need to have access to class definitions that
38     * are not part of this unmarshaller's parent classloader (especially
39     * when doing remote classloading).
40     *
41     * @param classloader
42     */

43    public void setClassLoader(ClassLoader JavaDoc classloader);
44
45    public UnMarshaller cloneUnMarshaller() throws CloneNotSupportedException JavaDoc;
46
47 }
Popular Tags