KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > test > remoting > marshall > dynamic > remote > http > TestMarshaller


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.test.remoting.marshall.dynamic.remote.http;
8
9 import java.io.IOException JavaDoc;
10 import java.io.OutputStream JavaDoc;
11 import org.jboss.remoting.marshal.http.HTTPMarshaller;
12 import org.jboss.test.remoting.marshall.dynamic.remote.TestWrapper;
13
14 /**
15  * @author <a HREF="mailto:tom.elrod@jboss.com">Tom Elrod</a>
16  */

17 public class TestMarshaller extends HTTPMarshaller
18 {
19    public final static String JavaDoc DATATYPE = "test";
20
21    //private TestWrapper wrapper = null;
22

23    /**
24     * Take the data object and write to the output. Has ben customized
25     * for working with ObjectOutputStreams since requires extra messaging.
26     *
27     * @param dataObject Object to be writen to output
28     * @param output The data output to write the object
29     * data to.
30     */

31    public void write(Object JavaDoc dataObject, OutputStream JavaDoc output) throws IOException JavaDoc
32    {
33       TestWrapper wrapper = new TestWrapper(dataObject);
34       super.write(wrapper, output);
35    }
36
37    public String JavaDoc getDataType()
38    {
39       return DATATYPE;
40    }
41 }
Popular Tags