summaryrefslogtreecommitdiff
path: root/org
diff options
context:
space:
mode:
authorAudrius Meskauskas <audriusa@Bioinformatics.org>2005-11-11 11:39:32 +0000
committerAudrius Meskauskas <audriusa@Bioinformatics.org>2005-11-11 11:39:32 +0000
commit6aa4ef682112732ddcebe40ca9e45c8fef914f2c (patch)
tree4b12ef9829b0d396e1238b394065b56c206faf37 /org
parentb877914598a1ee3898a56c7e457de18c3d5186ba (diff)
downloadclasspath-6aa4ef682112732ddcebe40ca9e45c8fef914f2c.tar.gz
2005-11-11 Audrius Meskauskas <AudriusA@Bioinformatics.org>
* org/omg/PortableInterceptor/IORInterceptor_3_0.java, org/omg/PortableInterceptor/IORInterceptor_3_0Helper.java, org/omg/PortableInterceptor/IORInterceptor_3_0Holder.java, org/omg/PortableInterceptor/IORInterceptor_3_0Operations.java, org/omg/PortableInterceptor/_IORInterceptor_3_0Stub.java: New files. * gnu/CORBA/Interceptor/IORInterceptors.java, gnu/CORBA/Interceptor/gnuIorInfo.java, gnu/CORBA/OrbRestricted.java, gnu/CORBA/Poa/AOM.java, gnu/CORBA/Poa/ORB_1_4.java, gnu/CORBA/Poa/gnuPOA.java, gnu/CORBA/Poa/gnuPOAManager.java, org/omg/PortableInterceptor/IORInfoOperations.java, org/omg/PortableInterceptor/IORInterceptorOperations.java, org/omg/PortableInterceptor/ORBInitInfoOperations.java, org/omg/PortableInterceptor/ObjectReferenceFactoryOperations.java: Rewritten to support the IORInterceptor_3_0.
Diffstat (limited to 'org')
-rw-r--r--org/omg/PortableInterceptor/IORInfoOperations.java41
-rw-r--r--org/omg/PortableInterceptor/IORInterceptorOperations.java6
-rw-r--r--org/omg/PortableInterceptor/IORInterceptor_3_0.java59
-rw-r--r--org/omg/PortableInterceptor/IORInterceptor_3_0Helper.java195
-rw-r--r--org/omg/PortableInterceptor/IORInterceptor_3_0Holder.java106
-rw-r--r--org/omg/PortableInterceptor/IORInterceptor_3_0Operations.java90
-rw-r--r--org/omg/PortableInterceptor/ORBInitInfoOperations.java17
-rw-r--r--org/omg/PortableInterceptor/ObjectReferenceFactoryOperations.java11
-rw-r--r--org/omg/PortableInterceptor/_IORInterceptor_3_0Stub.java272
9 files changed, 783 insertions, 14 deletions
diff --git a/org/omg/PortableInterceptor/IORInfoOperations.java b/org/omg/PortableInterceptor/IORInfoOperations.java
index 58ef02fb0..6cc374bfb 100644
--- a/org/omg/PortableInterceptor/IORInfoOperations.java
+++ b/org/omg/PortableInterceptor/IORInfoOperations.java
@@ -73,7 +73,7 @@ public interface IORInfoOperations
void add_ior_component(TaggedComponent tagged_component);
/**
- * Get the server side policy for an IOR being constructed. The method returns
+ * Get the server side policy for an IOR being constructed. The method returns
* policies applying for POA where the object, represented by this IOR, is
* connected.
*
@@ -85,4 +85,43 @@ public interface IORInfoOperations
* @see org.omg.PortableServer.POAOperations#create_POA
*/
Policy get_effective_policy(int policy_type);
+
+ /**
+ * Get the adapter template that is associated with the object POA.
+ * The template is also a reference factory and can produce the new object
+ * references.
+ *
+ * @since 1.5
+ */
+ public ObjectReferenceTemplate adapter_template();
+
+ /**
+ * The current_factory is the factory, used by the adapter to create
+ * object references. This factory is initially the same as the
+ * adapter_template.
+ *
+ * @since 1.5
+ */
+ public ObjectReferenceFactory current_factory();
+
+ /**
+ * Set the current object reference factory, used to produce the new objects.
+ *
+ * The current factory can only be set during the call to the
+ * {@link IORInterceptor_3_0Operations#components_established(IORInfo)}.
+ *
+ * @since 1.5
+ */
+ public void current_factory(ObjectReferenceFactory factory);
+
+ /**
+ * Get the POA manager Id.
+ *
+ * @return Id that uniquely refers to the poa manager, used by this POA.
+ *
+ * @since 1.5
+ *
+ * @see IORInterceptor_3_0Operations#adapter_manager_state_changed
+ */
+ public int manager_id();
} \ No newline at end of file
diff --git a/org/omg/PortableInterceptor/IORInterceptorOperations.java b/org/omg/PortableInterceptor/IORInterceptorOperations.java
index 868fcab6c..746d139cf 100644
--- a/org/omg/PortableInterceptor/IORInterceptorOperations.java
+++ b/org/omg/PortableInterceptor/IORInterceptorOperations.java
@@ -47,12 +47,12 @@ package org.omg.PortableInterceptor;
public interface IORInterceptorOperations extends InterceptorOperations
{
/**
- * A server side ORB calls this method on all registered IORInterceptor's when
+ * A server side ORB calls this method on all registered IORInterceptor's when
* creating the object reference (IOR). The interceptors have the possibility
* to add additional tags to the IOR being created.
*
- * @param info the interface class providing methods to insert additional tags
- * into IOR being constructed. The same instan
+ * @param info the interface class providing methods to insert additional tags
+ * into IOR being constructed.
*/
public void establish_components(IORInfo info);
} \ No newline at end of file
diff --git a/org/omg/PortableInterceptor/IORInterceptor_3_0.java b/org/omg/PortableInterceptor/IORInterceptor_3_0.java
new file mode 100644
index 000000000..4b2093d40
--- /dev/null
+++ b/org/omg/PortableInterceptor/IORInterceptor_3_0.java
@@ -0,0 +1,59 @@
+/* IORInterceptor_3_0.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. */
+
+
+package org.omg.PortableInterceptor;
+
+import org.omg.CORBA.portable.IDLEntity;
+
+/**
+ * The IORInterceptor_3_0 adds to {@link Interceptor} functionality, available
+ * since CORBA 3.0. These new operations are defined separately in
+ * {@link IORInterceptor_3_0Operations}.
+ *
+ * IORInterceptor_3_0 is registered exactly in the same way as the
+ * {@link IORInterceptor}. The ORB calls the additional methods to all
+ * IOR interceptors that implement this extended interface.
+ *
+ * @since 1.5
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public interface IORInterceptor_3_0
+ extends IORInterceptor_3_0Operations, IDLEntity, IORInterceptor
+{
+} \ No newline at end of file
diff --git a/org/omg/PortableInterceptor/IORInterceptor_3_0Helper.java b/org/omg/PortableInterceptor/IORInterceptor_3_0Helper.java
new file mode 100644
index 000000000..565242477
--- /dev/null
+++ b/org/omg/PortableInterceptor/IORInterceptor_3_0Helper.java
@@ -0,0 +1,195 @@
+/* IORInterceptor_3_0Helper.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. */
+
+
+package org.omg.PortableInterceptor;
+
+import gnu.CORBA.Minor;
+
+import org.omg.CORBA.Any;
+import org.omg.CORBA.BAD_OPERATION;
+import org.omg.CORBA.BAD_PARAM;
+import org.omg.CORBA.ORB;
+import org.omg.CORBA.TypeCode;
+import org.omg.CORBA.portable.Delegate;
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.ObjectImpl;
+import org.omg.CORBA.portable.OutputStream;
+
+/**
+ * The helper operations for the CORBA object {@link IORInterceptor_3_0}.
+ *
+ * @since 1.5
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public abstract class IORInterceptor_3_0Helper
+{
+ /**
+ * The cached {@link IORInterceptor_3_0} typecode, computed once.
+ */
+ private static TypeCode typeCode;
+
+ /**
+ * Get the type code of the {@link IORInterceptor_3_0}.
+ */
+ public static TypeCode type()
+ {
+ if (typeCode == null)
+ typeCode = ORB.init().create_interface_tc(id(), "IORInterceptor_3_0");
+ return typeCode;
+ }
+
+ /**
+ * Insert the IORInterceptor_3_0 into the given Any.
+ *
+ * @param any the Any to insert into.
+ * @param that the IORInterceptor_3_0 to insert.
+ */
+ public static void insert(Any any, IORInterceptor_3_0 that)
+ {
+ any.insert_Streamable(new IORInterceptor_3_0Holder(that));
+ }
+
+ /**
+ * Extract the IORInterceptor_3_0 from given Any.
+ *
+ * @throws BAD_OPERATION if the passed Any does not contain
+ * IORInterceptor_3_0.
+ */
+ public static IORInterceptor_3_0 extract(Any any)
+ {
+ try
+ {
+ IORInterceptor_3_0Holder holder = (IORInterceptor_3_0Holder)
+ any.extract_Streamable();
+ return holder.value;
+ }
+ catch (ClassCastException cex)
+ {
+ BAD_OPERATION bad = new BAD_OPERATION("IORInterceptor_3_0 expected");
+ bad.minor = Minor.Any;
+ bad.initCause(cex);
+ throw bad;
+ }
+ }
+
+ /**
+ * Get the IORInterceptor_3_0 repository id.
+ *
+ * @return "IDL:omg.org/PortableInterceptor/IORInterceptor_3_0:1.0", always.
+ */
+ public static String id()
+ {
+ return "IDL:omg.org/PortableInterceptor/IORInterceptor_3_0:1.0";
+ }
+
+ /**
+ * Narrow the passed object into the IORInterceptor_3_0. If the object has a
+ * different java type, create an instance of the _IORInterceptor_3_0Stub,
+ * using the same delegate, as for the passed parameter. Hence, unlike java
+ * type cast, this method may return a different object, than has been passed.
+ *
+ * @param obj the object to narrow.
+ * @return narrowed instance.
+ * @throws BAD_PARAM if the passed object is not a IORInterceptor_3_0.
+ */
+ public static IORInterceptor_3_0 narrow(org.omg.CORBA.Object obj)
+ {
+ if (obj == null)
+ return null;
+ else if (obj instanceof IORInterceptor_3_0)
+ return (IORInterceptor_3_0) obj;
+ else if (!obj._is_a(id()))
+ throw new BAD_PARAM("Not a IORInterceptor_3_0");
+ else
+ {
+ Delegate delegate = ((ObjectImpl) obj)._get_delegate();
+ return new _IORInterceptor_3_0Stub(delegate);
+ }
+ }
+
+ /**
+ * Narrow the passed object into the IORInterceptor_3_0. No type-checking is
+ * performed to verify that the object actually supports the requested type.
+ * The {@link BAD_OPERATION} will be thrown if unsupported operations are
+ * invoked on the new returned reference, but no failure is expected at the
+ * time of the unchecked_narrow. For instance, the narrowing of the
+ * remote instance of the {@link IORInterceptor} will work as long as only the
+ * methods, inherited from this parent, are invoked.
+ *
+ *
+ * @param obj the object to narrow.
+ * @return narrowed instance.
+ * @throws BAD_PARAM if the passed object is not a IORInterceptor_3_0.
+ */
+ public static IORInterceptor_3_0 unchecked_narrow(org.omg.CORBA.Object obj)
+ {
+ if (obj == null)
+ return null;
+ else if (obj instanceof IORInterceptor_3_0)
+ return (IORInterceptor_3_0) obj;
+ else
+ {
+ Delegate delegate = ((ObjectImpl) obj)._get_delegate();
+ return new _IORInterceptor_3_0Stub(delegate);
+ }
+ }
+
+
+ /**
+ * Read the IORInterceptor_3_0 from the CDR intput stream (IOR profile
+ * expected).
+ *
+ * @param input a org.omg.CORBA.portable stream to read from.
+ */
+ public static IORInterceptor_3_0 read(InputStream input)
+ {
+ return unchecked_narrow(input.read_Object());
+ }
+
+ /**
+ * Write the IORInterceptor_3_0 to the CDR output stream (as IOR profile).
+ *
+ * @param output a org.omg.CORBA.portable stream stream to write into.
+ * @param value a value to write.
+ */
+ public static void write(OutputStream output, IORInterceptor_3_0 value)
+ {
+ output.write_Object(value);
+ }
+} \ No newline at end of file
diff --git a/org/omg/PortableInterceptor/IORInterceptor_3_0Holder.java b/org/omg/PortableInterceptor/IORInterceptor_3_0Holder.java
new file mode 100644
index 000000000..dc7ecf23f
--- /dev/null
+++ b/org/omg/PortableInterceptor/IORInterceptor_3_0Holder.java
@@ -0,0 +1,106 @@
+/* IORInterceptor_3_0Holder.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. */
+
+
+package org.omg.PortableInterceptor;
+
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+import org.omg.CORBA.portable.Streamable;
+
+/**
+ * A holder for the object {@link IORInterceptor_3_0}.
+ *
+ * @since 1.5
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public class IORInterceptor_3_0Holder
+ implements Streamable
+{
+ /**
+ * The stored IORInterceptor_3_0 value.
+ */
+ public IORInterceptor_3_0 value;
+
+ /**
+ * Create the unitialised instance, leaving the value field with default
+ * <code>null</code> value.
+ */
+ public IORInterceptor_3_0Holder()
+ {
+ }
+
+ /**
+ * Create the initialised instance.
+ *
+ * @param initialValue the value that will be assigned to the
+ * <code>value</code> field.
+ */
+ public IORInterceptor_3_0Holder(IORInterceptor_3_0 initialValue)
+ {
+ value = initialValue;
+ }
+
+ /**
+ * Fill in the {@link value} by data from the CDR stream.
+ *
+ * @param input the org.omg.CORBA.portable stream to read.
+ */
+ public void _read(InputStream input)
+ {
+ value = IORInterceptor_3_0Helper.read(input);
+ }
+
+ /**
+ * Write the stored value into the CDR stream.
+ *
+ * @param output the org.omg.CORBA.portable stream to write.
+ */
+ public void _write(OutputStream output)
+ {
+ IORInterceptor_3_0Helper.write(output, value);
+ }
+
+ /**
+ * Get the typecode of the IORInterceptor_3_0.
+ */
+ public org.omg.CORBA.TypeCode _type()
+ {
+ return IORInterceptor_3_0Helper.type();
+ }
+} \ No newline at end of file
diff --git a/org/omg/PortableInterceptor/IORInterceptor_3_0Operations.java b/org/omg/PortableInterceptor/IORInterceptor_3_0Operations.java
new file mode 100644
index 000000000..ce6575a4c
--- /dev/null
+++ b/org/omg/PortableInterceptor/IORInterceptor_3_0Operations.java
@@ -0,0 +1,90 @@
+/* IORInterceptor_3_0Operations.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. */
+
+
+package org.omg.PortableInterceptor;
+
+/**
+ * Defines the operations, applicable to the IORInterceptor_3_0.
+ *
+ * @since 1.5
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public interface IORInterceptor_3_0Operations
+ extends IORInterceptorOperations
+{
+ /**
+ * This method is invoked on all registered IORInterceptor_3_0 instances when
+ * the state of the adapter manager changes.
+ *
+ * @param adapterManagerId the Id of the adapter manager that has changed the
+ * state. The same value is returned by
+ * {@link IORInfoOperations#manager_id()}.
+ *
+ * @param adapterState the new state of the adapter manager, one of the
+ * {@link HOLDING#value}, {@link DISCARDING#value}, {@link INACTIVE#value}
+ * or {@link NON_EXISTENT#value}.
+ */
+ void adapter_manager_state_changed(int adapterManagerId, short adapterState);
+
+ /**
+ * Notifies the interceptor about the adapter state changes that are unrelated
+ * to adapter manager state changes. This method is invoked on all registered
+ * IORInterceptor_3_0 instances. The only currently possible change of state
+ * is when POA is destroyed. In this case, the method is invoked passing the
+ * single element array witn the reference template of the POA being destroyed
+ * and the {@link NON_EXISTENT#value} state.
+ *
+ * @param adapters identifies the object adapters that have changed they
+ * state.
+ * @param adaptersState the new state of the adapters, one of the
+ * {@link HOLDING#value}, {@link DISCARDING#value}, {@link INACTIVE#value}
+ * or {@link NON_EXISTENT#value}.
+ */
+ void adapter_state_changed(ObjectReferenceTemplate[] adapters,
+ short adaptersState);
+
+ /**
+ * This metod is invoked after the
+ * {@link IORInterceptorOperations#establish_components} have been called on
+ * all registered interceptor instances. At this stage, it is possible to set
+ * the object reference factory using
+ * {@link IORInfo#current_factory(ObjectReferenceFactory )}.
+ */
+ void components_established(IORInfo info);
+} \ No newline at end of file
diff --git a/org/omg/PortableInterceptor/ORBInitInfoOperations.java b/org/omg/PortableInterceptor/ORBInitInfoOperations.java
index 9cffbe1b5..7b545ff81 100644
--- a/org/omg/PortableInterceptor/ORBInitInfoOperations.java
+++ b/org/omg/PortableInterceptor/ORBInitInfoOperations.java
@@ -55,7 +55,7 @@ public interface ORBInitInfoOperations
*
* @param interceptor the interceptor to register.
*
- * @throws DuplicateName if the interceptor name is not an empty string and an
+ * @throws DuplicateName if the interceptor name is not an empty string and an
* interceptor with this name is already registered with the ORB being
* created.
*/
@@ -63,11 +63,14 @@ public interface ORBInitInfoOperations
throws DuplicateName;
/**
- * Register the IOR (object reference) interceptor.
- *
+ * Register the IOR (object reference) interceptor. If the registered
+ * interceptor implements the extended {@link IORInterceptor_3_0} interface,
+ * ORB will call its additional methods, defined in the
+ * {@link IORInterceptor_3_0Operations}.
+ *
* @param interceptor the interceptor to register.
- *
- * @throws DuplicateName if the interceptor name is not an empty string and an
+ *
+ * @throws DuplicateName if the interceptor name is not an empty string and an
* interceptor with this name is already registered with the ORB being
* created.
*/
@@ -79,7 +82,7 @@ public interface ORBInitInfoOperations
*
* @param interceptor the interceptor to register.
*
- * @throws DuplicateName if the interceptor name is not an empty string and an
+ * @throws DuplicateName if the interceptor name is not an empty string and an
* interceptor with this name is already registered with the ORB being
* created.
*/
@@ -90,7 +93,7 @@ public interface ORBInitInfoOperations
* Allocate a slot on a {@link PortableInterceptor.Current}. While slots can
* be allocated by this method, they cannot be initialized.
* {@link CurrentOperations#get_slot} and {@link CurrentOperations#set_slot}
- * throw {@link org.omg.CORBA.BAD_INV_ORDER} while called from the interceptor
+ * throw {@link org.omg.CORBA.BAD_INV_ORDER} while called from the interceptor
* initializer.
*
* @return the index to the slot that has been allocated.
diff --git a/org/omg/PortableInterceptor/ObjectReferenceFactoryOperations.java b/org/omg/PortableInterceptor/ObjectReferenceFactoryOperations.java
index d2ce61423..b5d912d12 100644
--- a/org/omg/PortableInterceptor/ObjectReferenceFactoryOperations.java
+++ b/org/omg/PortableInterceptor/ObjectReferenceFactoryOperations.java
@@ -53,11 +53,16 @@ public interface ObjectReferenceFactoryOperations
/**
* Create an object with the given repository and object ids. This interface
* does not specify where and how the returned object must be connected and
- * activated.
- *
+ * activated. The derived {@link ObjectReferenceTemplate} interface assumes
+ * the the object must be connected to the POA that is specific to that
+ * template (name can be obtained).
+ *
+ * If the object with this objectId already exists in the given context, it is
+ * found and returned; the new object is <i>not</i> created.
+ *
* @param repositoryId the repository id of the object being created, defines
* the type of the object.
- *
+ *
* @param objectId the byte array, defining the identity of the object.
*/
org.omg.CORBA.Object make_object(String repositoryId, byte[] objectId);
diff --git a/org/omg/PortableInterceptor/_IORInterceptor_3_0Stub.java b/org/omg/PortableInterceptor/_IORInterceptor_3_0Stub.java
new file mode 100644
index 000000000..52856407a
--- /dev/null
+++ b/org/omg/PortableInterceptor/_IORInterceptor_3_0Stub.java
@@ -0,0 +1,272 @@
+/* _IORInterceptor_3_0Stub.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. */
+
+
+package org.omg.PortableInterceptor;
+
+import org.omg.CORBA.MARSHAL;
+import org.omg.CORBA.portable.ApplicationException;
+import org.omg.CORBA.portable.Delegate;
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.ObjectImpl;
+import org.omg.CORBA.portable.OutputStream;
+import org.omg.CORBA.portable.RemarshalException;
+
+import java.io.Serializable;
+
+/**
+ * The IORInterceptor_3_0 stub (proxy), used on the client side. The
+ * {@link IORInterceptor_3_0} methods contain the code for remote invocaton. The
+ * stub is required by {@link IORInterceptor_3_0Helper} .read, .narrow and
+ * .unchecked_narrow methods.
+ *
+ * @specnote Being not specified in 1.5 API, this class is package private.
+ * From that happened to some other stubs, it will likely to appear in the 1.6
+ * or later. Because of this, it is placed here.
+ *
+ * @specnote The stub and the helper support the existence of the interceptor
+ * on the remote side only. To support the corresponding support on the side
+ * where the ORB is registered with this interceptor, you also need
+ * _IORInfoStub, IORInfoHelper and either servants or implementation bases
+ * for both POA and IORInfo. These classes are not defined in the 1.5 API,
+ * hence they are not included. You may need to generate the manually from
+ * the IDL descriptions, available from
+ * http://www.omg.org/docs/formal/04-03-12.pdf.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+class _IORInterceptor_3_0Stub
+ extends ObjectImpl
+ implements IORInterceptor_3_0, Serializable
+{
+ /**
+ * Use serialVersionUID for interoperability.
+ */
+ private static final long serialVersionUID = 1;
+
+ /**
+ * Create the IORInterceptor_3_0 stub. To get the stub working, you must later
+ * set the delegate with {@link ObjectImpl#_set_delegate(Delegate)}.
+ */
+ public _IORInterceptor_3_0Stub()
+ {
+ }
+
+ /**
+ * Create the naming context stub with the given delegate.
+ */
+ public _IORInterceptor_3_0Stub(Delegate delegate)
+ {
+ _set_delegate(delegate);
+ }
+
+ /**
+ * Return the array of repository ids for this object.
+ */
+ public String[] _ids()
+ {
+ return new String[] { IORInterceptor_3_0Helper.id() };
+ }
+
+ /** {@inheritDoc} */
+ public void adapter_manager_state_changed(int adapterManagerId,
+ short adapterState)
+ {
+ InputStream input = null;
+ try
+ {
+ OutputStream output = _request("adapter_manager_state_changed", true);
+ output.write_long(adapterManagerId);
+ output.write_short(adapterState);
+ input = _invoke(output);
+
+ }
+ catch (ApplicationException ex)
+ {
+ input = ex.getInputStream();
+ String id = ex.getId();
+ throw new MARSHAL(id);
+ }
+ catch (RemarshalException remarsh)
+ {
+ adapter_manager_state_changed(adapterManagerId, adapterState);
+ }
+ finally
+ {
+ _releaseReply(input);
+ }
+ }
+
+ /** {@inheritDoc} */
+ public void adapter_state_changed(ObjectReferenceTemplate[] adapters,
+ short adaptersState)
+ {
+ InputStream input = null;
+ try
+ {
+ OutputStream output = _request("adapter_state_changed", true);
+ output.write_long(adapters.length);
+ for (int i0 = 0; i0 < adapters.length; i0++)
+ ObjectReferenceTemplateHelper.write(output, adapters[i0]);
+ output.write_short(adaptersState);
+ input = _invoke(output);
+
+ }
+ catch (ApplicationException ex)
+ {
+ input = ex.getInputStream();
+ String id = ex.getId();
+ throw new MARSHAL(id);
+ }
+ catch (RemarshalException remarsh)
+ {
+ adapter_state_changed(adapters, adaptersState);
+ }
+ finally
+ {
+ _releaseReply(input);
+ }
+ }
+
+ /** {@inheritDoc} */
+ public void components_established(IORInfo info)
+ {
+ InputStream input = null;
+ try
+ {
+ OutputStream output = _request("components_established", true);
+ output.write_Object(info);
+ input = _invoke(output);
+
+ }
+ catch (ApplicationException ex)
+ {
+ input = ex.getInputStream();
+ String id = ex.getId();
+ throw new MARSHAL(id);
+ }
+ catch (RemarshalException remarsh)
+ {
+ components_established(info);
+ }
+ finally
+ {
+ _releaseReply(input);
+ }
+ }
+
+ /** {@inheritDoc} */
+ public void establish_components(IORInfo info)
+ {
+ InputStream input = null;
+ try
+ {
+ OutputStream output = _request("establish_components", true);
+ output.write_Object(info);
+ input = _invoke(output);
+
+ }
+ catch (ApplicationException ex)
+ {
+ input = ex.getInputStream();
+ String id = ex.getId();
+ throw new MARSHAL(id);
+ }
+ catch (RemarshalException remarsh)
+ {
+ establish_components(info);
+ }
+ finally
+ {
+ _releaseReply(input);
+ }
+ }
+
+ /** {@inheritDoc} */
+ public String name()
+ {
+ InputStream input = null;
+ try
+ {
+ OutputStream output = _request("name", true);
+ input = _invoke(output);
+ String returns = input.read_string();
+
+ return returns;
+ }
+ catch (ApplicationException ex)
+ {
+ input = ex.getInputStream();
+ String id = ex.getId();
+ throw new MARSHAL(id);
+ }
+ catch (RemarshalException remarsh)
+ {
+ return name();
+ }
+ finally
+ {
+ _releaseReply(input);
+ }
+ }
+
+ /** {@inheritDoc} */
+ public void destroy()
+ {
+ InputStream input = null;
+ try
+ {
+ OutputStream output = _request("destroy", true);
+ input = _invoke(output);
+
+ }
+ catch (ApplicationException ex)
+ {
+ input = ex.getInputStream();
+ String id = ex.getId();
+ throw new MARSHAL(id);
+ }
+ catch (RemarshalException remarsh)
+ {
+ destroy();
+ }
+ finally
+ {
+ _releaseReply(input);
+ }
+ }
+} \ No newline at end of file