[jboss-remoting-commits] JBoss Remoting SVN: r5593 - in remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3: spi and 1 other directory.

jboss-remoting-commits at lists.jboss.org jboss-remoting-commits at lists.jboss.org
Fri Nov 13 16:50:09 EST 2009


Author: david.lloyd at jboss.com
Date: 2009-11-13 16:50:09 -0500 (Fri, 13 Nov 2009)
New Revision: 5593

Modified:
   remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/Remoting.java
   remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/spi/ProtocolServiceType.java
Log:
Marshallers should be registered by descriptor to provide access to version ranges

Modified: remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/Remoting.java
===================================================================
--- remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/Remoting.java	2009-11-13 21:49:25 UTC (rev 5592)
+++ remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/Remoting.java	2009-11-13 21:50:09 UTC (rev 5593)
@@ -143,7 +143,7 @@
             for (String name : found.keySet()) {
                 final MarshallerFactory marshallerFactory = found.get(name).getMarshallerFactory();
                 try {
-                    endpoint.addProtocolService(ProtocolServiceType.MARSHALLER_FACTORY, name, marshallerFactory);
+                    endpoint.addProtocolService(ProtocolServiceType.MARSHALLER_PROVIDER_DESCRIPTOR, name, marshallerFactory);
                 } catch (DuplicateRegistrationException e) {
                     log.debug("Duplicate registration for '" + name + "' of " + MarshallerFactory.class);
                 }

Modified: remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/spi/ProtocolServiceType.java
===================================================================
--- remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/spi/ProtocolServiceType.java	2009-11-13 21:49:25 UTC (rev 5592)
+++ remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/spi/ProtocolServiceType.java	2009-11-13 21:50:09 UTC (rev 5593)
@@ -22,12 +22,12 @@
 
 package org.jboss.remoting3.spi;
 
-import org.jboss.marshalling.MarshallerFactory;
 import org.jboss.marshalling.ClassTable;
 import org.jboss.marshalling.ObjectTable;
 import org.jboss.marshalling.ClassResolver;
 import org.jboss.marshalling.ObjectResolver;
 import org.jboss.marshalling.ClassExternalizerFactory;
+import org.jboss.marshalling.ProviderDescriptor;
 import java.io.Serializable;
 
 public final class ProtocolServiceType<T> implements Serializable {
@@ -65,7 +65,7 @@
         }
     }
 
-    public static final ProtocolServiceType<MarshallerFactory> MARSHALLER_FACTORY;
+    public static final ProtocolServiceType<ProviderDescriptor> MARSHALLER_PROVIDER_DESCRIPTOR;
 
     public static final ProtocolServiceType<ClassTable> CLASS_TABLE;
 
@@ -90,7 +90,7 @@
     static {
         int index = 0;
         SERVICE_TYPES = new ProtocolServiceType<?>[] {
-                MARSHALLER_FACTORY = new ProtocolServiceType<MarshallerFactory>(MarshallerFactory.class, "MARSHALLER_FACTORY", "Marshaller factory", index++),
+                MARSHALLER_PROVIDER_DESCRIPTOR = new ProtocolServiceType<ProviderDescriptor>(ProviderDescriptor.class, "MARSHALLER_FACTORY", "Marshaller factory", index++),
                 CLASS_TABLE = new ProtocolServiceType<ClassTable>(ClassTable.class, "CLASS_TABLE", "Class table", index++),
                 OBJECT_TABLE = new ProtocolServiceType<ObjectTable>(ObjectTable.class, "OBJECT_TABLE", "Object table", index++),
                 CLASS_RESOLVER = new ProtocolServiceType<ClassResolver>(ClassResolver.class, "CLASS_RESOLVER", "Class resolver", index++),



More information about the jboss-remoting-commits mailing list