[jboss-cvs] JBossRemoting/src/main/org/jboss/remoting/serialization ...

Ron Sigal ron_sigal at yahoo.com
Fri May 18 22:24:17 EDT 2007


  User: rsigal  
  Date: 07/05/18 22:24:17

  Modified:    src/main/org/jboss/remoting/serialization  Tag: remoting_2_x
                        SerializationManager.java
  Log:
  JBREM-714: Added versioned versions of receiveObject(), sendObject().
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.8.4.1   +18 -3     JBossRemoting/src/main/org/jboss/remoting/serialization/SerializationManager.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: SerializationManager.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossRemoting/src/main/org/jboss/remoting/serialization/SerializationManager.java,v
  retrieving revision 1.8
  retrieving revision 1.8.4.1
  diff -u -b -r1.8 -r1.8.4.1
  --- SerializationManager.java	7 Jul 2006 20:29:59 -0000	1.8
  +++ SerializationManager.java	19 May 2007 02:24:17 -0000	1.8.4.1
  @@ -29,11 +29,13 @@
   import java.io.ObjectOutputStream;
   import java.io.OutputStream;
   
  +import org.jboss.remoting.Version;
  +
   /**
    * Controls the creation of ObjectInputStream, ObjectOutputStream.
    * <p/>
    * It is important that implementation of this class needs to be stateless.
  - * $Id: SerializationManager.java,v 1.8 2006/07/07 20:29:59 csuconic Exp $
  + * $Id: SerializationManager.java,v 1.8.4.1 2007/05/19 02:24:17 rsigal Exp $
    *
    * @author <a href="mailto:tclebert.suconic at jboss.com">Clebert Suconic</a>
    */
  @@ -53,7 +55,13 @@
       */
      public abstract IMarshalledValue createdMarshalledValue(Object source) throws IOException;
   
  -   public abstract void sendObject(ObjectOutputStream output, Object dataObject) throws IOException;
  +   public void sendObject(ObjectOutputStream output, Object dataObject) throws IOException
  +   {
  +      int version = Version.getDefaultVersion();
  +      sendObject(output, dataObject, version);
  +   }
  +   
  +   public abstract void sendObject(ObjectOutputStream output, Object dataObject, int version) throws IOException;
      
      /** Used in call by value operations.
       * This will use the most effective way */
  @@ -63,5 +71,12 @@
       * This was a refactory of a method usually existent on {@link org.jboss.remoting.marshal.serializable.SerializableUnMarshaller}.
       * That's why we are using InputStream instead of ObjectInputStream as a parameter here.
       */
  -   public abstract Object receiveObject(InputStream input, ClassLoader customClassLoader) throws IOException, ClassNotFoundException;
  +   public Object receiveObject(InputStream input, ClassLoader customClassLoader) throws IOException, ClassNotFoundException
  +   {
  +      int version = Version.getDefaultVersion();
  +      return receiveObject(input, customClassLoader, version);
  +   }
  +   
  +   public abstract Object receiveObject(InputStream input, ClassLoader customClassLoader, int version) throws IOException, ClassNotFoundException;
  +
   }
  
  
  



More information about the jboss-cvs-commits mailing list