classpath-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[cp-patches] FYI: Migrating to 1.3.


From: Meskauskas Audrius
Subject: [cp-patches] FYI: Migrating to 1.3.
Date: Tue, 28 Jun 2005 16:19:24 +0200
User-agent: Mozilla Thunderbird 1.0.2 (Windows/20050317)

I decided to add BindingIteratorOperations amd NamingContextOperations
as the ancestors for to the BindingIterator and NamingContext. All methods,
defined in the BindingIterator and NamingContext in 1.2, migrate into they
*Operations interfaces in the later versions.

I still keep the same method definitions in BindingIterator and NamingContext,
but marked them by @specnote, indicating they are 1.2 specific.

This path also adds several other changes, required to reach 1.3 API compatibility
in CORBA sector.

2005-06-28  Audrius Meskauskas  <address@hidden>

   * org/omg/CosNaming/BindingIterator.java: Inherit from
   BindingIteratorOperations, added specnotes for 1.2 specific methods.
   * org/omg/CosNaming/NamingContext.java: Inherit from
   NamingContextOperations, added specnotes for 1.2 specific methods.
   * org/omg/IOP/Encoding.java,
   org/omg/IOP/TaggedComponent.java,
   org/omg/IOP/TaggedProfile.java: Inherit from Serializable, added
   SerialVersionUID.
   org/omg/CosNaming/BindingIteratorOperations.java,
   org/omg/Dynamic/Parameter.java: New files.
? org/omg/Dynamic
? org/omg/CosNaming/BindingIteratorOperations.java
Index: org/omg/CosNaming/BindingIterator.java
===================================================================
RCS file: /cvsroot/classpath/classpath/org/omg/CosNaming/BindingIterator.java,v
retrieving revision 1.2
diff -u -r1.2 BindingIterator.java
--- org/omg/CosNaming/BindingIterator.java      17 May 2005 08:27:54 -0000      
1.2
+++ org/omg/CosNaming/BindingIterator.java      28 Jun 2005 13:32:54 -0000
@@ -48,12 +48,15 @@
  * @author Audrius Meskauskas, Lithuania (address@hidden)
  */
 public interface BindingIterator
-  extends org.omg.CORBA.Object, Serializable, IDLEntity
+  extends BindingIteratorOperations, org.omg.CORBA.Object, Serializable,
+          IDLEntity
 {
   /**
    * Destroy the iterator on the server side. This must always be
    * called, as otherwise the iterator will remain on the server even
    * after the client application terminates.
+   *
+   * @specnote since 1.3 this method has moved into BindingIteratorOperations.
    */
   void destroy();
 
@@ -65,6 +68,8 @@
    *
    * @return false if there are no more bindings available,
    * true otherwise.
+   *
+   * @specnote since 1.3 this method has moved into BindingIteratorOperations.
    */
   boolean next_n(int amount, BindingListHolder a_list);
 
@@ -75,6 +80,8 @@
    *
    * @return false if there are no more bindings available, true
    * otherwise.
+   *
+   * @specnote since 1.3 this method has moved into BindingIteratorOperations.
    */
   boolean next_one(BindingHolder a_binding);
-}
+}
\ No newline at end of file
Index: org/omg/CosNaming/NamingContext.java
===================================================================
RCS file: /cvsroot/classpath/classpath/org/omg/CosNaming/NamingContext.java,v
retrieving revision 1.1
diff -u -r1.1 NamingContext.java
--- org/omg/CosNaming/NamingContext.java        15 May 2005 01:09:30 -0000      
1.1
+++ org/omg/CosNaming/NamingContext.java        28 Jun 2005 13:34:06 -0000
@@ -56,7 +56,7 @@
  * @author Audrius Meskauskas, Lithuania (address@hidden)
  */
 public interface NamingContext
-  extends org.omg.CORBA.Object, IDLEntity
+  extends NamingContextOperations, org.omg.CORBA.Object, IDLEntity
 {
   /**
    * Gives the object a name, valid in this context.
@@ -66,6 +66,8 @@
    *
    * @throws AlreadyBound if the object is already named in this context.
    * @throws InvalidName if the name has zero length or otherwise invalid.
+   *
+   * @specnote since 1.3 this method has moved into NamingContextOperations.
    */
   void bind(NameComponent[] a_name, org.omg.CORBA.Object an_object)
      throws NotFound, CannotProceed, InvalidName, AlreadyBound;
@@ -78,6 +80,8 @@
    *
    * @throws AlreadyBound if the child context is already named in
    * the current context.
+   *
+   * @specnote since 1.3 this method has moved into NamingContextOperations.
    */
   void bind_context(NameComponent[] a_name, NamingContext a_context)
              throws NotFound, CannotProceed, InvalidName, AlreadyBound;
@@ -92,6 +96,8 @@
    *
    * @throws AlreadyBound if the name is already in use.
    * @throws InvalidName if the name has zero length or otherwise invalid.
+   *
+   * @specnote since 1.3 this method has moved into NamingContextOperations.
    */
   NamingContext bind_new_context(NameComponent[] a_name)
                           throws NotFound, AlreadyBound, CannotProceed,
@@ -100,6 +106,8 @@
   /**
    * Destroy this context (must be empty).
    * @throws NotEmpty if the context being destroyed is not empty.
+   *
+   * @specnote since 1.3 this method has moved into NamingContextOperations.
    */
   void destroy()
         throws NotEmpty;
@@ -115,11 +123,15 @@
    * @param a_list the holder, where the returned bindigs are stored.
    * @param an_iter the iterator that can be used to access the remaining
    * bindings.
+   *
+   * @specnote since 1.3 this method has moved into NamingContextOperations.
    */
   void list(int amount, BindingListHolder a_list, BindingIteratorHolder 
an_iter);
 
   /**
    * Creates a new naming context, not bound to any name.
+   *
+   * @specnote since 1.3 this method has moved into NamingContextOperations.
    */
   NamingContext new_context();
 
@@ -132,6 +144,8 @@
    * @param an_object the object, being named.
    *
    * @throws InvalidName if the name has zero length or otherwise invalid.
+   *
+   * @specnote since 1.3 this method has moved into NamingContextOperations.
    */
   void rebind(NameComponent[] a_name, org.omg.CORBA.Object an_object)
        throws NotFound, CannotProceed, InvalidName;
@@ -145,6 +159,8 @@
    * @param a_context the child context being named.
    *
    * @throws InvalidName if the name has zero length or otherwise invalid.
+   *
+   * @specnote since 1.3 this method has moved into NamingContextOperations.
    */
   void rebind_context(NameComponent[] a_name, NamingContext a_context)
                throws NotFound, CannotProceed, InvalidName;
@@ -161,6 +177,8 @@
    *
    * @throws NotFound
    * @throws InvalidName if the name has zero length or otherwise invalid.
+   *
+   * @specnote since 1.3 this method has moved into NamingContextOperations.
    */
   org.omg.CORBA.Object resolve(NameComponent[] a_name)
                         throws NotFound, CannotProceed, InvalidName;
@@ -171,7 +189,9 @@
    * @param a_name a name to remove.
    *
    * @throws InvalidName if the name has zero length or otherwise invalid.
+   *
+   * @specnote since 1.3 this method has moved into NamingContextOperations.
    */
   void unbind(NameComponent[] a_name)
        throws NotFound, CannotProceed, InvalidName;
-}
+}
\ No newline at end of file
Index: org/omg/IOP/Encoding.java
===================================================================
RCS file: /cvsroot/classpath/classpath/org/omg/IOP/Encoding.java,v
retrieving revision 1.1
diff -u -r1.1 Encoding.java
--- org/omg/IOP/Encoding.java   21 Jun 2005 15:17:43 -0000      1.1
+++ org/omg/IOP/Encoding.java   28 Jun 2005 12:49:40 -0000
@@ -40,6 +40,8 @@
 
 import org.omg.CORBA.portable.IDLEntity;
 
+import java.io.Serializable;
+
 /**
  * Defines the encoding format of the address@hidden Codec}, including the 
major
  * and minor version numbers. The only currently supported encodings are
@@ -49,9 +51,14 @@
  * @author Audrius Meskauskas, Lithuania (address@hidden)
  */
 public class Encoding
-  implements IDLEntity
+  implements IDLEntity, Serializable
 {
   /**
+   * Use serialVersionUID (v1.4) for interoperability.
+   */
+  private static final long serialVersionUID = -1489257079856841992L;
+
+  /**
    * The format of encoding. For instance, address@hidden 
ENCODING_CDR_ENCAPS#value}.
    */
   public short format;
Index: org/omg/IOP/TaggedComponent.java
===================================================================
RCS file: /cvsroot/classpath/classpath/org/omg/IOP/TaggedComponent.java,v
retrieving revision 1.1
diff -u -r1.1 TaggedComponent.java
--- org/omg/IOP/TaggedComponent.java    21 Jun 2005 15:17:43 -0000      1.1
+++ org/omg/IOP/TaggedComponent.java    28 Jun 2005 12:53:44 -0000
@@ -40,6 +40,8 @@
 
 import org.omg.CORBA.portable.IDLEntity;
 
+import java.io.Serializable;
+
 /**
 * The tagged component in a part of the address@hidden TaggedProfile}.
 * The examples of the possible components inside the tag are
@@ -55,9 +57,14 @@
 * @author Audrius Meskauskas, Lithuania (address@hidden)
 */
 public class TaggedComponent
-  implements IDLEntity
+  implements IDLEntity, Serializable
 {
   /**
+   * Use serialVersionUID (v1.4) for interoperability.
+   */
+  private static final long serialVersionUID = -2084695346022761692L;
+
+  /**
    * The integer tag identifier, for instance, TAG_CODE_SETS.value.
    */
   public int tag;
Index: org/omg/IOP/TaggedProfile.java
===================================================================
RCS file: /cvsroot/classpath/classpath/org/omg/IOP/TaggedProfile.java,v
retrieving revision 1.1
diff -u -r1.1 TaggedProfile.java
--- org/omg/IOP/TaggedProfile.java      21 Jun 2005 15:17:43 -0000      1.1
+++ org/omg/IOP/TaggedProfile.java      28 Jun 2005 12:53:44 -0000
@@ -40,6 +40,8 @@
 
 import org.omg.CORBA.portable.IDLEntity;
 
+import java.io.Serializable;
+
 /**
 * The TaggedProfile if part of the address@hidden IOR}, defining a single 
specific
 * aspect of the object related information. The content of profile depends
@@ -71,9 +73,14 @@
 * @author Audrius Meskauskas, Lithuania (address@hidden)
 */
 public class TaggedProfile
-  implements IDLEntity
+  implements IDLEntity, Serializable
 {
   /**
+   * Use serialVersionUID (v1.4) for interoperability.
+   */
+  private static final long serialVersionUID = -461232684387903343L;
+
+  /**
    * The integer tag identifier, typically one of TAG_INTERNET_IOP.value or
    * TAG_MULTIPLE_COMPONENTS.value.
    */
/* Parameter.java --
   Copyright (C) 2005 Free Software Foundation, Inc.

This file is part of GNU Classpath.

GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.

GNU Classpath 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
General Public License for more details.

You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING.  If not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA.

Linking this library statically or dynamically with other modules is
making a combined work based on this library.  Thus, the terms and
conditions of the GNU General Public License cover the whole
combination.

As a special exception, the copyright holders of this library give you
permission to link this library with independent modules to produce an
executable, regardless of the license terms of these independent
modules, and to copy and distribute the resulting executable under
terms of your choice, provided that you also meet, for each linked
independent module, the terms and conditions of the license of that
module.  An independent module is a module which is not derived from
or based on this library.  If you modify this library, you may extend
this exception to your version of the library, but you are not
obligated to do so.  If you do not wish to do so, delete this
exception statement from your version. */


package org.omg.Dynamic;

import org.omg.CORBA.Any;
import org.omg.CORBA.ParameterMode;
import org.omg.CORBA.portable.IDLEntity;

import java.io.Serializable;

/**
 * When representing the information about a request,
 * defines a one of the arguments for the operation being invoked.
 *
 * @see org.omg.PortableInterceptor.RequestInfoOperation#arguments()
 *
 * @author Audrius Meskauskas, Lithuania (address@hidden)
 */
public class Parameter
  implements IDLEntity, Serializable
{
  /**
   * Use serialVersionUID (v1.4) for interoperability.
   */
  private static final long serialVersionUID = 892191606993734699L;

  /**
   * The address@hidden Any}, holding the value of the parameter.
   */
  public Any argument;

  /**
   * The mode of the parameter. Specifies if the parameter is used
   * to pass the value to the method, to return the value from the
   * method or for both of these purposes.
   */
  public ParameterMode mode;

  /**
   * Create the unitialised instance.
   */
  public Parameter()
  {
  }

  /**
   * Create an instance, initialising field to the passed values.
   */
  public Parameter(Any an_argument, ParameterMode a_mode)
  {
    argument = an_argument;
    mode = a_mode;
  }
}
/* BindingIterator.java --
   Copyright (C) 2005 Free Software Foundation, Inc.

This file is part of GNU Classpath.

GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.

GNU Classpath 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
General Public License for more details.

You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING.  If not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA.

Linking this library statically or dynamically with other modules is
making a combined work based on this library.  Thus, the terms and
conditions of the GNU General Public License cover the whole
combination.

As a special exception, the copyright holders of this library give you
permission to link this library with independent modules to produce an
executable, regardless of the license terms of these independent
modules, and to copy and distribute the resulting executable under
terms of your choice, provided that you also meet, for each linked
independent module, the terms and conditions of the license of that
module.  An independent module is a module which is not derived from
or based on this library.  If you modify this library, you may extend
this exception to your version of the library, but you are not
obligated to do so.  If you do not wish to do so, delete this
exception statement from your version. */


package org.omg.CosNaming;

/**
 * The operations, applicable for an iterator for seing the available
 * bindings.
 *
 * @since 1.3
 *
 * @author Audrius Meskauskas, Lithuania (address@hidden)
 */
public interface BindingIteratorOperations
{
  /**
   * Destroy the iterator on the server side. This must always be
   * called, as otherwise the iterator will remain on the server even
   * after the client application terminates.
   */
  void destroy();

  /**
   * Return the desired amount of bindings.
   *
   * @param amount the maximal number of bindings to return.
   * @param a_list a holder to store the returned bindings.
   *
   * @return false if there are no more bindings available,
   * true otherwise.
   */
  boolean next_n(int amount, BindingListHolder a_list);

  /**
   * Return the next binding.
   *
   * @param a_binding a holder, where the next binding will be stored.
   *
   * @return false if there are no more bindings available, true
   * otherwise.
   */
  boolean next_one(BindingHolder a_binding);
}

reply via email to

[Prev in Thread] Current Thread [Next in Thread]