summaryrefslogtreecommitdiff
path: root/org
diff options
context:
space:
mode:
authorAudrius Meskauskas <audriusa@Bioinformatics.org>2005-10-02 19:57:59 +0000
committerAudrius Meskauskas <audriusa@Bioinformatics.org>2005-10-02 19:57:59 +0000
commit1ae69e4e117f16a6f054d25da0de26f83fe5b43e (patch)
treeb51b94a3ca68cd1811721bfd973beb21f466989e /org
parent61e82a839a0195d6878f26f82e55ac1d414cc802 (diff)
downloadclasspath-1ae69e4e117f16a6f054d25da0de26f83fe5b43e.tar.gz
2005-10-02 Audrius Meskauskas <AudriusA@Bioinformatics.org>
* gnu/CORBA/CDR/ArrayValueHelper.java, gnu/CORBA/CDR/IDLTypeHelper.java, gnu/CORBA/CDR/UnknownExceptionCtxHandler.java, gnu/CORBA/CDR/gnuRuntime.java, gnu/CORBA/CDR/gnuValueStream.java, gnu/CORBA/CDR/VMVio.java, gnu/CORBA/IorProvider.java, gnu/javax/rmi/CORBA/TieTargetRecord.java, gnu/javax/rmi/CORBA/ValueHandlerDelegateImpl.java, gnu/javax/rmi/CORBA/corbaObjectInput.java, gnu/javax/rmi/CORBA/corbaObjectOutput.java, gnu/javax/rmi/CORBA/dwoTester.java, gnu/javax/rmi/CORBA/gnuRmiUtil.java: New files. * gnu/CORBA/CDR/aligningInputStream.java, gnu/CORBA/CDR/aligningOutputStream.java: gnu/CORBA/CDR/Vio.java, gnu/CORBA/CDR/cdrBufInput.java, gnu/CORBA/CDR/cdrBufOutput.java, gnu/CORBA/CDR/cdrInput.java, gnu/CORBA/CDR/cdrOutput.java, gnu/CORBA/CDR/noHeaderInput.java, gnu/CORBA/Functional_ORB.java, gnu/CORBA/GIOP/MessageHeader.java, gnu/CORBA/GIOP/ServiceContext.java, gnu/CORBA/IOR_Delegate.java, gnu/CORBA/IOR_contructed_object.java, gnu/CORBA/Interceptor/Registrator.java, gnu/CORBA/NamingService/NameParser.java, gnu/CORBA/NamingService/NamingServiceTransient.java, gnu/CORBA/ObjectCreator.java, gnu/CORBA/Poa/LocalDelegate.java, gnu/CORBA/Poa/ORB_1_4.java, gnu/CORBA/Poa/gnuPOA.java, gnu/CORBA/Poa/gnuServantObject.java, gnu/CORBA/Simple_delegate.java, gnu/CORBA/gnuAny.java, gnu/CORBA/gnuRequest.java, org/omg/CORBA/OMGVMCID.java, org/omg/CORBA/StringValueHelper.java, org/omg/CORBA/SystemException.java, org/omg/CORBA/WStringValueHelper.java, org/omg/CORBA/portable/ObjectImpl.java, org/omg/CORBA_2_3/ORB.java, org/omg/CORBA_2_3/portable/InputStream.java, org/omg/CORBA_2_3/portable/OutputStream.java: Modified to support RMI over CORBA mechanism. * gnu/javax/rmi/CORBA/DelegateFactory.java, gnu/javax/rmi/CORBA/PortableRemoteObjectDelegateImpl.java, gnu/javax/rmi/CORBA/StubDelegateImpl.java, gnu/javax/rmi/CORBA/UtilDelegateImpl.java, javax/rmi/CORBA/ClassDesc.java, javax/rmi/CORBA/PortableRemoteObjectDelegate.java, javax/rmi/CORBA/Stub.java, javax/rmi/CORBA/StubDelegate.java, javax/rmi/CORBA/Tie.java, javax/rmi/CORBA/Util.java, javax/rmi/CORBA/UtilDelegate.java, javax/rmi/CORBA/ValueHandler.java, javax/rmi/CORBA/package.html, javax/rmi/PortableRemoteObject.java, javax/rmi/package.html: New files (replacing). * gnu/javax/rmi/CORBA/ValueHandlerImpl.java, gnu/javax/rmi/PortableServer.java: Modified to keep the code compileable between subsequent patches.
Diffstat (limited to 'org')
-rw-r--r--org/omg/CORBA/OMGVMCID.java100
-rw-r--r--org/omg/CORBA/StringValueHelper.java2
-rw-r--r--org/omg/CORBA/SystemException.java88
-rw-r--r--org/omg/CORBA/WStringValueHelper.java2
-rw-r--r--org/omg/CORBA/portable/ObjectImpl.java4
-rw-r--r--org/omg/CORBA_2_3/ORB.java8
-rw-r--r--org/omg/CORBA_2_3/portable/InputStream.java18
-rw-r--r--org/omg/CORBA_2_3/portable/OutputStream.java66
8 files changed, 157 insertions, 131 deletions
diff --git a/org/omg/CORBA/OMGVMCID.java b/org/omg/CORBA/OMGVMCID.java
index 6c7b30810..2b2bd4bc3 100644
--- a/org/omg/CORBA/OMGVMCID.java
+++ b/org/omg/CORBA/OMGVMCID.java
@@ -1,54 +1,72 @@
/* OMGVMCID.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., 51 Franklin Street, Fifth Floor, Boston, MA
-02110-1301 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. */
+ 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., 51 Franklin Street, Fifth Floor, Boston, MA
+ 02110-1301 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.CORBA;
/**
- * Holds a single constant, specifying, that
- * The vendor minor code ID reserved for the Object Management Group
- * (http://www.omg.org).
+ * </p>
+ * The higher 20 bits of any CORBA exception hold "Vendor Minor Codeset ID"
+ * (VMCID), for instance 0x4F4D0000 (OMG standard), 0x54410000 (TAO), 0x4A430000
+ * (JacORB), 0x49540000 (IONA), 0x53550000 (Sun).
+ * </p>
+ * <p>
+ * GNU Classpath official vendor minor code set id is 0x47430000 ("GC\x00\x00"),
+ * and the reserved space spans till 0x47430FFF, allowing to use up to 4096
+ * Classpath specific exceptions. It was assigned 30/09/2005 by OMG Vice President
+ * Andrew Watson.
+ * </p>
+ * <p>
+ * The standard minor codes for the standard system exceptions are prefaced by
+ * the VMCID assigned to OMG, defined as 0x4F4D0000 (the code of the minor field
+ * for the standard exception with minor code 1 is 0x4F4D0001). Within a vendor
+ * assigned space, the assignment of values to minor codes is left to the
+ * vendor.
+ * </p>
+ *
+ * <p>
+ * The VMCID 0 and 0xFFFFF0000 are reserved for experimental use.
+ * </p>
*
* @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
*/
public interface OMGVMCID
{
/**
- * The vendor minor code ID (1330446336) reserved for the Object
- * Management Group (http://www.omg.org).
+ * The OMG vendor minor code ID.
*/
- int value = 1330446336;
+ int value = 0x4F4D0000;
}
diff --git a/org/omg/CORBA/StringValueHelper.java b/org/omg/CORBA/StringValueHelper.java
index 97d0e7a5d..c75accdd0 100644
--- a/org/omg/CORBA/StringValueHelper.java
+++ b/org/omg/CORBA/StringValueHelper.java
@@ -39,9 +39,7 @@ exception statement from your version. */
package org.omg.CORBA;
import gnu.CORBA.Restricted_ORB;
-import gnu.CORBA.gnuAny;
-import org.omg.CORBA.TypeCodePackage.BadKind;
import org.omg.CORBA.portable.BoxedValueHelper;
import org.omg.CORBA.portable.InputStream;
import org.omg.CORBA.portable.OutputStream;
diff --git a/org/omg/CORBA/SystemException.java b/org/omg/CORBA/SystemException.java
index 85396ee53..d7af7b0be 100644
--- a/org/omg/CORBA/SystemException.java
+++ b/org/omg/CORBA/SystemException.java
@@ -1,39 +1,39 @@
/* SystemException.java --
- Copyright (C) 2005 Free Software Foundation, Inc.
+ Copyright (C) 2005 Free Software Foundation, Inc.
-This file is part of GNU Classpath.
+ 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 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.
+ 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., 51 Franklin Street, Fifth Floor, Boston, MA
-02110-1301 USA.
+ 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., 51 Franklin Street, Fifth Floor, Boston, MA
+ 02110-1301 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.
+ 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. */
+ 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.CORBA;
@@ -42,6 +42,7 @@ import java.io.Serializable;
/**
* The root class for all CORBA standard exceptions.
+ *
* @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
*/
public class SystemException
@@ -49,8 +50,7 @@ public class SystemException
implements Serializable
{
/**
- * Use serialVersionUID for interoperability.
- * Using the version 1.4 UID.
+ * Use serialVersionUID for interoperability. Using the version 1.4 UID.
*/
private static final long serialVersionUID = -8486391734674855519L;
@@ -60,20 +60,36 @@ public class SystemException
public CompletionStatus completed;
/**
- * The additional exception error code ("minor").
+ * <p>
+ * Contains more details about the exception. The lower 12 bits contain a
+ * code, defining the reason why exception has been thrown. The higher 20 bits
+ * hold "Vendor Minor Codeset ID" (VMCID), for instance 0x4F4D0000 (OMG
+ * standard), 0x54410000 (TAO), 0x4A430000 (JacORB), 0x49540000 (IONA) or
+ * 0x53550000 (Sun).
+ * </p>
+ *
+ * <p>
+ * The standard minor codes for the standard system exceptions are prefaced by
+ * the VMCID assigned to OMG, defined as 0x4F4D0000 (the code of
+ * the minor field for the standard exception with minor code 1 is
+ * 0x4F4D0001). Within a vendor assigned space, the assignment of values to
+ * minor codes is left to the vendor.
+ * </p>
+ *
+ * The VMCID 0 and 0xfffff are reserved for experimental use.
*/
public int minor;
/**
* Constructs an instance of the CORBA standard exception.
- * @param a_reason a string, explaining the reason why the
- * exceptions has been thrown.
+ *
+ * @param a_reason a string, explaining the reason why the exceptions has been
+ * thrown.
* @param a_minor an additional error code (known as the "minor")
* @param a_completed the task completion status.
*/
protected SystemException(String a_reason, int a_minor,
- CompletionStatus a_completed
- )
+ CompletionStatus a_completed)
{
super(a_reason);
minor = a_minor;
diff --git a/org/omg/CORBA/WStringValueHelper.java b/org/omg/CORBA/WStringValueHelper.java
index 7748a6c78..54944b304 100644
--- a/org/omg/CORBA/WStringValueHelper.java
+++ b/org/omg/CORBA/WStringValueHelper.java
@@ -39,9 +39,7 @@ exception statement from your version. */
package org.omg.CORBA;
import gnu.CORBA.Restricted_ORB;
-import gnu.CORBA.gnuAny;
-import org.omg.CORBA.TypeCodePackage.BadKind;
import org.omg.CORBA.portable.BoxedValueHelper;
import org.omg.CORBA.portable.InputStream;
import org.omg.CORBA.portable.OutputStream;
diff --git a/org/omg/CORBA/portable/ObjectImpl.java b/org/omg/CORBA/portable/ObjectImpl.java
index 3cf1f4977..f2f21a79e 100644
--- a/org/omg/CORBA/portable/ObjectImpl.java
+++ b/org/omg/CORBA/portable/ObjectImpl.java
@@ -60,9 +60,9 @@ public abstract class ObjectImpl
implements org.omg.CORBA.Object
{
/**
- * The vendor - dependent delegate, responsible for the method implementations.
+ * The delegate, responsible for the method implementations.
*/
- private Delegate delegate;
+ transient Delegate delegate;
/**
* Create a request to invoke the method of this object, specifying
diff --git a/org/omg/CORBA_2_3/ORB.java b/org/omg/CORBA_2_3/ORB.java
index 7a9dc6a1a..82660fea7 100644
--- a/org/omg/CORBA_2_3/ORB.java
+++ b/org/omg/CORBA_2_3/ORB.java
@@ -117,11 +117,9 @@ public abstract class ORB
}
/**
- * Up till OMG 3.0.3 inclusive and also in Suns API till 1.4
- * inclusive this is totally undocumented. No problem, though,
- * because is in addition not implemented.
- *
- * @throws NO_IMPLEMENT, always.
+ * This method is called by RMI-IIOP {@link javax.rmi.Tie#orb(ORB)},
+ * passing <code>this</code> as parameter. The ORB will try to connect
+ * that tie as one of its objects.
*/
public void set_delegate(java.lang.Object wrapper)
{
diff --git a/org/omg/CORBA_2_3/portable/InputStream.java b/org/omg/CORBA_2_3/portable/InputStream.java
index 06ee33e66..23055ef2d 100644
--- a/org/omg/CORBA_2_3/portable/InputStream.java
+++ b/org/omg/CORBA_2_3/portable/InputStream.java
@@ -40,9 +40,9 @@ package org.omg.CORBA_2_3.portable;
import gnu.CORBA.CDR.Vio;
-import org.omg.CORBA.MARSHAL;
+import org.omg.CORBA.CustomMarshal;
import org.omg.CORBA.portable.BoxedValueHelper;
-import org.omg.CORBA.portable.ValueFactory;
+import org.omg.CORBA.portable.StreamableValue;
import java.io.Serializable;
@@ -78,12 +78,12 @@ public abstract class InputStream
*/
public Object read_abstract_interface()
{
- boolean isValue = read_boolean();
+ boolean isObject = read_boolean();
- if (isValue)
- return read_value();
- else
+ if (isObject)
return read_Object();
+ else
+ return read_value();
}
/**
@@ -192,11 +192,7 @@ public abstract class InputStream
*/
public Serializable read_value(String repository_id)
{
- ValueFactory factory =
- ((org.omg.CORBA_2_3.ORB) orb()).lookup_value_factory(repository_id);
- if (factory == null)
- throw new MARSHAL("No factory");
- return (Serializable) Vio.read(this, null, factory);
+ return Vio.read(this, repository_id);
}
/**
diff --git a/org/omg/CORBA_2_3/portable/OutputStream.java b/org/omg/CORBA_2_3/portable/OutputStream.java
index 2ff8c226a..70f9a4913 100644
--- a/org/omg/CORBA_2_3/portable/OutputStream.java
+++ b/org/omg/CORBA_2_3/portable/OutputStream.java
@@ -64,40 +64,40 @@ public abstract class OutputStream
extends org.omg.CORBA.portable.OutputStream
{
/**
- * Writes an abstract interface to the stream. An abstract interface can
- * be eithe CORBA object or value type and is written as a union with
- * the boolean discriminator (false for objects, true for value types).
- *
- * The object from value is separated by fact that all values implement
- * the {@link ValueBase} interface. Also, the passed parameter is treated
- * as value it it does not implement CORBA Object.
- *
+ * Writes an abstract interface to the stream. An abstract interface can be
+ * eithe CORBA object or value type and is written as a union with the boolean
+ * discriminator (false for objects, true for value types).
+ *
+ * The object from value is separated by fact that all values implement the
+ * {@link ValueBase} interface. Also, the passed parameter is treated as value
+ * it it does not implement CORBA Object.
+ *
* @param an_interface an abstract interface to write.
*/
public void write_abstract_interface(java.lang.Object an_interface)
{
- boolean isValue =
- an_interface instanceof ValueBase ||
- (!(an_interface instanceof org.omg.CORBA.Object));
+ boolean isObject = !(an_interface instanceof ValueBase)
+ && an_interface instanceof org.omg.CORBA.Object;
- write_boolean(isValue);
+ write_boolean(isObject);
- if (isValue)
- write_value((ValueBase) an_interface);
- else
+ if (isObject)
write_Object((org.omg.CORBA.Object) an_interface);
+ else
+ write_value((Serializable) an_interface);
+
}
/**
* Writes a value type into the output stream.
- *
- * The value type must implement either {@link CustomValue}
- * (for user-defined writing method) or {@link StramableValue}
- * (for standard writing using code, generated by IDL compiler).
- *
- * The written record will have a repository id, matching the
- * class of the passed object. The codebase will not be written.
- *
+ *
+ * The value type must implement either {@link CustomValue} (for user-defined
+ * writing method) or {@link StramableValue} (for standard writing using code,
+ * generated by IDL compiler).
+ *
+ * The written record will have a repository id, matching the class of the
+ * passed object. The codebase will not be written.
+ *
* @param value a value type object to write.
*/
public void write_value(Serializable value)
@@ -124,7 +124,9 @@ public abstract class OutputStream
* Writes a value type into the output stream, stating it is an
* instance of the given class. The written record
* will have a repository id, matching the passed class.
- * The codebase will not be written.
+ * The codebase will not be written. It the object
+ * being written is an instance of the different class, this results
+ * writing two Id inheritance hierarchy.
*
* The value type must implement either {@link CustomValue}
* (for user-defined writing method) or {@link StramableValue}
@@ -138,15 +140,15 @@ public abstract class OutputStream
}
/**
- * Writes a value type into the output stream,
- * stating it has the given repository id.
- *
- * The value type must implement either {@link CustomValue}
- * (for user-defined writing method) or {@link StramableValue}
- * (for standard writing using code, generated by IDL compiler).
- *
+ * Writes a value type into the output stream, stating it has the given
+ * repository id.
+ *
+ * The value type must implement either {@link CustomValue} (for user-defined
+ * writing method) or {@link StramableValue} (for standard writing using code,
+ * generated by IDL compiler).
+ *
* @param repository_id a repository id of the value type.
- *
+ *
* @param value a value type object to write.
*/
public void write_value(Serializable value, String repository_id)