[jboss-cvs] JBossRemoting/src/main/org/jboss/remoting/marshal ...
Ron Sigal
ron_sigal at yahoo.com
Fri May 18 22:22:17 EDT 2007
User: rsigal
Date: 07/05/18 22:22:17
Added: src/main/org/jboss/remoting/marshal Tag: remoting_2_x
VersionedMarshaller.java VersionedUnMarshaller.java
Log:
JBREM-714: Extended Marshaller/UnMarshaller with verioned read() and write().
Revision Changes Path
No revision
No revision
1.1.4.2 +47 -0 JBossRemoting/src/main/org/jboss/remoting/marshal/Attic/VersionedMarshaller.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: VersionedMarshaller.java
===================================================================
RCS file: VersionedMarshaller.java
diff -N VersionedMarshaller.java
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ VersionedMarshaller.java 19 May 2007 02:22:17 -0000 1.1.4.2
@@ -0,0 +1,47 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.remoting.marshal;
+
+import java.io.IOException;
+import java.io.OutputStream;
+
+/**
+ * @author <a href="ron.sigal at jboss.com">Ron Sigal</a>
+ * @version $Revision: 1.1.4.2 $
+ * <p>
+ * Copyright May 7, 2007
+ * </p>
+ */
+public interface VersionedMarshaller extends SerialMarshaller
+{
+ /**
+ * Marshaller will need to take the dataObject and convert
+ * into primitive java data types and write to the
+ * given output.
+ *
+ * @param dataObject Object to be writen to output
+ * @param output The data output to write the object
+ * data to.
+ * @param wire format version
+ */
+ public void write(Object dataObject, OutputStream output, int version) throws IOException;
+}
1.1.4.2 +52 -0 JBossRemoting/src/main/org/jboss/remoting/marshal/Attic/VersionedUnMarshaller.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: VersionedUnMarshaller.java
===================================================================
RCS file: VersionedUnMarshaller.java
diff -N VersionedUnMarshaller.java
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ VersionedUnMarshaller.java 19 May 2007 02:22:17 -0000 1.1.4.2
@@ -0,0 +1,52 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.remoting.marshal;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.Map;
+
+/**
+ * @author <a href="ron.sigal at jboss.com">Ron Sigal</a>
+ * @version $Revision: 1.1.4.2 $
+ * <p>
+ * Copyright May 7, 2007
+ * </p>
+ */
+public interface VersionedUnMarshaller extends SerialUnMarshaller
+{
+ /**
+ * Will read from the inputstream and converty contents to java Object.
+ *
+ * @param inputStream stream to read data from to do conversion.
+ * @param metadata can be any transport specific metadata (such as headers from http transport).
+ * This can be null, depending on if transport supports metadata.
+ * @param version wire format version
+ *
+ * @return
+ * @throws IOException all specific i/o exceptions need to be thrown as this.
+ * @throws ClassNotFoundException will be thrown if during the unmarshalling process can not find
+ * a specific class within classloader.
+ */
+ Object read(InputStream inputStream, Map metadata, int version)
+ throws IOException, ClassNotFoundException;
+}
More information about the jboss-cvs-commits
mailing list