[jboss-cvs] JBossRemoting/src/main/org/jboss/remoting/transport/http ...
Ron Sigal
ron_sigal at yahoo.com
Fri May 18 22:38:24 EDT 2007
User: rsigal
Date: 07/05/18 22:38:24
Modified: src/main/org/jboss/remoting/transport/http Tag:
remoting_2_x HTTPClientInvoker.java
Log:
JBREM-714: Added special handling for VersionedMarshaller/VersionedUnMarshaller().
Revision Changes Path
No revision
No revision
1.31.2.4 +11 -2 JBossRemoting/src/main/org/jboss/remoting/transport/http/HTTPClientInvoker.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: HTTPClientInvoker.java
===================================================================
RCS file: /cvsroot/jboss/JBossRemoting/src/main/org/jboss/remoting/transport/http/HTTPClientInvoker.java,v
retrieving revision 1.31.2.3
retrieving revision 1.31.2.4
diff -u -b -r1.31.2.3 -r1.31.2.4
--- HTTPClientInvoker.java 22 Feb 2007 09:36:58 -0000 1.31.2.3
+++ HTTPClientInvoker.java 19 May 2007 02:38:24 -0000 1.31.2.4
@@ -33,6 +33,8 @@
import org.jboss.remoting.marshal.MarshalFactory;
import org.jboss.remoting.marshal.Marshaller;
import org.jboss.remoting.marshal.UnMarshaller;
+import org.jboss.remoting.marshal.VersionedMarshaller;
+import org.jboss.remoting.marshal.VersionedUnMarshaller;
import org.jboss.remoting.marshal.compress.CompressingUnMarshaller;
import org.jboss.remoting.marshal.http.HTTPMarshaller;
import org.jboss.remoting.marshal.serializable.SerializableUnMarshaller;
@@ -270,6 +272,9 @@
conn.setRequestMethod(type);
OutputStream stream = conn.getOutputStream();
+ if (marshaller instanceof VersionedMarshaller)
+ ((VersionedMarshaller) marshaller).write(invocation, stream, Version.getDefaultVersion());
+ else
marshaller.write(invocation, stream);
responseCode = conn.getResponseCode();
InputStream is = (responseCode < 400) ? conn.getInputStream() : conn.getErrorStream();
@@ -460,7 +465,11 @@
unmarshaller = new CompressingUnMarshaller(MarshalFactory.getUnMarshaller(SerializableUnMarshaller.DATATYPE));
}
- result = unmarshaller.read(is, metadata == null ? headers : metadata);
+ Map map = metadata == null ? headers : metadata;
+ if (unmarshaller instanceof VersionedUnMarshaller)
+ result = ((VersionedUnMarshaller)unmarshaller).read(is, map, Version.getDefaultVersion());
+ else
+ result = unmarshaller.read(is, map);
return result;
}
More information about the jboss-cvs-commits
mailing list