KickJava   Java API By Example, From Geeks To Geeks.

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

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

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

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