From 554fd8c5195424bdbcabf5de30fdc183aba391bd Mon Sep 17 00:00:00 2001
From: upstream source tree Provides the Id of the object currently being served and POA
+ * to that this object is connected. Both Id and POA can be
+ * simpler obtained from the servant by {@link Servant#_object_id() }
+ * and {@link Servant#_poa()} that use POA Current indirectly.
+ * The operations on Current for obtaining
+ * these data are defined in {@link CurrentOperations}.
+ *
+ * As long as the ORB reference is still available, the current information
+ * is available via {@link Current} that is returned by
+ * ORB.resolve_initial_references("POACurrent"). To support this call,
+ * the ORB maintains the thread to invocation data map for all calls that
+ * are currently being processed.
+ *
+ * This exception is raised by {@link ServantManager} to indicate that the
+ * invocation target has moved to another known location. In this case,
+ * the client will receive a redirection (LOCATION_FORWARD) message and should
+ * resend the request to the new target. The exception contains the object
+ * reference, indicating the new location.
+ *
+ * The exception can be thrown both by servant locators and servant activators.
+ * If the exception is raised anywhere else than in the ServantManager
+ * methods, it is handled as an ordinary user excepton.
+ *
+ * The Portable Object Adapter (POA) provides more control on the request
+ * processing than it is possible when connecting objects directly to the
+ * ORB. For details, see the general description of the
+ *
+ * The operations, supported by POA are defined
+ * separately in {@link POAOperations}. In the simpliest case, the servant
+ * implementation is connected to POA by
+ * {@link POAOperations#servant_to_reference}, the returned object being a
+ * target of remote and local invocations, despite the numerous other
+ * strategies are possible.
+ *
+ * A POA manager is associated with one or more POAs and provides means
+ * to regulate they activity. Using manage, it is possible to force
+ * requests for those POAs to be queued or discarded or have those POAs
+ * deactivated. The manager can turn POAs to and from holding,
+ * active and discarding states, but the incative state is irreversible.
+ *
+ * The manager of the ORBs root POA can be obtained by resolving initial
+ * reference "RootPOAManager".
+ *
+ * Turns the asociated POAs into inactive state. The POAs in the incative
+ * state will reject new requests. A cliet, trying to invoke an
+ * object, belonging to the inactivated POA, will receive the remote exception
+ * ({@link org.omg.CORBA.OBJ_ADAPTER}, minor code 0x535503ea, incomplete).
+ *
+ * If the POA is once inactivated, it cannot be activated again.
+ * The operation is used when the associated POAs are to be shut down.
+ *
+ * Some independent implementations may set the minor code of the
+ * OBJ_ADAPTER to 1, as recommended by OMG (formal/04-03-12).
+ * The interoperable systems should expect any of these two values.
+ *
+ *
+ * @specnote The 0x535503ea is a Sun specific minor exception code 1002,
+ * used for interoperability reasons.
+ *
+ * @throws AdapterInactive if the POAs are already in the inactive state.
+ *
+ * @see POAOperations#destroy
+ */
+ void deactivate(boolean etherealize_objects, boolean wait_for_completion)
+ throws AdapterInactive;
+
+ /**
+ *
+ * Turns the associated POAs into discaring state. In this state, the POAs
+ * discard the incoming requests. This mode is used in situations when
+ * the server is flooded with requests. The client receives remote exception
+ * ({@link org.omg.CORBA.TRANSIENT}, minor code 0x535503e9, incomplete).
+ *
+ * Some independent implementations may set the minor code of the
+ * TRANSIENT to 1, as recommended by OMG (formal/04-03-12).
+ * The interoperable systems should expect any of these two values.
+ * Contains additional classes, needed by POA Manager Deactivate object with the given id. Client, trying to call
+ * method on the deactivated object will either receive the remote
+ * exception ({@link org.omg.CORBA.OBJECT_NOT_EXIST}, minor 0x535503ec),
+ * incomplete) or the object will be reactivated and serve the request.
+ * The object can be reactivated only if the implicit activation
+ * policy applies and the servant activator is set.
+ * The deactivated object will continue to process requests that arrived
+ * before decativation.
+ * If this POA has the associated servant manager, a
+ * {@link ServantActivatorOperations#etherealize} is immediately
+ * invoked on the passed id. The deactivated object can be reactivated
+ * by {@link #activate_object_with_id}. The deactivation will not release thread, port or memory resources,
+ * taken by that object. This is due requirement to make the
+ * object reactivation possible at any time. To release the resources,
+ * you must destroy the POA.
+ * Create the object reference, encapsulating the given repository Id and
+ * the given Object Id. The returned object will not be
+ * activated by default and may be activated on the first invocation by
+ * the servant manager (if it is set and if policies are applicable).
+ *
+ * The returned object can also be narrowed by helper and used locally.
+ * In this case, the servant will be activated on the first local call of
+ * any method. The methods on returned object can also be invoked by
+ * name, using {@link org.omg.CORBA.Request}.
+ * Converts the given servant to the object reference.
+ * The servant will serve all methods, invoked on the returned object.
+ * The returned object reference can be passed to the remote client,
+ * enabling remote invocations.
+ *
+ * If the specified servant already serves some active object, that
+ * object is returned. Otherwise,
+ * if the POA has the IMPLICIT_ACTIVATION policy the method activates
+ * the servant, creating an new object with the POA-generated Object Id.
+ * In this case, if the servant activator is set, the
+ * {@link ServantActivatorOperations#incarnate} method will be called.
+ * Destroy this POA and all descendant POAs. The destroyed POAs can be
+ * later re-created via {@link AdapterActivator} or by invoking
+ * {@link #create_POA}.
+ * This differs from {@link POAManagerOperations#deactivate} that does
+ * not allow recreation of the deactivated POAs. After deactivation,
+ * recreation is only possible if the POAs were later destroyed.
+ *
+ * The remote invocation on the target, belonging to the POA that is
+ * currently destroyed return the remote exception ({@link TRANSIENT},
+ * minor code 4).
+ * Contains exceptions that may be thrown by various POA operations.
+Also provides helpers that are used to transfer these exceptions if they
+are thrown on remote side.
+ * The servant is responsible for handling the method invocation on the
+ * target object. It can be one servant per object, or the same servant can
+ * support several (possibly all) objects, associated with the given POA.
+ *
+ * Till JDK 1.3 inclusive, a typical IDL to java compiler generates an
+ * implementation base (name pattern _*ImplBase.java) that is derived from the
+ * {@link org.omg.CORBA.portable.ObjectImpl}. Since JDK 1.4 the implementation
+ * base is derived from the Servant, also having a different name pattern
+ * (*POA.java). This suffix may be confusing, as the servant itself is
+ * not POA nor it is derived from it.
+ *
+ * In both cases, the implementation base also inherits an interface, containing
+ * definitions of the application specific methods. The application programmer
+ * writes a child of the implementation base, implementing these methods
+ * for the application-specific functionality. The ObjectImpl is connected
+ * directly to the ORB. The Servant is connected to POA that can be obtained
+ * from the ORB.
+ *
+ * If the servant is connected to more than one object, the exact object
+ * being currently served can be identified with {@link #_object_id}.
+ *
+ * The derivativ of Servant, being directly connected to serve requests,
+ * must inherit either from {@link org.omg.CORBA.portable.InvokeHandler}
+ * or from {@link org.omg.PortableServer.DynamicImplementation}).
+ *
+ * The Servant type is a CORBA This ServantActivator stub is an optional base for the
+ * servant activators. This stub cannot serve remote invocations, as
+ * methods in {@link ServantActivatorOperations} take POA as one of parameters.
+ * Both JDK 1.5 API and OMG specifies that POA is a local object that must not
+ * be transferred to the remote invocation target.
+ *
+ * You do not need to derive your servant activator from this stub,
+ * it is enough to implement the {@link ServantActivator} interface.
+ * But you may choose to do this if you need the functional
+ * {@link #_all_interfaces(POA, byte[])} method or want to keep default
+ * behavior during the incarnation or etherialization.
+ * The ServantLocator stub is an optional base for the
+ * servant locators. It cannot serve remote invocations, as
+ * methods in {@link ServantLocatorOperations} take POA as one of parameters.
+ * Both JDK 1.5 API and OMG specifies that POA is a local object that must not
+ * be transferred to the remote invocation target.
+ *
+ * You do not need to derive your servant locator from this stub,
+ * it is enough to implement the {@link ServantLocator} interface.
+ * But you may choose to do this if you need its functional
+ * {@link org.omg.PortableServer.ServantActivatorPOA.delegator#_ids()}
+ * method or want to keep default behaviour during pre- or post- invokcations.
+ * Contains a holder, transferring the data between subsequent
+ calls of the Servant Manager methods. This ServantActivator stub is an optional base for the
+ * servant activators. This stub cannot accept remote invocations, as
+ * methods in {@link ServantActivatorOperations} take POA as one of parameters.
+ * Both JDK 1.5 API and OMG specifies that POA is a local object that must not
+ * be transferred to the remote invocation target.
+ *
+ * You do not need to derive your servant activator from this stub,
+ * it is enough to implement the {@link ServantActivator} interface.
+ * But you may choose to do this if you need the functional
+ * {@link #_ids()} method or want to keep default behavior during
+ * the incarnation or etherialization.
+ * The ServantLocator stub is an optional base for the
+ * servant locators. This stub cannot accept remote invocations, as
+ * methods in {@link ServantLocatorOperations} take POA as one of parameters.
+ * Both JDK 1.5 API and OMG specifies that POA is a local object that must not
+ * be transferred to the remote invocation target.
+ *
+ * You do not need to derive your servant locator from this stub,
+ * it is enough to implement the {@link ServantLocator} interface.
+ * But you may choose to do this if you need its functional
+ * {@link #_ids()} method or want to keep default behavior during per-
+ * or post- invokcations.
+ *
+The Portable Object Adapter (POA) provides more control on the request
+processing than it is possible when connecting objects directly to the
+ORB. The POA model defines a tree structure of POAs, the root POA being
+connected directly to the ORB. Any branch of this tree can be temporary or
+permanently inactivated using {@link org.omg.PortableServer.POAManager}.
+The same manager can control several branches in the POA tree. Also,
+any branch in this tree can have different processing options (policies).
+
+The newly created POA is in holding state, just queuing requests. To start
+processing requests, it must be turned into the active state by its
+{@link org.omg.PortableServer.POAManagerOperations#activate}.
+
+The previously monolite object implementation is now divided into object
+(that implements {@link org.omg.CORBA.Object})
+and servant (that implements either {@link org.omg.CORBA.portable.InvokeHandler}
+or {@link org.omg.PortableServer.DynamicImplementation}).
+Frequently each object has its own servant, but it can also be a single servant
+per multiple objects and also default servant for POA
+(see {@link org.omg.PortableServer.POAOperations#set_servant}). Each object
+has its own Object Id, unique in the scope of the POA, where the object is
+connected. These Ids need not be different for objects belonging
+to different POAs, even if these POAs are connected to the same ORB.
+Under the USER_ID is assignment policy this Id can be a specified by user in
+{@link org.omg.PortableServer.POAOperations#activate_object_with_id},
+encapsulating some meaningful information about the object. The Id of the
+object being currently served can be identified with
+{@link org.omg.PortableServer.Servant#_object_id}. This approach is used in cases
+when it is possible to encapsulate all object-related data into the
+Object Id. Such system only needs one servant, one server socket and one
+socket port per POA that can handle thounsands of objects.
+
+Instead of being connected directly to the ORB, objects are now connected
+to one of the ORBs POAs. Since JDK 1.4 the application specific implementation
+base is derived from the {@link org.omg.PortableServer.Servant}, having a
+different name pattern (
+The POA objects support the method invocation by name, using
+{@link org.omg.CORBA.Request}. This alternative method works without the
+service-specific classes that may not be available at run time.
+
+The objects in POA can also be activated and inactivated independently. It
+is possible to set a listener ({@link org.omg.PortableServer.ServantActivator})
+that would register the object activations ("incarnations") and deactivations
+("etherializations"). The servant need not be specifyed when creating an
+object. Under the IMPLICIT_ACTIVATION
+{@link org.omg.PortableServer.ImplicitActivationPolicy}
+the {@link org.omg.PortableServer.ServantActivator} can provide the servant
+in response to the first (local or remote) call of any method on the
+previously incative object.
+
+The root POA is obtained by resolving the initial reference "RootPOA"
+for the orb. In the simpliest case the objects can be connected directly
+to that root POA without creating the POA tree. The policies, used by
+the root POA, are defined by OMG as following:
+
+ *
+ * An AdapterActivator is always a local object.
+ *
+ * @see AdapterActivatorOperations#unknown_adapter
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public interface AdapterActivator
+ extends AdapterActivatorOperations, IDLEntity, org.omg.CORBA.Object
+{
+}
diff --git a/libjava/classpath/org/omg/PortableServer/AdapterActivatorOperations.java b/libjava/classpath/org/omg/PortableServer/AdapterActivatorOperations.java
new file mode 100644
index 000000000..f2065252d
--- /dev/null
+++ b/libjava/classpath/org/omg/PortableServer/AdapterActivatorOperations.java
@@ -0,0 +1,68 @@
+/* AdapterActivatorOperations.java --
+ Copyright (C) 2005, 2006 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.PortableServer;
+
+import org.omg.CORBA.OBJECT_NOT_EXIST;
+
+
+/**
+ * Defines the operations, applicable to the AdapterActivator.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public interface AdapterActivatorOperations
+{
+ /**
+ * This method is invoked when the ORB receives a request for an object
+ * reference that identifies a non-existing target POA, to create it.
+ * The ORB invokes this operation once for each POA that must be created
+ * in order for the target POA to exist. The process remebers creating a
+ * nested folder structure, starting from the ancestor POA closest to the
+ * root POA. The operation is invoked on the adapter activator of
+ * POA that is the parent of the POA that needs to be created.
+ *
+ * @param parent the parent POA, for that the child POA must be created.
+ * @param child_name the name of the child POA that must be created.
+ *
+ * @return true if the operation has successfully created the needed POA,
+ * false that POA cannot be created. In this case, the client will receive
+ * the remote exception ({@link OBJECT_NOT_EXIST}, minor code 2).
+ */
+ boolean unknown_adapter(POA parent, String child_name);
+}
diff --git a/libjava/classpath/org/omg/PortableServer/Current.java b/libjava/classpath/org/omg/PortableServer/Current.java
new file mode 100644
index 000000000..7bce10e04
--- /dev/null
+++ b/libjava/classpath/org/omg/PortableServer/Current.java
@@ -0,0 +1,63 @@
+/* Current.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.PortableServer;
+
+import org.omg.CORBA.portable.IDLEntity;
+
+/**
+ * name
refers a non existing POA.
+ * null
.
+ */
+ public ForwardRequest()
+ {
+ }
+
+ /**
+ * Create the ForwardRequest with explaining message and
+ * initialising the object reference to the given value.
+ *
+ * @param why a string, explaining, why this exception has been thrown.
+ * @param a_forward_reference a value for forward_reference.
+ */
+ public ForwardRequest(String why, org.omg.CORBA.Object a_forward_reference)
+ {
+ super(why);
+ this.forward_reference = a_forward_reference;
+ }
+
+ /**
+ * Create the ForwardRequest without explaining
+ * message and initialising the object reference to the given value.
+ *
+ * @param a_forward_reference a value for forward_reference.
+ */
+ public ForwardRequest(org.omg.CORBA.Object a_forward_reference)
+ {
+ this.forward_reference = a_forward_reference;
+ }
+}
diff --git a/libjava/classpath/org/omg/PortableServer/ForwardRequestHelper.java b/libjava/classpath/org/omg/PortableServer/ForwardRequestHelper.java
new file mode 100644
index 000000000..83e5707c6
--- /dev/null
+++ b/libjava/classpath/org/omg/PortableServer/ForwardRequestHelper.java
@@ -0,0 +1,154 @@
+/* ForwardRequestHelper.java --
+ Copyright (C) 2005, 2006 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.PortableServer;
+
+import gnu.CORBA.Minor;
+import gnu.CORBA.ObjectCreator;
+import gnu.CORBA.OrbRestricted;
+import gnu.CORBA.Poa.ForwardRequestHolder;
+
+import org.omg.CORBA.Any;
+import org.omg.CORBA.BAD_OPERATION;
+import org.omg.CORBA.ORB;
+import org.omg.CORBA.ObjectHelper;
+import org.omg.CORBA.StructMember;
+import org.omg.CORBA.TypeCode;
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+
+/**
+ * The helper operations for the exception {@link ForwardRequest}.
+ *
+ * @specnote The helper must be here and not in POA subpackage as it must
+ * be discovered by the {@link ObjectCreator} when reading this remote
+ * exception.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public abstract class ForwardRequestHelper
+{
+ /**
+ * Extract the ForwardRequest from given Any.
+ * This method uses the ForwardRequestHolder.
+ *
+ * @throws BAD_OPERATION if the passed Any does not contain ForwardRequest.
+ */
+ public static ForwardRequest extract(Any any)
+ {
+ try
+ {
+ return ((ForwardRequestHolder) any.extract_Streamable()).value;
+ }
+ catch (ClassCastException cex)
+ {
+ BAD_OPERATION bad = new BAD_OPERATION("ForwardRequest expected");
+ bad.minor = Minor.Any;
+ bad.initCause(cex);
+ throw bad;
+ }
+ }
+
+ /**
+ * Get the ForwardRequest repository id.
+ *
+ * @return "ForwardRequest", always.
+ */
+ public static String id()
+ {
+ return "ForwardRequest";
+ }
+
+ /**
+ * Insert the ForwardRequest into the given Any.
+ * This method uses the ForwardRequestHolder.
+ *
+ * @param any the Any to insert into.
+ * @param that the ForwardRequest to insert.
+ */
+ public static void insert(Any any, ForwardRequest that)
+ {
+ any.insert_Streamable(new ForwardRequestHolder(that));
+ }
+
+ /**
+ * Read the exception from the CDR intput stream.
+ *
+ * @param input a org.omg.CORBA.portable stream to read from.
+ */
+ public static ForwardRequest read(InputStream input)
+ {
+ // Read the exception repository id.
+ input.read_string();
+ ForwardRequest value = new ForwardRequest();
+
+ value.forward_reference = input.read_Object();
+ return value;
+ }
+
+ /**
+ * Create the ForwardRequest typecode (structure,
+ * named "ForwardRequest").
+ * The typecode states that the structure contains the
+ * following fields: forward_reference.
+ */
+ public static TypeCode type()
+ {
+ ORB orb = OrbRestricted.Singleton;
+ StructMember[] members = new StructMember[ 1 ];
+
+ TypeCode field;
+
+ field = ObjectHelper.type();
+ members [ 0 ] = new StructMember("forward_reference", field, null);
+ return orb.create_exception_tc(id(), "ForwardRequest", members);
+ }
+
+ /**
+ * Write the exception to the CDR output stream.
+ *
+ * @param output a org.omg.CORBA.portable stream stream to write into.
+ * @param value a value to write.
+ */
+ public static void write(OutputStream output, ForwardRequest value)
+ {
+ // Write the exception repository id.
+ output.write_string(id());
+ output.write_Object(value.forward_reference);
+ }
+}
diff --git a/libjava/classpath/org/omg/PortableServer/ID_ASSIGNMENT_POLICY_ID.java b/libjava/classpath/org/omg/PortableServer/ID_ASSIGNMENT_POLICY_ID.java
new file mode 100644
index 000000000..f70660d76
--- /dev/null
+++ b/libjava/classpath/org/omg/PortableServer/ID_ASSIGNMENT_POLICY_ID.java
@@ -0,0 +1,53 @@
+/* ID_ASSIGNMENT_POLICY_ID.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.PortableServer;
+
+
+/**
+* Holds an integer {@link IdAssignmentPolicy } identifier.
+*
+* @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+*/
+public interface ID_ASSIGNMENT_POLICY_ID
+{
+ /**
+ * Specifies the ID_ASSIGNMENT_POLICY_ID value, 19.
+ */
+ int value = 19;
+}
diff --git a/libjava/classpath/org/omg/PortableServer/ID_UNIQUENESS_POLICY_ID.java b/libjava/classpath/org/omg/PortableServer/ID_UNIQUENESS_POLICY_ID.java
new file mode 100644
index 000000000..f69defcaa
--- /dev/null
+++ b/libjava/classpath/org/omg/PortableServer/ID_UNIQUENESS_POLICY_ID.java
@@ -0,0 +1,53 @@
+/* ID_UNIQUENESS_POLICY_ID.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.PortableServer;
+
+
+/**
+* Holds an integer {@link IdUniquenessPolicy} identifier.
+*
+* @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+*/
+public interface ID_UNIQUENESS_POLICY_ID
+{
+ /**
+ * Specifies the ID_UNIQUENESS_POLICY_ID value, 18.
+ */
+ int value = 18;
+}
diff --git a/libjava/classpath/org/omg/PortableServer/IMPLICIT_ACTIVATION_POLICY_ID.java b/libjava/classpath/org/omg/PortableServer/IMPLICIT_ACTIVATION_POLICY_ID.java
new file mode 100644
index 000000000..c76e1801c
--- /dev/null
+++ b/libjava/classpath/org/omg/PortableServer/IMPLICIT_ACTIVATION_POLICY_ID.java
@@ -0,0 +1,53 @@
+/* IMPLICIT_ACTIVATION_POLICY_ID.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.PortableServer;
+
+
+/**
+* Holds an integer {@link ImplicitActivationPolicy} identifier.
+*
+* @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+*/
+public interface IMPLICIT_ACTIVATION_POLICY_ID
+{
+ /**
+ * Specifies the IMPLICIT_ACTIVATION_POLICY_ID value, 20.
+ */
+ int value = 20;
+}
diff --git a/libjava/classpath/org/omg/PortableServer/IdAssignmentPolicy.java b/libjava/classpath/org/omg/PortableServer/IdAssignmentPolicy.java
new file mode 100644
index 000000000..15ccf4f6e
--- /dev/null
+++ b/libjava/classpath/org/omg/PortableServer/IdAssignmentPolicy.java
@@ -0,0 +1,58 @@
+/* IdAssignmentPolicy.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.PortableServer;
+
+import org.omg.CORBA.Policy;
+import org.omg.CORBA.portable.IDLEntity;
+
+/**
+ * Specifies the Object Id assignment policy.
+ *
+ * The policy can return its current value, as defined.
+ * in {@link IdAssignmentPolicyOperations}.
+ *
+ * @see IdAssignmentPolicyValue for the possible values of this policy.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public interface IdAssignmentPolicy
+ extends Policy, IdAssignmentPolicyOperations, IDLEntity
+{
+}
diff --git a/libjava/classpath/org/omg/PortableServer/IdAssignmentPolicyOperations.java b/libjava/classpath/org/omg/PortableServer/IdAssignmentPolicyOperations.java
new file mode 100644
index 000000000..88c39d73d
--- /dev/null
+++ b/libjava/classpath/org/omg/PortableServer/IdAssignmentPolicyOperations.java
@@ -0,0 +1,55 @@
+/* IdAssignmentPolicyOperations.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.PortableServer;
+
+import org.omg.CORBA.PolicyOperations;
+
+/**
+ * Defines the operations, applicable to the IdAssignmentPolicy.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public interface IdAssignmentPolicyOperations
+ extends PolicyOperations
+{
+ /**
+ * Return the value of this policy type, stated by the current instance.
+ */
+ IdAssignmentPolicyValue value();
+}
diff --git a/libjava/classpath/org/omg/PortableServer/IdAssignmentPolicyValue.java b/libjava/classpath/org/omg/PortableServer/IdAssignmentPolicyValue.java
new file mode 100644
index 000000000..9e52b9889
--- /dev/null
+++ b/libjava/classpath/org/omg/PortableServer/IdAssignmentPolicyValue.java
@@ -0,0 +1,158 @@
+/* IdAssignmentPolicyValue.java --
+ Copyright (C) 2005, 2006 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.PortableServer;
+
+import gnu.CORBA.Minor;
+
+import org.omg.CORBA.BAD_OPERATION;
+import org.omg.CORBA.BAD_PARAM;
+import org.omg.CORBA.portable.IDLEntity;
+
+import java.io.Serializable;
+
+/**
+* Specifies the Object Id assignment policy.
+*
+*
+* @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+*/
+public class IdAssignmentPolicyValue
+ implements Serializable, IDLEntity
+{
+ /**
+ * Use serialVersionUID (V1.4) for interoperability.
+ */
+ private static final long serialVersionUID = 2024380631469554382L;
+
+ /**
+ * The value field for the current instance.
+ */
+ private final int _value;
+
+ /**
+ * The possible value of this enumeration (USER_ID).
+ */
+ public static final int _USER_ID = 0;
+
+ /**
+ * An instance of IdAssignmentPolicyValue, initialized to USER_ID.
+ */
+ public static final IdAssignmentPolicyValue USER_ID =
+ new IdAssignmentPolicyValue(_USER_ID);
+
+ /**
+ * The possible value of this enumeration (SYSTEM_ID),.
+ */
+ public static final int _SYSTEM_ID = 1;
+
+ /**
+ * An instance of IdAssignmentPolicyValue, initialized to SYSTEM_ID,
+ * indicating, that the objects created with that POA obtain they
+ * Object Ids from POA.
+ */
+ public static final IdAssignmentPolicyValue SYSTEM_ID =
+ new IdAssignmentPolicyValue(_SYSTEM_ID);
+
+ /**
+ * The private array that maps integer codes to the enumeration
+ * values.
+ */
+ private static final IdAssignmentPolicyValue[] enume =
+ new IdAssignmentPolicyValue[] { USER_ID, SYSTEM_ID };
+
+ /**
+ * The private array of state names.
+ */
+ private static final String[] state_names =
+ new String[] { "USER_ID", "SYSTEM_ID" };
+
+ /**
+ * Normally, no new instances are required, so the constructor is protected.
+ */
+ protected IdAssignmentPolicyValue(int a_value)
+ {
+ _value = a_value;
+ }
+
+ /**
+ * Returns the IdAssignmentPolicyValue, matching the given integer constant.
+ *
+ * @param code one of _USER_ID, _SYSTEM_ID.
+ * @return one of USER_ID, SYSTEM_ID.
+ * @throws BAD_PARAM if the parameter is not one of the valid values.
+ */
+ public static IdAssignmentPolicyValue from_int(int code)
+ {
+ try
+ {
+ return enume [ code ];
+ }
+ catch (ArrayIndexOutOfBoundsException ex)
+ {
+ BAD_OPERATION bad = new BAD_OPERATION("Invalid policy code " + code);
+ bad.minor = Minor.PolicyType;
+ throw bad;
+ }
+ }
+
+ /**
+ * Returns a short string representation.
+ * @return the name of the current enumeration value.
+ */
+ public String toString()
+ {
+ return state_names [ _value ];
+ }
+
+ /**
+ * Returns the integer code of the policy value.
+ * @return _USER_ID or _SYSTEM_ID.
+ */
+ public int value()
+ {
+ return _value;
+ }
+}
diff --git a/libjava/classpath/org/omg/PortableServer/IdUniquenessPolicy.java b/libjava/classpath/org/omg/PortableServer/IdUniquenessPolicy.java
new file mode 100644
index 000000000..ba2894c7c
--- /dev/null
+++ b/libjava/classpath/org/omg/PortableServer/IdUniquenessPolicy.java
@@ -0,0 +1,57 @@
+/* IdUniquenessPolicy.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.PortableServer;
+
+import org.omg.CORBA.Policy;
+import org.omg.CORBA.portable.IDLEntity;
+
+/**
+ * Specfies the Id uniqueness policy.
+ *
+ * The policy can return its current value, as defined.
+ * in {@link IdUniquenessPolicyOperations}.
+ *
+ * @see IdUniquenessPolicyValue for the possible values of this policy.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public interface IdUniquenessPolicy
+ extends Policy, IdUniquenessPolicyOperations, IDLEntity
+{
+}
diff --git a/libjava/classpath/org/omg/PortableServer/IdUniquenessPolicyOperations.java b/libjava/classpath/org/omg/PortableServer/IdUniquenessPolicyOperations.java
new file mode 100644
index 000000000..1295f88f3
--- /dev/null
+++ b/libjava/classpath/org/omg/PortableServer/IdUniquenessPolicyOperations.java
@@ -0,0 +1,55 @@
+/* IdUniquenessPolicyOperations.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.PortableServer;
+
+import org.omg.CORBA.PolicyOperations;
+
+/**
+ * Defines the operations, applicable to the IdUniquenessPolicy.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public interface IdUniquenessPolicyOperations
+ extends PolicyOperations
+{
+ /**
+ * Return the value of this policy type, stated by the current instance.
+ */
+ IdUniquenessPolicyValue value();
+}
diff --git a/libjava/classpath/org/omg/PortableServer/IdUniquenessPolicyValue.java b/libjava/classpath/org/omg/PortableServer/IdUniquenessPolicyValue.java
new file mode 100644
index 000000000..848671d1d
--- /dev/null
+++ b/libjava/classpath/org/omg/PortableServer/IdUniquenessPolicyValue.java
@@ -0,0 +1,158 @@
+/* IdUniquenessPolicyValue.java --
+ Copyright (C) 2005, 2006 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.PortableServer;
+
+import gnu.CORBA.Minor;
+
+import org.omg.CORBA.BAD_OPERATION;
+import org.omg.CORBA.BAD_PARAM;
+import org.omg.CORBA.portable.IDLEntity;
+
+import java.io.Serializable;
+
+/**
+* Specifies the Object Id uniqueness policy.
+*
+* This enumeration can obtain the following values:
+*
+*
+* @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+*/
+public class IdUniquenessPolicyValue
+ implements Serializable, IDLEntity
+{
+ /**
+ * Use serialVersionUID (V1.4) for interoperability.
+ */
+ private static final long serialVersionUID = 2698951826884611346L;
+
+ /**
+ * The value field for the current instance.
+ */
+ private final int _value;
+
+ /**
+ * The possible value of this enumeration (UNIQUE_ID).
+ */
+ public static final int _UNIQUE_ID = 0;
+
+ /**
+ * Indicates that a servant activated with that POA, supports one and only
+ * one OBject Id.
+ */
+ public static final IdUniquenessPolicyValue UNIQUE_ID =
+ new IdUniquenessPolicyValue(_UNIQUE_ID);
+
+ /**
+ * The possible value of this enumeration (MULTIPLE_ID).
+ */
+ public static final int _MULTIPLE_ID = 1;
+
+ /**
+ * Indicates that a servant activated with that POA is able to support the
+ * multiple Object Ids.
+ */
+ public static final IdUniquenessPolicyValue MULTIPLE_ID =
+ new IdUniquenessPolicyValue(_MULTIPLE_ID);
+
+ /**
+ * The private array that maps integer codes to the enumeration
+ * values.
+ */
+ private static final IdUniquenessPolicyValue[] enume =
+ new IdUniquenessPolicyValue[] { UNIQUE_ID, MULTIPLE_ID };
+
+ /**
+ * The private array of state names.
+ */
+ private static final String[] state_names =
+ new String[] { "UNIQUE_ID", "MULTIPLE_ID" };
+
+ /**
+ * Normally, no new instances are required, so the constructor is protected.
+ */
+ protected IdUniquenessPolicyValue(int a_value)
+ {
+ _value = a_value;
+ }
+
+ /**
+ * Returns the IdUniquenessPolicyValue, matching the given integer constant.
+ *
+ * @param code one of _UNIQUE_ID, _MULTIPLE_ID.
+ * @return one of UNIQUE_ID, MULTIPLE_ID.
+ * @throws BAD_PARAM if the parameter is not one of the valid values.
+ */
+ public static IdUniquenessPolicyValue from_int(int code)
+ {
+ try
+ {
+ return enume [ code ];
+ }
+ catch (ArrayIndexOutOfBoundsException ex)
+ {
+ BAD_OPERATION bad = new BAD_OPERATION("Invalid policy code " + code);
+ bad.minor = Minor.PolicyType;
+ throw bad;
+ }
+ }
+
+ /**
+ * Returns a short string representation.
+ * @return the name of the current enumeration value.
+ */
+ public String toString()
+ {
+ return state_names [ _value ];
+ }
+
+ /**
+ * Returns the integer code of the policy value.
+ * @return _UNIQUE_ID or _MULTIPLE_ID.
+ */
+ public int value()
+ {
+ return _value;
+ }
+}
diff --git a/libjava/classpath/org/omg/PortableServer/ImplicitActivationPolicy.java b/libjava/classpath/org/omg/PortableServer/ImplicitActivationPolicy.java
new file mode 100644
index 000000000..786e5fa72
--- /dev/null
+++ b/libjava/classpath/org/omg/PortableServer/ImplicitActivationPolicy.java
@@ -0,0 +1,57 @@
+/* ImplicitActivationPolicy.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.PortableServer;
+
+import org.omg.CORBA.Policy;
+import org.omg.CORBA.portable.IDLEntity;
+
+/**
+ * Specifies the implicit activation policy.
+ *
+ * The policy can return its current value, as defined.
+ * in {@link ImplicitActivationPolicyOperations}.
+ *
+ * @see ImplicitActivationPolicyValue for the possible values of this policy.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public interface ImplicitActivationPolicy
+ extends Policy, ImplicitActivationPolicyOperations, IDLEntity
+{
+}
diff --git a/libjava/classpath/org/omg/PortableServer/ImplicitActivationPolicyOperations.java b/libjava/classpath/org/omg/PortableServer/ImplicitActivationPolicyOperations.java
new file mode 100644
index 000000000..9b6136a1c
--- /dev/null
+++ b/libjava/classpath/org/omg/PortableServer/ImplicitActivationPolicyOperations.java
@@ -0,0 +1,55 @@
+/* ImplicitActivationPolicyOperations.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.PortableServer;
+
+import org.omg.CORBA.PolicyOperations;
+
+/**
+ * Defines the operations, applicable to the ImplicitActivationPolicy.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public interface ImplicitActivationPolicyOperations
+ extends PolicyOperations
+{
+ /**
+ * Return the value of this policy type, stated by the current instance.
+ */
+ ImplicitActivationPolicyValue value();
+}
diff --git a/libjava/classpath/org/omg/PortableServer/ImplicitActivationPolicyValue.java b/libjava/classpath/org/omg/PortableServer/ImplicitActivationPolicyValue.java
new file mode 100644
index 000000000..3e4049bb3
--- /dev/null
+++ b/libjava/classpath/org/omg/PortableServer/ImplicitActivationPolicyValue.java
@@ -0,0 +1,158 @@
+/* ImplicitActivationPolicyValue.java --
+ Copyright (C) 2005, 2006 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.PortableServer;
+
+import gnu.CORBA.Minor;
+
+import org.omg.CORBA.BAD_OPERATION;
+import org.omg.CORBA.BAD_PARAM;
+import org.omg.CORBA.portable.IDLEntity;
+
+import java.io.Serializable;
+
+/**
+* Specifies the implicit activation policy.
+*
+* This enumeration can obtain the following values:
+*
+*
+* @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+*/
+public class ImplicitActivationPolicyValue
+ implements Serializable, IDLEntity
+{
+ /**
+ * Use serialVersionUID (V1.4) for interoperability.
+ */
+ private static final long serialVersionUID = 3826572456602949295L;
+
+ /**
+ * The value field for the current instance.
+ */
+ private final int _value;
+
+ /**
+ * The possible value of this enumeration (IMPLICIT_ACTIVATION).
+ */
+ public static final int _IMPLICIT_ACTIVATION = 0;
+
+ /**
+ * An instance of ImplicitActivationPolicyValue, initialized to IMPLICIT_ACTIVATION.
+ */
+ public static final ImplicitActivationPolicyValue IMPLICIT_ACTIVATION =
+ new ImplicitActivationPolicyValue(_IMPLICIT_ACTIVATION);
+
+ /**
+ * The possible value of this enumeration (NO_IMPLICIT_ACTIVATION).
+ */
+ public static final int _NO_IMPLICIT_ACTIVATION = 1;
+
+ /**
+ * An instance of ImplicitActivationPolicyValue, initialized to NO_IMPLICIT_ACTIVATION.
+ */
+ public static final ImplicitActivationPolicyValue NO_IMPLICIT_ACTIVATION =
+ new ImplicitActivationPolicyValue(_NO_IMPLICIT_ACTIVATION);
+
+ /**
+ * The private array that maps integer codes to the enumeration
+ * values.
+ */
+ private static final ImplicitActivationPolicyValue[] enume =
+ new ImplicitActivationPolicyValue[]
+ {
+ IMPLICIT_ACTIVATION, NO_IMPLICIT_ACTIVATION
+ };
+
+ /**
+ * The private array of state names.
+ */
+ private static final String[] state_names =
+ new String[] { "IMPLICIT_ACTIVATION", "NO_IMPLICIT_ACTIVATION" };
+
+ /**
+ * Normally, no new instances are required, so the constructor is protected.
+ */
+ protected ImplicitActivationPolicyValue(int a_value)
+ {
+ _value = a_value;
+ }
+
+ /**
+ * Returns the ImplicitActivationPolicyValue, matching the given integer constant.
+ *
+ * @param code one of _IMPLICIT_ACTIVATION, _NO_IMPLICIT_ACTIVATION.
+ * @return one of IMPLICIT_ACTIVATION, NO_IMPLICIT_ACTIVATION.
+ * @throws BAD_PARAM if the parameter is not one of the valid values.
+ */
+ public static ImplicitActivationPolicyValue from_int(int code)
+ {
+ try
+ {
+ return enume [ code ];
+ }
+ catch (ArrayIndexOutOfBoundsException ex)
+ {
+ BAD_OPERATION bad = new BAD_OPERATION("Invalid policy code " + code);
+ bad.minor = Minor.PolicyType;
+ throw bad;
+ }
+ }
+
+ /**
+ * Returns a short string representation.
+ * @return the name of the current enumeration value.
+ */
+ public String toString()
+ {
+ return state_names [ _value ];
+ }
+
+ /**
+ * Returns the integer code of the policy value.
+ * @return _IMPLICIT_ACTIVATION or _NO_IMPLICIT_ACTIVATION.
+ */
+ public int value()
+ {
+ return _value;
+ }
+}
diff --git a/libjava/classpath/org/omg/PortableServer/LIFESPAN_POLICY_ID.java b/libjava/classpath/org/omg/PortableServer/LIFESPAN_POLICY_ID.java
new file mode 100644
index 000000000..87b93af02
--- /dev/null
+++ b/libjava/classpath/org/omg/PortableServer/LIFESPAN_POLICY_ID.java
@@ -0,0 +1,52 @@
+/* LIFESPAN_POLICY_ID.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.PortableServer;
+
+ /**
+ * Holds an integer {@link LifespanPolicy} identifier.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public interface LIFESPAN_POLICY_ID
+{
+ /**
+ * Specifies the LIFESPAN_POLICY_ID value, 17.
+ */
+ int value = 17;
+}
diff --git a/libjava/classpath/org/omg/PortableServer/LifespanPolicy.java b/libjava/classpath/org/omg/PortableServer/LifespanPolicy.java
new file mode 100644
index 000000000..2b96bf185
--- /dev/null
+++ b/libjava/classpath/org/omg/PortableServer/LifespanPolicy.java
@@ -0,0 +1,58 @@
+/* LifespanPolicy.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.PortableServer;
+
+import org.omg.CORBA.Policy;
+import org.omg.CORBA.portable.IDLEntity;
+
+/**
+ * Specifies the object life span policy, if they can outlive the POA
+ * with that they were first created.
+ *
+ * The policy can return its current value, as defined.
+ * in {@link LifespanPolicyOperations}.
+ *
+ * @see LifespanPolicyValue for the possible values of this policy.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public interface LifespanPolicy
+ extends Policy, LifespanPolicyOperations, IDLEntity
+{
+}
diff --git a/libjava/classpath/org/omg/PortableServer/LifespanPolicyOperations.java b/libjava/classpath/org/omg/PortableServer/LifespanPolicyOperations.java
new file mode 100644
index 000000000..5eac1599e
--- /dev/null
+++ b/libjava/classpath/org/omg/PortableServer/LifespanPolicyOperations.java
@@ -0,0 +1,55 @@
+/* LifespanPolicyOperations.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.PortableServer;
+
+import org.omg.CORBA.PolicyOperations;
+
+/**
+ * Defines the operations, applicable to the LifespanPolicy.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public interface LifespanPolicyOperations
+ extends PolicyOperations
+{
+ /**
+ * Return the value of this policy type, stated by the current instance.
+ */
+ LifespanPolicyValue value();
+}
diff --git a/libjava/classpath/org/omg/PortableServer/LifespanPolicyValue.java b/libjava/classpath/org/omg/PortableServer/LifespanPolicyValue.java
new file mode 100644
index 000000000..2be37fb37
--- /dev/null
+++ b/libjava/classpath/org/omg/PortableServer/LifespanPolicyValue.java
@@ -0,0 +1,155 @@
+/* LifespanPolicyValue.java --
+ Copyright (C) 2005, 2006 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.PortableServer;
+
+import gnu.CORBA.Minor;
+
+import org.omg.CORBA.BAD_OPERATION;
+import org.omg.CORBA.BAD_PARAM;
+import org.omg.CORBA.portable.IDLEntity;
+
+import java.io.Serializable;
+
+/**
+* Specifies the object life span policy.
+*
+* This enumeration can obtain the following values:
+*
+*
+* @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+*/
+public class LifespanPolicyValue
+ implements Serializable, IDLEntity
+{
+ /**
+ * Use serialVersionUID (V1.4) for interoperability.
+ */
+ private static final long serialVersionUID = 6604562925399671611L;
+
+ /**
+ * The value field for the current instance.
+ */
+ private final int _value;
+
+ /**
+ * The possible value of this enumeration (TRANSIENT).
+ */
+ public static final int _TRANSIENT = 0;
+
+ /**
+ * An instance of LifespanPolicyValue, initialized to TRANSIENT.
+ */
+ public static final LifespanPolicyValue TRANSIENT =
+ new LifespanPolicyValue(_TRANSIENT);
+
+ /**
+ * The possible value of this enumeration (PERSISTENT).
+ */
+ public static final int _PERSISTENT = 1;
+
+ /**
+ * An instance of LifespanPolicyValue, initialized to PERSISTENT.
+ */
+ public static final LifespanPolicyValue PERSISTENT =
+ new LifespanPolicyValue(_PERSISTENT);
+
+ /**
+ * The private array that maps integer codes to the enumeration
+ * values.
+ */
+ private static final LifespanPolicyValue[] enume =
+ new LifespanPolicyValue[] { TRANSIENT, PERSISTENT };
+
+ /**
+ * The private array of state names.
+ */
+ private static final String[] state_names =
+ new String[] { "TRANSIENT", "PERSISTENT" };
+
+ /**
+ * Normally, no new instances are required, so the constructor is protected.
+ */
+ protected LifespanPolicyValue(int a_value)
+ {
+ _value = a_value;
+ }
+
+ /**
+ * Returns the LifespanPolicyValue, matching the given integer constant.
+ *
+ * @param code one of _TRANSIENT, _PERSISTENT.
+ * @return one of TRANSIENT, PERSISTENT.
+ * @throws BAD_PARAM if the parameter is not one of the valid values.
+ */
+ public static LifespanPolicyValue from_int(int code)
+ {
+ try
+ {
+ return enume [ code ];
+ }
+ catch (ArrayIndexOutOfBoundsException ex)
+ {
+ BAD_OPERATION bad = new BAD_OPERATION("Invalid policy code " + code);
+ bad.minor = Minor.PolicyType;
+ throw bad;
+ }
+ }
+
+ /**
+ * Returns a short string representation.
+ * @return the name of the current enumeration value.
+ */
+ public String toString()
+ {
+ return state_names [ _value ];
+ }
+
+ /**
+ * Returns the integer code of the policy value.
+ * @return _TRANSIENT or _PERSISTENT.
+ */
+ public int value()
+ {
+ return _value;
+ }
+}
diff --git a/libjava/classpath/org/omg/PortableServer/POA.java b/libjava/classpath/org/omg/PortableServer/POA.java
new file mode 100644
index 000000000..cddeac63f
--- /dev/null
+++ b/libjava/classpath/org/omg/PortableServer/POA.java
@@ -0,0 +1,66 @@
+/* POA.java --
+ Copyright (C) 2005, 2006 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.PortableServer;
+
+import org.omg.CORBA.portable.IDLEntity;
+
+/**
+ * org.omg.PortableServer
package.
+ *
+ *
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public class State
+ implements Serializable, IDLEntity
+{
+ /**
+ * Use serialVersionUID (v1.4) for interoperability.
+ */
+ private static final long serialVersionUID = -2451866258678193271L;
+
+ /**
+ * The value field for the current instance.
+ */
+ private final int _value;
+
+ /**
+ * The possible value of this enumeration (HOLDING).
+ */
+ public static final int _HOLDING = 0;
+
+ /**
+ * An instance of State, initialized to HOLDING.
+ */
+ public static final State HOLDING = new State(_HOLDING);
+
+ /**
+ * The possible value of this enumeration (ACTIVE).
+ */
+ public static final int _ACTIVE = 1;
+
+ /**
+ * An instance of State, initialized to ACTIVE.
+ */
+ public static final State ACTIVE = new State(_ACTIVE);
+
+ /**
+ * The possible value of this enumeration (DISCARDING).
+ */
+ public static final int _DISCARDING = 2;
+
+ /**
+ * An instance of State, initialized to DISCARDING.
+ */
+ public static final State DISCARDING = new State(_DISCARDING);
+
+ /**
+ * The possible value of this enumeration (INACTIVE).
+ */
+ public static final int _INACTIVE = 3;
+
+ /**
+ * An instance of State, initialized to INACTIVE.
+ */
+ public static final State INACTIVE = new State(_INACTIVE);
+
+ /**
+ * The private array that maps integer codes to the enumeration
+ * values.
+ */
+ private static final State[] enume =
+ new State[] { HOLDING, ACTIVE, DISCARDING, INACTIVE };
+
+ /**
+ * The private array of state names.
+ */
+ private static final String[] state_names =
+ new String[] { "HOLDING", "ACTIVE", "DISCARDING", "INACTIVE" };
+
+ /**
+ * Normally, no new instances are required, so the constructor is protected.
+ */
+ protected State(int a_value)
+ {
+ _value = a_value;
+ }
+
+ /**
+ * Returns the State, matching the given integer constant.
+ *
+ * @param code one of _HOLDING, _ACTIVE, _DISCARDING, _INACTIVE.
+ * @return one of HOLDING, ACTIVE, DISCARDING, INACTIVE.
+ * @throws BAD_PARAM if the parameter is not one of the valid values.
+ */
+ public static State from_int(int code)
+ {
+ try
+ {
+ return enume[code];
+ }
+ catch (ArrayIndexOutOfBoundsException ex)
+ {
+ BAD_OPERATION bad = new BAD_OPERATION("Invalid state " + code);
+ bad.minor = Minor.Enumeration;
+ throw bad;
+ }
+ }
+
+ /**
+ * Returns a short string representation.
+ *
+ * @return the name of the current enumeration value.
+ */
+ public String toString()
+ {
+ return state_names [ _value ];
+ }
+
+ /**
+ * Returns the integer code of the enumeration value.
+ * @return one of HOLDING, ACTIVE, DISCARDING, INACTIVE.
+ */
+ public int value()
+ {
+ return _value;
+ }
+}
diff --git a/libjava/classpath/org/omg/PortableServer/POAManagerPackage/package.html b/libjava/classpath/org/omg/PortableServer/POAManagerPackage/package.html
new file mode 100644
index 000000000..fb6ae58d5
--- /dev/null
+++ b/libjava/classpath/org/omg/PortableServer/POAManagerPackage/package.html
@@ -0,0 +1,46 @@
+
+
+
+
+activate_id
= false.
+ */
+ POA find_POA(String poa_name, boolean activate_it)
+ throws AdapterNonExistent;
+
+ /**
+ * Generate the Object Id for the given servant and add the servant to
+ * the Active Object Map using this Id a a key. If the servant
+ * activator is set, its incarnate method will be called. In this case,
+ * the passed servant in this method can be null; in this case, the servant,
+ * returned by {@link ServantActivatorOperations#incarnate} will
+ * be used.
+ *
+ * @param a_servant a servant that would serve the object with the
+ * returned Object Id.
+ *
+ * @return the generated objert Id for the given servant.
+ *
+ * @throws ServantAlreadyActive if this servant is already in the
+ * Active Object Map and the UNIQUE_ID policy applies.
+ *
+ * @throws WrongPolicy if the required policies SYSTEM_ID and RETAIN
+ * do not apply to this POA.
+ */
+ byte[] activate_object(Servant a_servant)
+ throws ServantAlreadyActive, WrongPolicy;
+
+ /**
+ * Add the given servant to the Active Object Map as a servant for the
+ * object with the provided Object Id. If the servant activator is
+ * set, its incarnate method will be called. In this case,
+ * the passed servant in this method can be null; in this case, the servant,
+ * returned by {@link ServantActivatorOperations#incarnate} will
+ * be used.
+ *
+ * @param an_Object_Id an object id for the given object.
+ * @param a_servant a servant that will serve the object with the given
+ * Object Id.
+ *
+ * @throws ObjectAlreadyActive if the given object id is already in the
+ * Active Object Map.
+ * @throws WrongPolicy if the required RETAIN policy does not apply to
+ * this POA.
+ * @throws BAD_PARAM if the passed object id is invalid due any reason.
+ */
+ void activate_object_with_id(byte[] an_Object_Id, Servant a_servant)
+ throws ServantAlreadyActive, ObjectAlreadyActive,
+ WrongPolicy;
+
+ /**
+ *
+ *
+ * @throws ServantNotActive in all cases, not listed in the list above.
+ * @throws WrongPolicy The method requres USE_DEFAULT_SERVANT policy or
+ * a combination of the RETAIN policy and either the UNIQUE_ID or
+ * IMPLICIT_ACTIVATION policies and throws the WrongPolicy if these conditions
+ * are not satisfied.
+ */
+ byte[] servant_to_id(Servant the_Servant)
+ throws ServantNotActive, WrongPolicy;
+
+ /**
+ * null
if this is a root POA.
+ */
+ POA the_parent();
+
+ /**
+ * destroy
is called
+ * multiple times before the destruction completes,
+ * the etherialization should be invoked only once.
+ *
+ * @param wait_for_completion if true, the method waits till the POA being
+ * destroyed completes all current requests and etherialization. If false,
+ * the method returns immediately.
+ */
+ void destroy(boolean etherealize_objects, boolean wait_for_completion);
+
+ /**
+ * Create the IdUniquenessPolicy policy.
+ *
+ * @param a_value states which one Id uniqueness policy will apply.
+ *
+ * @return the created policy.
+ */
+ IdUniquenessPolicy create_id_uniqueness_policy(IdUniquenessPolicyValue a_value);
+
+ /**
+ * Create the ImplicitActivationPolicy policy.
+ *
+ * @param a_value states which one activation policy will apply.
+ *
+ * @return the created policy.
+ */
+ ImplicitActivationPolicy create_implicit_activation_policy(ImplicitActivationPolicyValue a_value);
+
+ /**
+ * Create the LifespanPolicy policy.
+ *
+ * @param a_value states which one object lifespan policy will apply.
+ *
+ * @return the created policy.
+ */
+ LifespanPolicy create_lifespan_policy(LifespanPolicyValue a_value);
+
+ /**
+ * Create the RequestProcessingPolicy policy.
+ *
+ * @param a_value states which one request processing policy will apply.
+ *
+ * @return the created policy.
+ */
+ RequestProcessingPolicy create_request_processing_policy(RequestProcessingPolicyValue a_value);
+
+ /**
+ * Create the ServantRetentionPolicy policy.
+ *
+ * @param a_value states which one servant retention policy will apply.
+ *
+ * @return the created policy.
+ */
+ ServantRetentionPolicy create_servant_retention_policy(ServantRetentionPolicyValue a_value);
+
+ /**
+ * Create the ThreadPolicy policy.
+ *
+ * @param a_value states which one thread policy will apply.
+ *
+ * @return the created policy.
+ */
+ ThreadPolicy create_thread_policy(ThreadPolicyValue a_value);
+
+ /**
+ * Create the ID assignment policy with the given value.
+ *
+ * @param value states which one ID assignment policy will apply.
+ *
+ * @return the created policy.
+ */
+ IdAssignmentPolicy create_id_assignment_policy(IdAssignmentPolicyValue value);
+
+}
diff --git a/libjava/classpath/org/omg/PortableServer/POAPackage/AdapterAlreadyExists.java b/libjava/classpath/org/omg/PortableServer/POAPackage/AdapterAlreadyExists.java
new file mode 100644
index 000000000..602ce1dba
--- /dev/null
+++ b/libjava/classpath/org/omg/PortableServer/POAPackage/AdapterAlreadyExists.java
@@ -0,0 +1,79 @@
+/* AdapterAlreadyExists.java --
+ Copyright (C) 2005, 2006 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.PortableServer.POAPackage;
+
+import org.omg.CORBA.UserException;
+import org.omg.CORBA.portable.IDLEntity;
+
+import java.io.Serializable;
+
+/**
+ * Raised if the target POA already has a child POA with the specified name
+ * (during creation of the new POA as a child of the target POA).
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public final class AdapterAlreadyExists
+ extends UserException
+ implements IDLEntity, Serializable
+{
+ /**
+ * Use serialVersionUID (v1.4) for interoperability.
+ */
+ private static final long serialVersionUID = -2678288222917790041L;
+
+ /**
+ * Create AdapterAlreadyExists with no explaining
+ * message.
+ */
+ public AdapterAlreadyExists()
+ {
+ }
+
+ /**
+ * Create the AdapterAlreadyExists with explaining
+ * message.
+ *
+ * @param why a string, explaining, why this exception has been thrown.
+ */
+ public AdapterAlreadyExists(String why)
+ {
+ super(why);
+ }
+}
diff --git a/libjava/classpath/org/omg/PortableServer/POAPackage/AdapterAlreadyExistsHelper.java b/libjava/classpath/org/omg/PortableServer/POAPackage/AdapterAlreadyExistsHelper.java
new file mode 100644
index 000000000..ccb3fa584
--- /dev/null
+++ b/libjava/classpath/org/omg/PortableServer/POAPackage/AdapterAlreadyExistsHelper.java
@@ -0,0 +1,152 @@
+/* AdapterAlreadyExistsHelper.java --
+ Copyright (C) 2005, 2006 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.PortableServer.POAPackage;
+
+import gnu.CORBA.EmptyExceptionHolder;
+import gnu.CORBA.Minor;
+import gnu.CORBA.OrbRestricted;
+
+import org.omg.CORBA.Any;
+import org.omg.CORBA.BAD_OPERATION;
+import org.omg.CORBA.ORB;
+import org.omg.CORBA.StructMember;
+import org.omg.CORBA.TypeCode;
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+
+/**
+ * The helper operations for the exception {@link AdapterAlreadyExists}.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public abstract class AdapterAlreadyExistsHelper
+{
+ /**
+ * The cached typecode value, computed only once.
+ */
+ private static TypeCode typeCode;
+
+ /**
+ * Create the AdapterAlreadyExists typecode (emtpy structure,
+ * named "AdapterAlreadyExists").
+ */
+ public static TypeCode type()
+ {
+ if (typeCode == null)
+ {
+ ORB orb = OrbRestricted.Singleton;
+ StructMember[] members = new StructMember[ 0 ];
+ typeCode =
+ orb.create_exception_tc(id(), "AdapterAlreadyExists", members);
+ }
+ return typeCode;
+ }
+
+ /* Every user exception with no user defined
+ fields can use EmptyExceptionHolder */
+
+ /**
+ * Insert the AdapterAlreadyExists into the given Any.
+ *
+ * @param any the Any to insert into.
+ * @param that the AdapterAlreadyExists to insert.
+ */
+ public static void insert(Any any, AdapterAlreadyExists that)
+ {
+ any.insert_Streamable(new EmptyExceptionHolder(that, type()));
+ }
+
+ /**
+ * Extract the AdapterAlreadyExists from given Any.
+ *
+ * @throws BAD_OPERATION if the passed Any does not contain AdapterAlreadyExists.
+ */
+ public static AdapterAlreadyExists extract(Any any)
+ {
+ try
+ {
+ EmptyExceptionHolder h =
+ (EmptyExceptionHolder) any.extract_Streamable();
+ return (AdapterAlreadyExists) h.value;
+ }
+ catch (ClassCastException cex)
+ {
+ BAD_OPERATION bad = new BAD_OPERATION("AdapterAlreadyExists expected");
+ bad.minor = Minor.Any;
+ bad.initCause(cex);
+ throw bad;
+ }
+ }
+
+ /**
+ * Get the AdapterAlreadyExists repository id.
+ *
+ * @return "IDL:omg.org/PortableServer/POA/AdapterAlreadyExists:1.0", always.
+ */
+ public static String id()
+ {
+ return "IDL:omg.org/PortableServer/POA/AdapterAlreadyExists:1.0";
+ }
+
+ /**
+ * Read the exception from the CDR intput stream.
+ *
+ * @param input a org.omg.CORBA.portable stream to read from.
+ */
+ public static AdapterAlreadyExists read(InputStream input)
+ {
+ // Read the exception repository id.
+ String id = input.read_string();
+ AdapterAlreadyExists value = new AdapterAlreadyExists(id);
+
+ return value;
+ }
+
+ /**
+ * Write the exception to the CDR output stream.
+ *
+ * @param output a org.omg.CORBA.portable stream stream to write into.
+ * @param value a value to write.
+ */
+ public static void write(OutputStream output, AdapterAlreadyExists value)
+ {
+ // Write the exception repository id.
+ output.write_string(id());
+ }
+}
diff --git a/libjava/classpath/org/omg/PortableServer/POAPackage/AdapterNonExistent.java b/libjava/classpath/org/omg/PortableServer/POAPackage/AdapterNonExistent.java
new file mode 100644
index 000000000..c7f87bccf
--- /dev/null
+++ b/libjava/classpath/org/omg/PortableServer/POAPackage/AdapterNonExistent.java
@@ -0,0 +1,79 @@
+/* AdapterNonExistent.java --
+ Copyright (C) 2005, 2006 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.PortableServer.POAPackage;
+
+import org.omg.CORBA.UserException;
+import org.omg.CORBA.portable.IDLEntity;
+
+import java.io.Serializable;
+
+/**
+ * The AdapterNonExistent is thrown if the parent POA cannot locate
+ * the required child POA.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public final class AdapterNonExistent
+ extends UserException
+ implements IDLEntity, Serializable
+{
+ /**
+ * Use serialVersionUID (v1.4) for interoperability.
+ */
+ private static final long serialVersionUID = -9166706041988650696L;
+
+ /**
+ * Create AdapterNonExistent with no explaining
+ * message.
+ */
+ public AdapterNonExistent()
+ {
+ }
+
+ /**
+ * Create the AdapterNonExistent with explaining
+ * message.
+ *
+ * @param why a string, explaining, why this exception has been thrown.
+ */
+ public AdapterNonExistent(String why)
+ {
+ super(why);
+ }
+}
diff --git a/libjava/classpath/org/omg/PortableServer/POAPackage/AdapterNonExistentHelper.java b/libjava/classpath/org/omg/PortableServer/POAPackage/AdapterNonExistentHelper.java
new file mode 100644
index 000000000..65842b756
--- /dev/null
+++ b/libjava/classpath/org/omg/PortableServer/POAPackage/AdapterNonExistentHelper.java
@@ -0,0 +1,151 @@
+/* AdapterNonExistentHelper.java --
+ Copyright (C) 2005, 2006 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.PortableServer.POAPackage;
+
+import gnu.CORBA.EmptyExceptionHolder;
+import gnu.CORBA.Minor;
+import gnu.CORBA.OrbRestricted;
+
+import org.omg.CORBA.Any;
+import org.omg.CORBA.BAD_OPERATION;
+import org.omg.CORBA.ORB;
+import org.omg.CORBA.StructMember;
+import org.omg.CORBA.TypeCode;
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+
+/**
+ * The helper operations for the exception {@link AdapterNonExistent}.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public abstract class AdapterNonExistentHelper
+{
+ /**
+ * The cached typecode value, computed only once.
+ */
+ private static TypeCode typeCode;
+
+ /**
+ * Create the AdapterNonExistent typecode (empty structure,
+ * named "AdapterNonExistent").
+ */
+ public static TypeCode type()
+ {
+ if (typeCode == null)
+ {
+ ORB orb = OrbRestricted.Singleton;
+ StructMember[] members = new StructMember[ 0 ];
+ typeCode = orb.create_exception_tc(id(), "AdapterNonExistent", members);
+ }
+ return typeCode;
+ }
+
+ /* Every user exception with no user defined
+ fields can use EmptyExceptionHolder */
+
+ /**
+ * Insert the AdapterNonExistent into the given Any.
+ *
+ * @param any the Any to insert into.
+ * @param that the AdapterNonExistent to insert.
+ */
+ public static void insert(Any any, AdapterNonExistent that)
+ {
+ any.insert_Streamable(new EmptyExceptionHolder(that, type()));
+ }
+
+ /**
+ * Extract the AdapterNonExistent from given Any.
+ *
+ * @throws BAD_OPERATION if the passed Any does not contain AdapterNonExistent.
+ */
+ public static AdapterNonExistent extract(Any any)
+ {
+ try
+ {
+ EmptyExceptionHolder h =
+ (EmptyExceptionHolder) any.extract_Streamable();
+ return (AdapterNonExistent) h.value;
+ }
+ catch (ClassCastException cex)
+ {
+ BAD_OPERATION bad = new BAD_OPERATION("AdapterNonExistent expected");
+ bad.minor = Minor.Any;
+ bad.initCause(cex);
+ throw bad;
+ }
+ }
+
+ /**
+ * Get the AdapterNonExistent repository id.
+ *
+ * @return "IDL:omg.org/PortableServer/POA/AdapterNonExistent:1.0", always.
+ */
+ public static String id()
+ {
+ return "IDL:omg.org/PortableServer/POA/AdapterNonExistent:1.0";
+ }
+
+ /**
+ * Read the exception from the CDR intput stream.
+ *
+ * @param input a org.omg.CORBA.portable stream to read from.
+ */
+ public static AdapterNonExistent read(InputStream input)
+ {
+ // Read the exception repository id.
+ String id = input.read_string();
+ AdapterNonExistent value = new AdapterNonExistent(id);
+
+ return value;
+ }
+
+ /**
+ * Write the exception to the CDR output stream.
+ *
+ * @param output a org.omg.CORBA.portable stream stream to write into.
+ * @param value a value to write.
+ */
+ public static void write(OutputStream output, AdapterNonExistent value)
+ {
+ // Write the exception repository id.
+ output.write_string(id());
+ }
+}
diff --git a/libjava/classpath/org/omg/PortableServer/POAPackage/InvalidPolicy.java b/libjava/classpath/org/omg/PortableServer/POAPackage/InvalidPolicy.java
new file mode 100644
index 000000000..43ea544d3
--- /dev/null
+++ b/libjava/classpath/org/omg/PortableServer/POAPackage/InvalidPolicy.java
@@ -0,0 +1,109 @@
+/* InvalidPolicy.java --
+ Copyright (C) 2005, 2006 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.PortableServer.POAPackage;
+
+import org.omg.CORBA.UserException;
+import org.omg.CORBA.portable.IDLEntity;
+
+import java.io.Serializable;
+
+/**
+ * Raised if any of the policy objects specified is not supported by this
+ * ORB implementation, if conflicting policy objects are specified,
+ * or if any of the specified policy objects require prior administrative
+ * action that has not been performed.
+ *
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public final class InvalidPolicy
+ extends UserException
+ implements IDLEntity, Serializable
+{
+ /**
+ * Use serialVersionUID (v1.4) for interoperability.
+ */
+ private static final long serialVersionUID = 3204212102282117205L;
+
+ /**
+ * The index in the policies parameter value of the first offending
+ * policy object.
+ */
+ public short index;
+
+ /**
+ * Create InvalidPolicy with no explaining
+ * message and leaving {@link #index} with default 0 value.
+ */
+ public InvalidPolicy()
+ {
+ }
+
+ /**
+ * Create the InvalidPolicy with explaining
+ * message and initialisintg {@link #index} to the passed value.
+ *
+ * @param why a string, explaining, why this exception has been thrown.
+ * @param a_index a value for index.
+ */
+ public InvalidPolicy(String why, short a_index)
+ {
+ super(why);
+ this.index = a_index;
+ }
+
+ /**
+ * Create the InvalidPolicy without explaining
+ * message and initialisintg {@link #index} to the passed value.
+ *
+ * @param a_index a value for index.
+ */
+ public InvalidPolicy(short a_index)
+ {
+ this.index = a_index;
+ }
+
+ /**
+ * Adds {@link #index} to the super.getMessage().
+ */
+ public String getMessage()
+ {
+ return super.getMessage() + " at index " + index;
+ }
+}
diff --git a/libjava/classpath/org/omg/PortableServer/POAPackage/InvalidPolicyHelper.java b/libjava/classpath/org/omg/PortableServer/POAPackage/InvalidPolicyHelper.java
new file mode 100644
index 000000000..64cdaadbf
--- /dev/null
+++ b/libjava/classpath/org/omg/PortableServer/POAPackage/InvalidPolicyHelper.java
@@ -0,0 +1,158 @@
+/* InvalidPolicyHelper.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.PortableServer.POAPackage;
+
+import gnu.CORBA.Minor;
+import gnu.CORBA.OrbRestricted;
+import gnu.CORBA.Poa.InvalidPolicyHolder;
+
+import org.omg.CORBA.Any;
+import org.omg.CORBA.BAD_OPERATION;
+import org.omg.CORBA.ORB;
+import org.omg.CORBA.StructMember;
+import org.omg.CORBA.TCKind;
+import org.omg.CORBA.TypeCode;
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+
+/**
+ * The helper operations for the exception {@link InvalidPolicy}.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public abstract class InvalidPolicyHelper
+{
+ /**
+ * The cached typecode value, computed only once.
+ */
+ private static TypeCode typeCode;
+
+ /**
+ * Create the InvalidPolicy typecode (emtpy structure,
+ * named "InvalidPolicy").
+ * The typecode states that the structure contains the
+ * single field, named "index".
+ */
+ public static TypeCode type()
+ {
+ if (typeCode == null)
+ {
+ ORB orb = OrbRestricted.Singleton;
+ StructMember[] members = new StructMember[ 1 ];
+
+ TypeCode field;
+
+ field = orb.get_primitive_tc(TCKind.tk_ushort);
+ members [ 0 ] = new StructMember("index", field, null);
+ typeCode = orb.create_exception_tc(id(), "InvalidPolicy", members);
+ }
+ return typeCode;
+ }
+
+ /**
+ * Insert the InvalidPolicy into the given Any.
+ * This method uses the InvalidPolicyHolder.
+ *
+ * @param any the Any to insert into.
+ * @param that the InvalidPolicy to insert.
+ */
+ public static void insert(Any any, InvalidPolicy that)
+ {
+ any.insert_Streamable(new InvalidPolicyHolder(that));
+ }
+
+ /**
+ * Extract the InvalidPolicy from given Any.
+ * This method uses the InvalidPolicyHolder.
+ *
+ * @throws BAD_OPERATION if the passed Any does not contain InvalidPolicy.
+ */
+ public static InvalidPolicy extract(Any any)
+ {
+ try
+ {
+ return ((InvalidPolicyHolder) any.extract_Streamable()).value;
+ }
+ catch (ClassCastException cex)
+ {
+ BAD_OPERATION bad = new BAD_OPERATION("InvalidPolicy expected");
+ bad.minor = Minor.Any;
+ bad.initCause(cex);
+ throw bad;
+ }
+ }
+
+ /**
+ * Get the InvalidPolicy repository id.
+ *
+ * @return "IDL:omg.org/PortableServer/POA/InvalidPolicy:1.0", always.
+ */
+ public static String id()
+ {
+ return "IDL:omg.org/PortableServer/POA/InvalidPolicy:1.0";
+ }
+
+ /**
+ * Read the exception from the CDR intput stream.
+ *
+ * @param input a org.omg.CORBA.portable stream to read from.
+ */
+ public static InvalidPolicy read(InputStream input)
+ {
+ // Read the exception repository id.
+ input.read_string();
+ InvalidPolicy value = new InvalidPolicy();
+
+ value.index = input.read_short();
+ return value;
+ }
+
+ /**
+ * Write the exception to the CDR output stream.
+ *
+ * @param output a org.omg.CORBA.portable stream stream to write into.
+ * @param value a value to write.
+ */
+ public static void write(OutputStream output, InvalidPolicy value)
+ {
+ // Write the exception repository id.
+ output.write_string(id());
+ output.write_short(value.index);
+ }
+}
diff --git a/libjava/classpath/org/omg/PortableServer/POAPackage/NoServant.java b/libjava/classpath/org/omg/PortableServer/POAPackage/NoServant.java
new file mode 100644
index 000000000..a3d7b0437
--- /dev/null
+++ b/libjava/classpath/org/omg/PortableServer/POAPackage/NoServant.java
@@ -0,0 +1,79 @@
+/* NoServant.java --
+ Copyright (C) 2005, 2006 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.PortableServer.POAPackage;
+
+import org.omg.CORBA.UserException;
+import org.omg.CORBA.portable.IDLEntity;
+
+import java.io.Serializable;
+
+/**
+ * Raised when trying to get the default servant, when no default servant
+ * has been associated with POA.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public final class NoServant
+ extends UserException
+ implements IDLEntity, Serializable
+{
+ /**
+ * Use serialVersionUID (v1.4) for interoperability.
+ */
+ private static final long serialVersionUID = -5893773687270266061L;
+
+ /**
+ * Create NoServant with no explaining
+ * message.
+ */
+ public NoServant()
+ {
+ }
+
+ /**
+ * Create the NoServant with explaining
+ * message.
+ *
+ * @param why a string, explaining, why this exception has been thrown.
+ */
+ public NoServant(String why)
+ {
+ super(why);
+ }
+}
diff --git a/libjava/classpath/org/omg/PortableServer/POAPackage/NoServantHelper.java b/libjava/classpath/org/omg/PortableServer/POAPackage/NoServantHelper.java
new file mode 100644
index 000000000..cfb63ed26
--- /dev/null
+++ b/libjava/classpath/org/omg/PortableServer/POAPackage/NoServantHelper.java
@@ -0,0 +1,151 @@
+/* NoServantHelper.java --
+ Copyright (C) 2005, 2006 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.PortableServer.POAPackage;
+
+import gnu.CORBA.EmptyExceptionHolder;
+import gnu.CORBA.Minor;
+import gnu.CORBA.OrbRestricted;
+
+import org.omg.CORBA.Any;
+import org.omg.CORBA.BAD_OPERATION;
+import org.omg.CORBA.ORB;
+import org.omg.CORBA.StructMember;
+import org.omg.CORBA.TypeCode;
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+
+/**
+ * The helper operations for the exception {@link NoServant}.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public abstract class NoServantHelper
+{
+ /**
+ * The cached typecode value, computed only once.
+ */
+ private static TypeCode typeCode;
+
+ /**
+ * Create the NoServant typecode (empty structure,
+ * named "NoServant").
+ */
+ public static TypeCode type()
+ {
+ if (typeCode == null)
+ {
+ ORB orb = OrbRestricted.Singleton;
+ StructMember[] members = new StructMember[ 0 ];
+ typeCode = orb.create_exception_tc(id(), "NoServant", members);
+ }
+ return typeCode;
+ }
+
+ /* Every user exception with no user defined
+ fields can use EmptyExceptionHolder */
+
+ /**
+ * Insert the NoServant into the given Any.
+ *
+ * @param any the Any to insert into.
+ * @param that the NoServant to insert.
+ */
+ public static void insert(Any any, NoServant that)
+ {
+ any.insert_Streamable(new EmptyExceptionHolder(that, type()));
+ }
+
+ /**
+ * Extract the NoServant from given Any.
+ *
+ * @throws BAD_OPERATION if the passed Any does not contain NoServant.
+ */
+ public static NoServant extract(Any any)
+ {
+ try
+ {
+ EmptyExceptionHolder h =
+ (EmptyExceptionHolder) any.extract_Streamable();
+ return (NoServant) h.value;
+ }
+ catch (ClassCastException cex)
+ {
+ BAD_OPERATION bad = new BAD_OPERATION("NoServant expected");
+ bad.minor = Minor.Any;
+ bad.initCause(cex);
+ throw bad;
+ }
+ }
+
+ /**
+ * Get the NoServant repository id.
+ *
+ * @return "IDL:omg.org/PortableServer/POA/NoServant:1.0", always.
+ */
+ public static String id()
+ {
+ return "IDL:omg.org/PortableServer/POA/NoServant:1.0";
+ }
+
+ /**
+ * Read the exception from the CDR intput stream.
+ *
+ * @param input a org.omg.CORBA.portable stream to read from.
+ */
+ public static NoServant read(InputStream input)
+ {
+ // Read the exception repository id.
+ String id = input.read_string();
+ NoServant value = new NoServant(id);
+
+ return value;
+ }
+
+ /**
+ * Write the exception to the CDR output stream.
+ *
+ * @param output a org.omg.CORBA.portable stream stream to write into.
+ * @param value a value to write.
+ */
+ public static void write(OutputStream output, NoServant value)
+ {
+ // Write the exception repository id.
+ output.write_string(id());
+ }
+}
diff --git a/libjava/classpath/org/omg/PortableServer/POAPackage/ObjectAlreadyActive.java b/libjava/classpath/org/omg/PortableServer/POAPackage/ObjectAlreadyActive.java
new file mode 100644
index 000000000..9a80b95f8
--- /dev/null
+++ b/libjava/classpath/org/omg/PortableServer/POAPackage/ObjectAlreadyActive.java
@@ -0,0 +1,78 @@
+/* ObjectAlreadyActive.java --
+ Copyright (C) 2005, 2006 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.PortableServer.POAPackage;
+
+import org.omg.CORBA.UserException;
+import org.omg.CORBA.portable.IDLEntity;
+
+import java.io.Serializable;
+
+/**
+ * Raised in response to activate the already active object.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public final class ObjectAlreadyActive
+ extends UserException
+ implements IDLEntity, Serializable
+{
+ /**
+ * Use serialVersionUID (v1.4) for interoperability.
+ */
+ private static final long serialVersionUID = -2919308871345098101L;
+
+ /**
+ * Create ObjectAlreadyActive with no explaining
+ * message.
+ */
+ public ObjectAlreadyActive()
+ {
+ }
+
+ /**
+ * Create the ObjectAlreadyActive with explaining
+ * message.
+ *
+ * @param why a string, explaining, why this exception has been thrown.
+ */
+ public ObjectAlreadyActive(String why)
+ {
+ super(why);
+ }
+}
diff --git a/libjava/classpath/org/omg/PortableServer/POAPackage/ObjectAlreadyActiveHelper.java b/libjava/classpath/org/omg/PortableServer/POAPackage/ObjectAlreadyActiveHelper.java
new file mode 100644
index 000000000..48070eade
--- /dev/null
+++ b/libjava/classpath/org/omg/PortableServer/POAPackage/ObjectAlreadyActiveHelper.java
@@ -0,0 +1,152 @@
+/* ObjectAlreadyActiveHelper.java --
+ Copyright (C) 2005, 2006 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.PortableServer.POAPackage;
+
+import gnu.CORBA.EmptyExceptionHolder;
+import gnu.CORBA.Minor;
+import gnu.CORBA.OrbRestricted;
+
+import org.omg.CORBA.Any;
+import org.omg.CORBA.BAD_OPERATION;
+import org.omg.CORBA.ORB;
+import org.omg.CORBA.StructMember;
+import org.omg.CORBA.TypeCode;
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+
+/**
+ * The helper operations for the exception {@link ObjectAlreadyActive}.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public abstract class ObjectAlreadyActiveHelper
+{
+ /**
+ * The cached typecode value, computed only once.
+ */
+ private static TypeCode typeCode;
+
+ /**
+ * Create the ObjectAlreadyActive typecode (empty structure,
+ * named "ObjectAlreadyActive").
+ */
+ public static TypeCode type()
+ {
+ if (typeCode == null)
+ {
+ ORB orb = OrbRestricted.Singleton;
+ StructMember[] members = new StructMember[ 0 ];
+ typeCode =
+ orb.create_exception_tc(id(), "ObjectAlreadyActive", members);
+ }
+ return typeCode;
+ }
+
+ /* Every user exception with no user defined
+ fields can use EmptyExceptionHolder */
+
+ /**
+ * Insert the ObjectAlreadyActive into the given Any.
+ *
+ * @param any the Any to insert into.
+ * @param that the ObjectAlreadyActive to insert.
+ */
+ public static void insert(Any any, ObjectAlreadyActive that)
+ {
+ any.insert_Streamable(new EmptyExceptionHolder(that, type()));
+ }
+
+ /**
+ * Extract the ObjectAlreadyActive from given Any.
+ *
+ * @throws BAD_OPERATION if the passed Any does not contain ObjectAlreadyActive.
+ */
+ public static ObjectAlreadyActive extract(Any any)
+ {
+ try
+ {
+ EmptyExceptionHolder h =
+ (EmptyExceptionHolder) any.extract_Streamable();
+ return (ObjectAlreadyActive) h.value;
+ }
+ catch (ClassCastException cex)
+ {
+ BAD_OPERATION bad = new BAD_OPERATION("ObjectAlreadyActive expected");
+ bad.minor = Minor.Any;
+ bad.initCause(cex);
+ throw bad;
+ }
+ }
+
+ /**
+ * Get the ObjectAlreadyActive repository id.
+ *
+ * @return "IDL:omg.org/PortableServer/POA/ObjectAlreadyActive:1.0", always.
+ */
+ public static String id()
+ {
+ return "IDL:omg.org/PortableServer/POA/ObjectAlreadyActive:1.0";
+ }
+
+ /**
+ * Read the exception from the CDR intput stream.
+ *
+ * @param input a org.omg.CORBA.portable stream to read from.
+ */
+ public static ObjectAlreadyActive read(InputStream input)
+ {
+ // Read the exception repository id.
+ String id = input.read_string();
+ ObjectAlreadyActive value = new ObjectAlreadyActive(id);
+
+ return value;
+ }
+
+ /**
+ * Write the exception to the CDR output stream.
+ *
+ * @param output a org.omg.CORBA.portable stream stream to write into.
+ * @param value a value to write.
+ */
+ public static void write(OutputStream output, ObjectAlreadyActive value)
+ {
+ // Write the exception repository id.
+ output.write_string(id());
+ }
+}
diff --git a/libjava/classpath/org/omg/PortableServer/POAPackage/ObjectNotActive.java b/libjava/classpath/org/omg/PortableServer/POAPackage/ObjectNotActive.java
new file mode 100644
index 000000000..e8f0bc6bb
--- /dev/null
+++ b/libjava/classpath/org/omg/PortableServer/POAPackage/ObjectNotActive.java
@@ -0,0 +1,79 @@
+/* ObjectNotActive.java --
+ Copyright (C) 2005, 2006 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.PortableServer.POAPackage;
+
+import org.omg.CORBA.UserException;
+import org.omg.CORBA.portable.IDLEntity;
+
+import java.io.Serializable;
+
+/**
+ * Raised in several cases when the operation would be applicable to the
+ * activated object, but the current object is not active.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public final class ObjectNotActive
+ extends UserException
+ implements IDLEntity, Serializable
+{
+ /**
+ * Use serialVersionUID (v1.4) for interoperability.
+ */
+ private static final long serialVersionUID = 2269559915073532416L;
+
+ /**
+ * Create ObjectNotActive with no explaining
+ * message.
+ */
+ public ObjectNotActive()
+ {
+ }
+
+ /**
+ * Create the ObjectNotActive with explaining
+ * message.
+ *
+ * @param why a string, explaining, why this exception has been thrown.
+ */
+ public ObjectNotActive(String why)
+ {
+ super(why);
+ }
+}
diff --git a/libjava/classpath/org/omg/PortableServer/POAPackage/ObjectNotActiveHelper.java b/libjava/classpath/org/omg/PortableServer/POAPackage/ObjectNotActiveHelper.java
new file mode 100644
index 000000000..492040dd2
--- /dev/null
+++ b/libjava/classpath/org/omg/PortableServer/POAPackage/ObjectNotActiveHelper.java
@@ -0,0 +1,151 @@
+/* ObjectNotActiveHelper.java --
+ Copyright (C) 2005, 2006 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.PortableServer.POAPackage;
+
+import gnu.CORBA.EmptyExceptionHolder;
+import gnu.CORBA.Minor;
+import gnu.CORBA.OrbRestricted;
+
+import org.omg.CORBA.Any;
+import org.omg.CORBA.BAD_OPERATION;
+import org.omg.CORBA.ORB;
+import org.omg.CORBA.StructMember;
+import org.omg.CORBA.TypeCode;
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+
+/**
+ * The helper operations for the exception {@link ObjectNotActive}.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public abstract class ObjectNotActiveHelper
+{
+ /**
+ * The cached typecode value, computed only once.
+ */
+ private static TypeCode typeCode;
+
+ /**
+ * Create the ObjectNotActive typecode (empty structure,
+ * named "ObjectNotActive").
+ */
+ public static TypeCode type()
+ {
+ if (typeCode == null)
+ {
+ ORB orb = OrbRestricted.Singleton;
+ StructMember[] members = new StructMember[ 0 ];
+ typeCode = orb.create_exception_tc(id(), "ObjectNotActive", members);
+ }
+ return typeCode;
+ }
+
+ /* Every user exception with no user defined
+ fields can use EmptyExceptionHolder */
+
+ /**
+ * Insert the ObjectNotActive into the given Any.
+ *
+ * @param any the Any to insert into.
+ * @param that the ObjectNotActive to insert.
+ */
+ public static void insert(Any any, ObjectNotActive that)
+ {
+ any.insert_Streamable(new EmptyExceptionHolder(that, type()));
+ }
+
+ /**
+ * Extract the ObjectNotActive from given Any.
+ *
+ * @throws BAD_OPERATION if the passed Any does not contain ObjectNotActive.
+ */
+ public static ObjectNotActive extract(Any any)
+ {
+ try
+ {
+ EmptyExceptionHolder h =
+ (EmptyExceptionHolder) any.extract_Streamable();
+ return (ObjectNotActive) h.value;
+ }
+ catch (ClassCastException cex)
+ {
+ BAD_OPERATION bad = new BAD_OPERATION("ObjectNotActive expected");
+ bad.minor = Minor.Any;
+ bad.initCause(cex);
+ throw bad;
+ }
+ }
+
+ /**
+ * Get the ObjectNotActive repository id.
+ *
+ * @return "IDL:omg.org/PortableServer/POA/ObjectNotActive:1.0", always.
+ */
+ public static String id()
+ {
+ return "IDL:omg.org/PortableServer/POA/ObjectNotActive:1.0";
+ }
+
+ /**
+ * Read the exception from the CDR intput stream.
+ *
+ * @param input a org.omg.CORBA.portable stream to read from.
+ */
+ public static ObjectNotActive read(InputStream input)
+ {
+ // Read the exception repository id.
+ String id = input.read_string();
+ ObjectNotActive value = new ObjectNotActive(id);
+
+ return value;
+ }
+
+ /**
+ * Write the exception to the CDR output stream.
+ *
+ * @param output a org.omg.CORBA.portable stream stream to write into.
+ * @param value a value to write.
+ */
+ public static void write(OutputStream output, ObjectNotActive value)
+ {
+ // Write the exception repository id.
+ output.write_string(id());
+ }
+}
diff --git a/libjava/classpath/org/omg/PortableServer/POAPackage/ServantAlreadyActive.java b/libjava/classpath/org/omg/PortableServer/POAPackage/ServantAlreadyActive.java
new file mode 100644
index 000000000..a6fd5da24
--- /dev/null
+++ b/libjava/classpath/org/omg/PortableServer/POAPackage/ServantAlreadyActive.java
@@ -0,0 +1,83 @@
+/* ServantAlreadyActive.java --
+ Copyright (C) 2005, 2006 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.PortableServer.POAPackage;
+
+import org.omg.CORBA.UserException;
+import org.omg.CORBA.portable.IDLEntity;
+
+import java.io.Serializable;
+
+/**
+ * Raised in response to activate the already active object when
+ * the UNIQUE_ID (single ID per object, default) policy is active. If the
+ * UNIQUE_ID policy is inactive, the object can be activated several
+ * times, each time obtaining a newly generated Id to the same object.
+ *
+ * @see org.omg.PortableServer.IdUniquenessPolicyValue
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public final class ServantAlreadyActive
+ extends UserException
+ implements IDLEntity, Serializable
+{
+ /**
+ * Use serialVersionUID (v1.4) for interoperability.
+ */
+ private static final long serialVersionUID = 780130793809887260L;
+
+ /**
+ * Create ServantAlreadyActive with no explaining
+ * message.
+ */
+ public ServantAlreadyActive()
+ {
+ }
+
+ /**
+ * Create the ServantAlreadyActive with explaining
+ * message.
+ *
+ * @param why a string, explaining, why this exception has been thrown.
+ */
+ public ServantAlreadyActive(String why)
+ {
+ super(why);
+ }
+}
diff --git a/libjava/classpath/org/omg/PortableServer/POAPackage/ServantAlreadyActiveHelper.java b/libjava/classpath/org/omg/PortableServer/POAPackage/ServantAlreadyActiveHelper.java
new file mode 100644
index 000000000..8fdb1ec15
--- /dev/null
+++ b/libjava/classpath/org/omg/PortableServer/POAPackage/ServantAlreadyActiveHelper.java
@@ -0,0 +1,152 @@
+/* ServantAlreadyActiveHelper.java --
+ Copyright (C) 2005, 2006 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.PortableServer.POAPackage;
+
+import gnu.CORBA.EmptyExceptionHolder;
+import gnu.CORBA.Minor;
+import gnu.CORBA.OrbRestricted;
+
+import org.omg.CORBA.Any;
+import org.omg.CORBA.BAD_OPERATION;
+import org.omg.CORBA.ORB;
+import org.omg.CORBA.StructMember;
+import org.omg.CORBA.TypeCode;
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+
+/**
+* The helper operations for the exception {@link ServantAlreadyActive}.
+*
+* @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+*/
+public abstract class ServantAlreadyActiveHelper
+{
+ /**
+ * The cached typecode value, computed only once.
+ */
+ private static TypeCode typeCode;
+
+ /**
+ * Create the ServantAlreadyActive typecode (structure,
+ * named "ServantAlreadyActive").
+ */
+ public static TypeCode type()
+ {
+ if (typeCode == null)
+ {
+ ORB orb = OrbRestricted.Singleton;
+ StructMember[] members = new StructMember[ 0 ];
+ typeCode =
+ orb.create_exception_tc(id(), "ServantAlreadyActive", members);
+ }
+ return typeCode;
+ }
+
+ /* Every user exception with no user defined
+ fields can use EmptyExceptionHolder */
+
+ /**
+ * Insert the ServantAlreadyActive into the given Any.
+ *
+ * @param any the Any to insert into.
+ * @param that the ServantAlreadyActive to insert.
+ */
+ public static void insert(Any any, ServantAlreadyActive that)
+ {
+ any.insert_Streamable(new EmptyExceptionHolder(that, type()));
+ }
+
+ /**
+ * Extract the ServantAlreadyActive from given Any.
+ *
+ * @throws BAD_OPERATION if the passed Any does not contain ServantAlreadyActive.
+ */
+ public static ServantAlreadyActive extract(Any any)
+ {
+ try
+ {
+ EmptyExceptionHolder h =
+ (EmptyExceptionHolder) any.extract_Streamable();
+ return (ServantAlreadyActive) h.value;
+ }
+ catch (ClassCastException cex)
+ {
+ BAD_OPERATION bad = new BAD_OPERATION("ServantAlreadyActive expected");
+ bad.minor = Minor.Any;
+ bad.initCause(cex);
+ throw bad;
+ }
+ }
+
+ /**
+ * Get the ServantAlreadyActive repository id.
+ *
+ * @return "IDL:omg.org/PortableServer/POA/ServantAlreadyActive:1.0", always.
+ */
+ public static String id()
+ {
+ return "IDL:omg.org/PortableServer/POA/ServantAlreadyActive:1.0";
+ }
+
+ /**
+ * Read the exception from the CDR intput stream.
+ *
+ * @param input a org.omg.CORBA.portable stream to read from.
+ */
+ public static ServantAlreadyActive read(InputStream input)
+ {
+ // Read the exception repository id.
+ String id = input.read_string();
+ ServantAlreadyActive value = new ServantAlreadyActive(id);
+
+ return value;
+ }
+
+ /**
+ * Write the exception to the CDR output stream.
+ *
+ * @param output a org.omg.CORBA.portable stream stream to write into.
+ * @param value a value to write.
+ */
+ public static void write(OutputStream output, ServantAlreadyActive value)
+ {
+ // Write the exception repository id.
+ output.write_string(id());
+ }
+}
diff --git a/libjava/classpath/org/omg/PortableServer/POAPackage/ServantNotActive.java b/libjava/classpath/org/omg/PortableServer/POAPackage/ServantNotActive.java
new file mode 100644
index 000000000..584459939
--- /dev/null
+++ b/libjava/classpath/org/omg/PortableServer/POAPackage/ServantNotActive.java
@@ -0,0 +1,79 @@
+/* ServantNotActive.java --
+ Copyright (C) 2005, 2006 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.PortableServer.POAPackage;
+
+import org.omg.CORBA.UserException;
+import org.omg.CORBA.portable.IDLEntity;
+
+import java.io.Serializable;
+
+/**
+ * Raised in several cases when the operation would be applicable to the
+ * activated servant, but the current object is not active.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public final class ServantNotActive
+ extends UserException
+ implements IDLEntity, Serializable
+{
+ /**
+ * Use serialVersionUID (v1.4) for interoperability.
+ */
+ private static final long serialVersionUID = -7806868032412803953L;
+
+ /**
+ * Create ServantNotActive with no explaining
+ * message.
+ */
+ public ServantNotActive()
+ {
+ }
+
+ /**
+ * Create the ServantNotActive with explaining
+ * message.
+ *
+ * @param why a string, explaining, why this exception has been thrown.
+ */
+ public ServantNotActive(String why)
+ {
+ super(why);
+ }
+}
diff --git a/libjava/classpath/org/omg/PortableServer/POAPackage/ServantNotActiveHelper.java b/libjava/classpath/org/omg/PortableServer/POAPackage/ServantNotActiveHelper.java
new file mode 100644
index 000000000..99110e511
--- /dev/null
+++ b/libjava/classpath/org/omg/PortableServer/POAPackage/ServantNotActiveHelper.java
@@ -0,0 +1,151 @@
+/* ServantNotActiveHelper.java --
+ Copyright (C) 2005, 2006 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.PortableServer.POAPackage;
+
+import gnu.CORBA.EmptyExceptionHolder;
+import gnu.CORBA.Minor;
+import gnu.CORBA.OrbRestricted;
+
+import org.omg.CORBA.Any;
+import org.omg.CORBA.BAD_OPERATION;
+import org.omg.CORBA.ORB;
+import org.omg.CORBA.StructMember;
+import org.omg.CORBA.TypeCode;
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+
+/**
+ * The helper operations for the exception {@link ServantNotActive}.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public abstract class ServantNotActiveHelper
+{
+ /**
+ * The cached typecode value, computed only once.
+ */
+ private static TypeCode typeCode;
+
+ /**
+ * Create the ServantNotActive typecode (empty structure,
+ * named "ServantNotActive").
+ */
+ public static TypeCode type()
+ {
+ if (typeCode == null)
+ {
+ ORB orb = OrbRestricted.Singleton;
+ StructMember[] members = new StructMember[ 0 ];
+ typeCode = orb.create_exception_tc(id(), "ServantNotActive", members);
+ }
+ return typeCode;
+ }
+
+ /* Every user exception with no user defined
+ fields can use EmptyExceptionHolder */
+
+ /**
+ * Insert the ServantNotActive into the given Any.
+ *
+ * @param any the Any to insert into.
+ * @param that the ServantNotActive to insert.
+ */
+ public static void insert(Any any, ServantNotActive that)
+ {
+ any.insert_Streamable(new EmptyExceptionHolder(that, type()));
+ }
+
+ /**
+ * Extract the ServantNotActive from given Any.
+ *
+ * @throws BAD_OPERATION if the passed Any does not contain ServantNotActive.
+ */
+ public static ServantNotActive extract(Any any)
+ {
+ try
+ {
+ EmptyExceptionHolder h =
+ (EmptyExceptionHolder) any.extract_Streamable();
+ return (ServantNotActive) h.value;
+ }
+ catch (ClassCastException cex)
+ {
+ BAD_OPERATION bad = new BAD_OPERATION("ServantNotActive expected");
+ bad.minor = Minor.Any;
+ bad.initCause(cex);
+ throw bad;
+ }
+ }
+
+ /**
+ * Get the ServantNotActive repository id.
+ *
+ * @return "IDL:omg.org/PortableServer/POA/ServantNotActive:1.0", always.
+ */
+ public static String id()
+ {
+ return "IDL:omg.org/PortableServer/POA/ServantNotActive:1.0";
+ }
+
+ /**
+ * Read the exception from the CDR intput stream.
+ *
+ * @param input a org.omg.CORBA.portable stream to read from.
+ */
+ public static ServantNotActive read(InputStream input)
+ {
+ // Read the exception repository id.
+ String id = input.read_string();
+ ServantNotActive value = new ServantNotActive(id);
+
+ return value;
+ }
+
+ /**
+ * Write the exception to the CDR output stream.
+ *
+ * @param output a org.omg.CORBA.portable stream stream to write into.
+ * @param value a value to write.
+ */
+ public static void write(OutputStream output, ServantNotActive value)
+ {
+ // Write the exception repository id.
+ output.write_string(id());
+ }
+}
diff --git a/libjava/classpath/org/omg/PortableServer/POAPackage/WrongAdapter.java b/libjava/classpath/org/omg/PortableServer/POAPackage/WrongAdapter.java
new file mode 100644
index 000000000..8e28e8430
--- /dev/null
+++ b/libjava/classpath/org/omg/PortableServer/POAPackage/WrongAdapter.java
@@ -0,0 +1,80 @@
+/* WrongAdapter.java --
+ Copyright (C) 2005, 2006 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.PortableServer.POAPackage;
+
+import org.omg.CORBA.UserException;
+import org.omg.CORBA.portable.IDLEntity;
+
+import java.io.Serializable;
+
+/**
+ * Raised when invoking POA operations, requiring that the target
+ * object would be created by this POA, if this condition is not
+ * satisfied.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public final class WrongAdapter
+ extends UserException
+ implements IDLEntity, Serializable
+{
+ /**
+ * Use serialVersionUID (v1.4) for interoperability.
+ */
+ private static final long serialVersionUID = 7505320179916389200L;
+
+ /**
+ * Create WrongAdapter with no explaining
+ * message.
+ */
+ public WrongAdapter()
+ {
+ }
+
+ /**
+ * Create the WrongAdapter with explaining
+ * message.
+ *
+ * @param why a string, explaining, why this exception has been thrown.
+ */
+ public WrongAdapter(String why)
+ {
+ super(why);
+ }
+}
diff --git a/libjava/classpath/org/omg/PortableServer/POAPackage/WrongAdapterHelper.java b/libjava/classpath/org/omg/PortableServer/POAPackage/WrongAdapterHelper.java
new file mode 100644
index 000000000..69ffda747
--- /dev/null
+++ b/libjava/classpath/org/omg/PortableServer/POAPackage/WrongAdapterHelper.java
@@ -0,0 +1,151 @@
+/* WrongAdapterHelper.java --
+ Copyright (C) 2005, 2006 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.PortableServer.POAPackage;
+
+import gnu.CORBA.EmptyExceptionHolder;
+import gnu.CORBA.Minor;
+import gnu.CORBA.OrbRestricted;
+
+import org.omg.CORBA.Any;
+import org.omg.CORBA.BAD_OPERATION;
+import org.omg.CORBA.ORB;
+import org.omg.CORBA.StructMember;
+import org.omg.CORBA.TypeCode;
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+
+/**
+ * The helper operations for the exception {@link WrongAdapter}.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public abstract class WrongAdapterHelper
+{
+ /**
+ * The cached typecode value, computed only once.
+ */
+ private static TypeCode typeCode;
+
+ /**
+ * Create the WrongAdapter typecode (empty structure,
+ * named "WrongAdapter").
+ */
+ public static TypeCode type()
+ {
+ if (typeCode == null)
+ {
+ ORB orb = OrbRestricted.Singleton;
+ StructMember[] members = new StructMember[ 0 ];
+ typeCode = orb.create_exception_tc(id(), "WrongAdapter", members);
+ }
+ return typeCode;
+ }
+
+ /* Every user exception with no user defined
+ fields can use EmptyExceptionHolder */
+
+ /**
+ * Insert the WrongAdapter into the given Any.
+ *
+ * @param any the Any to insert into.
+ * @param that the WrongAdapter to insert.
+ */
+ public static void insert(Any any, WrongAdapter that)
+ {
+ any.insert_Streamable(new EmptyExceptionHolder(that, type()));
+ }
+
+ /**
+ * Extract the WrongAdapter from given Any.
+ *
+ * @throws BAD_OPERATION if the passed Any does not contain WrongAdapter.
+ */
+ public static WrongAdapter extract(Any any)
+ {
+ try
+ {
+ EmptyExceptionHolder h =
+ (EmptyExceptionHolder) any.extract_Streamable();
+ return (WrongAdapter) h.value;
+ }
+ catch (ClassCastException cex)
+ {
+ BAD_OPERATION bad = new BAD_OPERATION("WrongAdapter expected");
+ bad.minor = Minor.Any;
+ bad.initCause(cex);
+ throw bad;
+ }
+ }
+
+ /**
+ * Get the WrongAdapter repository id.
+ *
+ * @return "IDL:omg.org/PortableServer/POA/WrongAdapter:1.0", always.
+ */
+ public static String id()
+ {
+ return "IDL:omg.org/PortableServer/POA/WrongAdapter:1.0";
+ }
+
+ /**
+ * Read the exception from the CDR intput stream.
+ *
+ * @param input a org.omg.CORBA.portable stream to read from.
+ */
+ public static WrongAdapter read(InputStream input)
+ {
+ // Read the exception repository id.
+ String id = input.read_string();
+ WrongAdapter value = new WrongAdapter(id);
+
+ return value;
+ }
+
+ /**
+ * Write the exception to the CDR output stream.
+ *
+ * @param output a org.omg.CORBA.portable stream stream to write into.
+ * @param value a value to write.
+ */
+ public static void write(OutputStream output, WrongAdapter value)
+ {
+ // Write the exception repository id.
+ output.write_string(id());
+ }
+}
diff --git a/libjava/classpath/org/omg/PortableServer/POAPackage/WrongPolicy.java b/libjava/classpath/org/omg/PortableServer/POAPackage/WrongPolicy.java
new file mode 100644
index 000000000..e0dbc9902
--- /dev/null
+++ b/libjava/classpath/org/omg/PortableServer/POAPackage/WrongPolicy.java
@@ -0,0 +1,79 @@
+/* WrongPolicy.java --
+ Copyright (C) 2005, 2006 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.PortableServer.POAPackage;
+
+import org.omg.CORBA.UserException;
+import org.omg.CORBA.portable.IDLEntity;
+
+import java.io.Serializable;
+
+/**
+ * Raised when invoking the operation that is not allowed by the current
+ * combination of the used policies.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public final class WrongPolicy
+ extends UserException
+ implements IDLEntity, Serializable
+{
+ /**
+ * Use serialVersionUID (v1.4) for interoperability.
+ */
+ private static final long serialVersionUID = 1949765652955335195L;
+
+ /**
+ * Create WrongPolicy with no explaining
+ * message.
+ */
+ public WrongPolicy()
+ {
+ }
+
+ /**
+ * Create the WrongPolicy with explaining
+ * message.
+ *
+ * @param why a string, explaining, why this exception has been thrown.
+ */
+ public WrongPolicy(String why)
+ {
+ super(why);
+ }
+}
diff --git a/libjava/classpath/org/omg/PortableServer/POAPackage/WrongPolicyHelper.java b/libjava/classpath/org/omg/PortableServer/POAPackage/WrongPolicyHelper.java
new file mode 100644
index 000000000..9122b06e4
--- /dev/null
+++ b/libjava/classpath/org/omg/PortableServer/POAPackage/WrongPolicyHelper.java
@@ -0,0 +1,151 @@
+/* WrongPolicyHelper.java --
+ Copyright (C) 2005, 2006 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.PortableServer.POAPackage;
+
+import gnu.CORBA.EmptyExceptionHolder;
+import gnu.CORBA.Minor;
+import gnu.CORBA.OrbRestricted;
+
+import org.omg.CORBA.Any;
+import org.omg.CORBA.BAD_OPERATION;
+import org.omg.CORBA.ORB;
+import org.omg.CORBA.StructMember;
+import org.omg.CORBA.TypeCode;
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+
+/**
+ * The helper operations for the exception {@link WrongPolicy}.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public abstract class WrongPolicyHelper
+{
+ /**
+ * The cached typecode value, computed only once.
+ */
+ private static TypeCode typeCode;
+
+ /**
+ * Create the WrongPolicy typecode (empty structure,
+ * named "WrongPolicy").
+ */
+ public static TypeCode type()
+ {
+ if (typeCode == null)
+ {
+ ORB orb = OrbRestricted.Singleton;
+ StructMember[] members = new StructMember[ 0 ];
+ typeCode = orb.create_exception_tc(id(), "WrongPolicy", members);
+ }
+ return typeCode;
+ }
+
+ /* Every user exception with no user defined
+ fields can use EmptyExceptionHolder */
+
+ /**
+ * Insert the WrongPolicy into the given Any.
+ *
+ * @param any the Any to insert into.
+ * @param that the WrongPolicy to insert.
+ */
+ public static void insert(Any any, WrongPolicy that)
+ {
+ any.insert_Streamable(new EmptyExceptionHolder(that, type()));
+ }
+
+ /**
+ * Extract the WrongPolicy from given Any.
+ *
+ * @throws BAD_OPERATION if the passed Any does not contain WrongPolicy.
+ */
+ public static WrongPolicy extract(Any any)
+ {
+ try
+ {
+ EmptyExceptionHolder h =
+ (EmptyExceptionHolder) any.extract_Streamable();
+ return (WrongPolicy) h.value;
+ }
+ catch (ClassCastException cex)
+ {
+ BAD_OPERATION bad = new BAD_OPERATION("WrongPolicy expected");
+ bad.minor = Minor.Any;
+ bad.initCause(cex);
+ throw bad;
+ }
+ }
+
+ /**
+ * Get the WrongPolicy repository id.
+ *
+ * @return "IDL:omg.org/PortableServer/POA/WrongPolicy:1.0", always.
+ */
+ public static String id()
+ {
+ return "IDL:omg.org/PortableServer/POA/WrongPolicy:1.0";
+ }
+
+ /**
+ * Read the exception from the CDR intput stream.
+ *
+ * @param input a org.omg.CORBA.portable stream to read from.
+ */
+ public static WrongPolicy read(InputStream input)
+ {
+ // Read the exception repository id.
+ String id = input.read_string();
+ WrongPolicy value = new WrongPolicy(id);
+
+ return value;
+ }
+
+ /**
+ * Write the exception to the CDR output stream.
+ *
+ * @param output a org.omg.CORBA.portable stream stream to write into.
+ * @param value a value to write.
+ */
+ public static void write(OutputStream output, WrongPolicy value)
+ {
+ // Write the exception repository id.
+ output.write_string(id());
+ }
+}
diff --git a/libjava/classpath/org/omg/PortableServer/POAPackage/package.html b/libjava/classpath/org/omg/PortableServer/POAPackage/package.html
new file mode 100644
index 000000000..e95dd68ec
--- /dev/null
+++ b/libjava/classpath/org/omg/PortableServer/POAPackage/package.html
@@ -0,0 +1,49 @@
+
+
+
+
+
+*
+*
+* @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+*/
+public class RequestProcessingPolicyValue
+ implements Serializable, IDLEntity
+{
+ /**
+ * Use serialVersionUID (V1.4) for interoperability.
+ */
+ private static final long serialVersionUID = 7646563512329907695L;
+
+ /**
+ * The value field for the current instance.
+ */
+ private final int _value;
+
+ /**
+ * The possible value of this enumeration (USE_ACTIVE_OBJECT_MAP_ONLY).
+ */
+ public static final int _USE_ACTIVE_OBJECT_MAP_ONLY = 0;
+
+ /**
+ * An instance of RequestProcessingPolicyValue, initialized to USE_ACTIVE_OBJECT_MAP_ONLY.
+ */
+ public static final RequestProcessingPolicyValue USE_ACTIVE_OBJECT_MAP_ONLY =
+ new RequestProcessingPolicyValue(_USE_ACTIVE_OBJECT_MAP_ONLY);
+
+ /**
+ * The possible value of this enumeration (USE_DEFAULT_SERVANT).
+ */
+ public static final int _USE_DEFAULT_SERVANT = 1;
+
+ /**
+ * An instance of RequestProcessingPolicyValue, initialized to USE_DEFAULT_SERVANT.
+ */
+ public static final RequestProcessingPolicyValue USE_DEFAULT_SERVANT =
+ new RequestProcessingPolicyValue(_USE_DEFAULT_SERVANT);
+
+ /**
+ * The possible value of this enumeration (USE_SERVANT_MANAGER).
+ */
+ public static final int _USE_SERVANT_MANAGER = 2;
+
+ /**
+ * An instance of RequestProcessingPolicyValue, initialized to USE_SERVANT_MANAGER.
+ */
+ public static final RequestProcessingPolicyValue USE_SERVANT_MANAGER =
+ new RequestProcessingPolicyValue(_USE_SERVANT_MANAGER);
+
+ /**
+ * The private array that maps integer codes to the enumeration
+ * values.
+ */
+ private static final RequestProcessingPolicyValue[] enume =
+ new RequestProcessingPolicyValue[]
+ {
+ USE_ACTIVE_OBJECT_MAP_ONLY, USE_DEFAULT_SERVANT, USE_SERVANT_MANAGER
+ };
+
+ /**
+ * The private array of state names.
+ */
+ private static final String[] state_names =
+ new String[]
+ {
+ "USE_ACTIVE_OBJECT_MAP_ONLY", "USE_DEFAULT_SERVANT", "USE_SERVANT_MANAGER"
+ };
+
+ /**
+ * Normally, no new instances are required, so the constructor is protected.
+ */
+ protected RequestProcessingPolicyValue(int a_value)
+ {
+ _value = a_value;
+ }
+
+ /**
+ * Returns the RequestProcessingPolicyValue, matching the given integer constant.
+ *
+ * @param code one of _USE_ACTIVE_OBJECT_MAP_ONLY, _USE_DEFAULT_SERVANT, _USE_SERVANT_MANAGER.
+ * @return one of USE_ACTIVE_OBJECT_MAP_ONLY, USE_DEFAULT_SERVANT, USE_SERVANT_MANAGER.
+ * @throws BAD_PARAM if the parameter is not one of the valid values.
+ */
+ public static RequestProcessingPolicyValue from_int(int code)
+ {
+ try
+ {
+ return enume [ code ];
+ }
+ catch (ArrayIndexOutOfBoundsException ex)
+ {
+ BAD_OPERATION bad = new BAD_OPERATION("Invalid policy code " + code);
+ bad.minor = Minor.PolicyType;
+ throw bad;
+ }
+ }
+
+ /**
+ * Returns a short string representation.
+ * @return the name of the current enumeration value.
+ */
+ public String toString()
+ {
+ return state_names [ _value ];
+ }
+
+ /**
+ * Returns the integer code of the policy value.
+ * @return one of _USE_ACTIVE_OBJECT_MAP_ONLY,
+ * _USE_DEFAULT_SERVANT, _USE_SERVANT_MANAGER.
+ */
+ public int value()
+ {
+ return _value;
+ }
+}
diff --git a/libjava/classpath/org/omg/PortableServer/SERVANT_RETENTION_POLICY_ID.java b/libjava/classpath/org/omg/PortableServer/SERVANT_RETENTION_POLICY_ID.java
new file mode 100644
index 000000000..89813b921
--- /dev/null
+++ b/libjava/classpath/org/omg/PortableServer/SERVANT_RETENTION_POLICY_ID.java
@@ -0,0 +1,52 @@
+/* SERVANT_RETENTION_POLICY_ID.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.PortableServer;
+
+ /**
+ * Holds an integer {@link ServantRetentionPolicy} identifier.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public interface SERVANT_RETENTION_POLICY_ID
+{
+ /**
+ * Specifies the SERVANT_RETENTION_POLICY_ID value, 21.
+ */
+ int value = 21;
+}
diff --git a/libjava/classpath/org/omg/PortableServer/Servant.java b/libjava/classpath/org/omg/PortableServer/Servant.java
new file mode 100644
index 000000000..53b05f1e5
--- /dev/null
+++ b/libjava/classpath/org/omg/PortableServer/Servant.java
@@ -0,0 +1,296 @@
+/* Servant.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.PortableServer;
+
+import org.omg.CORBA.BAD_OPERATION;
+import org.omg.CORBA.BAD_INV_ORDER;
+import org.omg.CORBA.NO_IMPLEMENT;
+import org.omg.CORBA.OBJECT_NOT_EXIST;
+import org.omg.CORBA.ORB;
+import org.omg.PortableServer.POAPackage.ServantNotActive;
+import org.omg.PortableServer.POAPackage.WrongPolicy;
+import org.omg.PortableServer.portable.Delegate;
+
+import gnu.CORBA.Minor;
+import gnu.CORBA.Poa.ORB_1_4;
+import gnu.CORBA.Poa.gnuPOA;
+
+/**
+ * native
type.
+ * InterfaceDef
for this
+ * Object. By default, forwards request to the delegate.
+ *
+ * @specnote The interface repository is officially not implemented up till
+ * JDK 1.5 inclusive. The delegate throws NO_IMPLEMENT, always.
+ */
+ public org.omg.CORBA.Object _get_interface_def()
+ {
+ throw new NO_IMPLEMENT();
+ }
+
+ /**
+ * Checks if the passed servant is an instance of the given CORBA IDL type.
+ * By default, forwards the requet to the delegate.
+ *
+ * @param repository_id a repository ID, representing an IDL type for that the
+ * servant must be checked.
+ *
+ * @return true if the servant is an instance of the given type, false
+ * otherwise.
+ */
+ public boolean _is_a(String repository_id)
+ {
+ return delegate.is_a(this, repository_id);
+ }
+
+ /**
+ * Determines if the server object for this reference has already
+ * been destroyed. By default, forwards request to the delegate.
+ *
+ * @return true if the object has been destroyed, false otherwise.
+ */
+ public boolean _non_existent()
+ {
+ return delegate.non_existent(this);
+ }
+
+ /**
+ * Returns the ORB that is directly associated with the given servant.
+ * In this implementation, the method is overridden to return
+ */
+ public final ORB _orb()
+ {
+ return delegate.orb(this);
+ }
+
+ /**
+ * Returns the root POA of the ORB instance, associated with this servant.
+ * It is the same POA that would be returned by resolving the initial
+ * reference "RootPOA" for that orb. By default, forwards request to the
+ * delegate.
+ *
+ * @see ORB#resolve_initial_references
+ */
+ public POA _default_POA()
+ {
+ return delegate == null ? null : delegate.default_POA(this);
+ }
+
+ /**
+ * Return the invocation target object identifier as a byte array.
+ * This is typically used when the same servant serves multiple objects,
+ * and the object id can encapsulated the whole description of the
+ * object.
+ *
+ * This method returns correct values even when the same
+ * servant serves several objects in parallel threads. The ORB maintains the
+ * thread to invocation data map for all calls that are currently being
+ * processed.
+ */
+ public final byte[] _object_id()
+ {
+ if (delegate != null)
+ return delegate.object_id(this);
+ else
+ throw new OBJECT_NOT_EXIST();
+ }
+
+ /**
+ * Get POA that is directly associated with the given servant.
+ * By default, forwards request to the delegate.
+ */
+ public final POA _poa()
+ {
+ return delegate.poa(this);
+ }
+
+ /**
+ * Set the delegate for this servant.
+ */
+ public final void _set_delegate(Delegate a_delegate)
+ {
+ delegate = a_delegate;
+ }
+
+ /**
+ * Obtains the CORBA object reference that is a current invocation target for
+ * the given servant. This is important when the same servant serves
+ * multiple objects. If the servant is not yet connected to the passed
+ * orb, the method will try to connect it to that orb on POA, returned
+ * by the method {@link #_default_POA}. That method can be overridden to
+ * get poa where the object must be automatically connected when
+ * calling this method.
+ *
+ * @param an_orb the ORB with relate to that the object is requested.
+ */
+ public final org.omg.CORBA.Object _this_object(ORB an_orb)
+ {
+ if (delegate != null)
+ return delegate.this_object(this);
+ else
+ {
+ if (an_orb instanceof ORB_1_4)
+ {
+ ORB_1_4 m_orb = (ORB_1_4) an_orb;
+
+ gnuPOA dp = (gnuPOA) _default_POA();
+ if (dp == null)
+ dp = m_orb.rootPOA;
+
+ try
+ {
+ return dp.servant_to_reference(this);
+ }
+ catch (WrongPolicy unexp)
+ {
+ BAD_OPERATION bad = new BAD_OPERATION();
+ bad.minor = Minor.Policy;
+ bad.initCause(unexp);
+ throw bad;
+ }
+ catch (ServantNotActive ex)
+ {
+ try
+ {
+ return dp.id_to_reference(dp.activate_object(this));
+ }
+ catch (Exception unexp)
+ {
+ unexp.initCause(ex);
+
+ BAD_OPERATION bad = new BAD_OPERATION();
+ bad.minor = Minor.Activation;
+ bad.initCause(unexp);
+ throw bad;
+ }
+ }
+ }
+ }
+ throw new OBJECT_NOT_EXIST();
+ }
+
+ /**
+ * Obtains the CORBA object reference that is a current invocation target for
+ * the given servant. This is important when the same servant serves
+ * multiple objects. This method required the servant to be connected
+ * to a single orb, and a delegate set.
+ *
+ * This method returns correct values even when the same
+ * servant serves several objects in parallel threads. The ORB maintains the
+ * thread to invocation data map for all calls that are currently being
+ * processed.
+ */
+ public final org.omg.CORBA.Object _this_object()
+ {
+ if (delegate != null)
+ return _this_object(_orb());
+ else
+ {
+ POA def = _default_POA();
+ if (def instanceof gnuPOA)
+ return _this_object(((gnuPOA) def).orb());
+ }
+ throw new OBJECT_NOT_EXIST();
+ }
+}
diff --git a/libjava/classpath/org/omg/PortableServer/ServantActivator.java b/libjava/classpath/org/omg/PortableServer/ServantActivator.java
new file mode 100644
index 000000000..82cfbda0d
--- /dev/null
+++ b/libjava/classpath/org/omg/PortableServer/ServantActivator.java
@@ -0,0 +1,59 @@
+/* ServantActivator.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.PortableServer;
+
+import org.omg.CORBA.portable.IDLEntity;
+
+/**
+ * The POA, that has the RETAIN policy uses servant managers that are
+ * ServantActivators. The operations, that must be supported by these
+ * managers, are defined separately in {@link ServantActivatorOperations}.
+ *
+ * @see ServantLocator
+ * @see ServantRetentionPolicyValue
+ * @see ServantManager
+ * @see POAOperations#set_servant_manager
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public interface ServantActivator
+ extends ServantManager, ServantActivatorOperations, IDLEntity,
+ org.omg.CORBA.Object
+{
+}
diff --git a/libjava/classpath/org/omg/PortableServer/ServantActivatorHelper.java b/libjava/classpath/org/omg/PortableServer/ServantActivatorHelper.java
new file mode 100644
index 000000000..d0fe8732c
--- /dev/null
+++ b/libjava/classpath/org/omg/PortableServer/ServantActivatorHelper.java
@@ -0,0 +1,170 @@
+/* ServantActivatorHelper.java --
+ Copyright (C) 2005, 2006 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.PortableServer;
+
+import gnu.CORBA.Minor;
+import gnu.CORBA.OrbRestricted;
+
+import org.omg.CORBA.Any;
+import org.omg.CORBA.BAD_OPERATION;
+import org.omg.CORBA.BAD_PARAM;
+import org.omg.CORBA.MARSHAL;
+import org.omg.CORBA.TypeCode;
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+
+/**
+* The helper operations for the CORBA object {@link ServantActivator}.
+*
+* @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+*/
+public abstract class ServantActivatorHelper
+{
+ /**
+ * Get the type code of the {@link ServantActivator}.
+ */
+ public static TypeCode type()
+ {
+ return OrbRestricted.Singleton.create_interface_tc(id(), "ServantActivator");
+ }
+
+ /**
+ * Insert the ServantActivator into the given Any.
+ *
+ * @param any the Any to insert into.
+ * @param that the ServantActivator to insert.
+ */
+ public static void insert(Any any, ServantActivator that)
+ {
+ any.insert_Object(that);
+ }
+
+ /**
+ * Extract the ServantActivator from given Any.
+ *
+ * @throws BAD_OPERATION if the passed Any does not contain ServantActivator.
+ */
+ public static ServantActivator extract(Any any)
+ {
+ return narrow(any.extract_Object());
+ }
+
+ /**
+ * Get the ServantActivator repository id.
+ *
+ * @return "IDL:omg.org/PortableServer/ServantActivator:2.3", always.
+ */
+ public static String id()
+ {
+ return "IDL:omg.org/PortableServer/ServantActivator:2.3";
+ }
+
+ /**
+ * Casts the passed object into the ServantActivator.
+ *
+ * @param obj the object to cast.
+ * @return casted instance.
+ * @throws BAD_PARAM if the passed object is not a ServantActivator.
+ */
+ public static ServantActivator narrow(org.omg.CORBA.Object obj)
+ {
+ try
+ {
+ return (ServantActivator) obj;
+ }
+ catch (ClassCastException ex)
+ {
+ BAD_PARAM bad = new BAD_PARAM();
+ bad.initCause(ex);
+ throw bad;
+ }
+ }
+
+ /**
+ * Narrow the given object to the ServantActivator. For the objects that are
+ * always local, this operation does not differ from the ordinary
+ * {@link #narrow} (ClassCastException will be thrown if narrowing something
+ * different). See OMG issue 4158.
+ *
+ * @param obj the object to cast.
+ *
+ * @return the casted ServantActivator.
+ *
+ * @since 1.5
+ */
+ public static ServantActivator unchecked_narrow(org.omg.CORBA.Object obj)
+ {
+ return narrow(obj);
+ }
+
+
+ /**
+ * This should read the servant activator, but it cannot be transferred
+ * this way as its operations cannot be remote. The operations cannot
+ * be remote because one of the method parameters, POA, is required to be
+ * always a local object (both by 1.5 API and 3.0.3 OMG).
+ *
+ * @throws MARSHAL, always.
+ *
+ * @specnote Same as Sun.
+ */
+ public static ServantActivator read(InputStream input)
+ {
+ MARSHAL m = new MARSHAL("Inappropriate");
+ m.minor = Minor.Inappropriate;
+ throw m;
+ }
+
+ /**
+ * This should write the servant activator, but it cannot be transferred
+ * this way as its operations cannot be remote. The operations cannot
+ * be remote because one of the method parameters, POA, is required to be
+ * always a local object (both by 1.5 API and 3.0.3 OMG).
+ *
+ * @throws MARSHAL, always.
+ *
+ * @specnote Same as Sun.
+ */
+ public static void write(OutputStream output, ServantActivator value)
+ {
+ MARSHAL m = new MARSHAL("Inappropriate");
+ m.minor = Minor.Inappropriate;
+ throw m;
+ }
+}
diff --git a/libjava/classpath/org/omg/PortableServer/ServantActivatorOperations.java b/libjava/classpath/org/omg/PortableServer/ServantActivatorOperations.java
new file mode 100644
index 000000000..22fba9d9e
--- /dev/null
+++ b/libjava/classpath/org/omg/PortableServer/ServantActivatorOperations.java
@@ -0,0 +1,94 @@
+/* ServantActivatorOperations.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.PortableServer;
+
+
+/**
+ * Defines the operations, applicable to the {@link ServantActivator}.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public interface ServantActivatorOperations
+ extends ServantManagerOperations
+{
+ /**
+ * This method is invoked whenever a servant for an object is deactivated,
+ * assuming the POA has the USE_SERVANT_MANAGER and RETAIN policies.
+ *
+ * @param Object_Id the Id of the object being deactivated.
+ *
+ * @param poa the POA in those scope the object was active.
+ *
+ * @param servant the servant, serving the object being deactivated.
+ *
+ * @param cleanup_in_progress if true, this method was called from due
+ * deactivation or destruction operation. False indicates that the method
+ * was called due other reasons.
+ *
+ * @param remaining_activations if true, at the invocation moment the
+ * passed servant is also associated with other objects in the active
+ * object map of the given POA.
+ */
+ void etherealize(byte[] Object_Id, POA poa, Servant servant,
+ boolean cleanup_in_progress, boolean remaining_activations
+ );
+
+ /**
+ * This method is invoked whenever the POA receives a request for an
+ * object that is not currently active, assuming the POA has the
+ * USE_SERVANT_MANAGER and RETAIN policies. The user-supplied servant
+ * manager is responsible for locating or creating an appropriate servant
+ * that corresponds to the ObjectId value. The subsequent requests with
+ * the same ObjectId value will be delivered directly to that servant
+ * without invoking the servant manager.
+ *
+ * @param Object_Id the ObjectId value associated with the incoming request.
+ * @param poa the POA in which the object is being activated.
+ *
+ * @return a servant that will be used to process the incoming request.
+ *
+ * @throws ForwardRequest if the activator decides to forward the request
+ * to another object. The exception contains the object that should
+ * handle this request. This object is usually remote, but can also
+ * be local. The throws exception will forward all subsequent requests
+ * till the new activation.
+ */
+ Servant incarnate(byte[] Object_Id, POA poa)
+ throws ForwardRequest;
+}
diff --git a/libjava/classpath/org/omg/PortableServer/ServantActivatorPOA.java b/libjava/classpath/org/omg/PortableServer/ServantActivatorPOA.java
new file mode 100644
index 000000000..a6460fa14
--- /dev/null
+++ b/libjava/classpath/org/omg/PortableServer/ServantActivatorPOA.java
@@ -0,0 +1,137 @@
+/* ServantActivatorPOA.java --
+ Copyright (C) 2005, 2006 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.PortableServer;
+
+import gnu.CORBA.Poa.gnuServantObject;
+
+import org.omg.CORBA.NO_IMPLEMENT;
+import org.omg.CORBA.ORB;
+import org.omg.CORBA.SystemException;
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.InvokeHandler;
+import org.omg.CORBA.portable.OutputStream;
+import org.omg.CORBA.portable.ResponseHandler;
+
+/**
+ * cookie
parameter for {@link #postinvoke}, to create tie
+ * between preinvoke and postinvoke. The application should not
+ * suppose that each call of preinvoke is followed by the subsequent
+ * postinvoke for the same invocation; under multi threaded policy these
+ * calls may be intermixed.
+ *
+ * @return a servant that will serve the incoming request.
+ *
+ * @throws ForwardRequest if the locator decides to forward the request
+ * to another object. The exception contains the object that should
+ * handle this request. This object is usually remote, but can also
+ * be local. As preinvoke
is called on each method
+ * invocation, the thrown exception will forward only this current request.
+ */
+ Servant preinvoke(byte[] Object_Id, POA poa, String operation,
+ CookieHolder cookie_holder
+ )
+ throws ForwardRequest;
+
+ /**
+ * If the POA has the USE_SERVANT_MANAGER and NON_RETAIN policies, it
+ * invokes this method whenever a servant completes a request.
+ *
+ * @param Object_Id the id of the object, on which the request was called.
+ * @param poa the POA in those scope the object is active.
+ * @param operation the name of the method or operation that was invoked.
+ * @param cookie the object that has been previously set by preinvoke in
+ * the cookie_holder
parameter.
+ * @param servant the servant, associated with the object.
+ */
+ void postinvoke(byte[] Object_Id, POA poa, String operation,
+ java.lang.Object cookie, Servant servant
+ );
+}
diff --git a/libjava/classpath/org/omg/PortableServer/ServantLocatorPOA.java b/libjava/classpath/org/omg/PortableServer/ServantLocatorPOA.java
new file mode 100644
index 000000000..c598aa8bd
--- /dev/null
+++ b/libjava/classpath/org/omg/PortableServer/ServantLocatorPOA.java
@@ -0,0 +1,146 @@
+/* ServantLocatorPOA.java --
+ Copyright (C) 2005, 2006 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.PortableServer;
+
+import gnu.CORBA.Poa.gnuServantObject;
+
+import org.omg.CORBA.NO_IMPLEMENT;
+import org.omg.CORBA.ORB;
+import org.omg.CORBA.SystemException;
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.InvokeHandler;
+import org.omg.CORBA.portable.OutputStream;
+import org.omg.CORBA.portable.ResponseHandler;
+import org.omg.PortableServer.ServantLocatorPackage.CookieHolder;
+
+/**
+ *
+*
+* @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+*/
+public class ServantRetentionPolicyValue
+ implements Serializable, IDLEntity
+{
+ /**
+ * Use serialVersionUID (V1.4) for interoperability.
+ */
+ private static final long serialVersionUID = -7476100336036943822L;
+
+ /**
+ * The value field for the current instance.
+ */
+ private final int _value;
+
+ /**
+ * The possible value of this enumeration (RETAIN).
+ */
+ public static final int _RETAIN = 0;
+
+ /**
+ * An instance of ServantRetentionPolicyValue, indicating that
+ * the POA retains active servants in its Active Object Map.
+ */
+ public static final ServantRetentionPolicyValue RETAIN =
+ new ServantRetentionPolicyValue(_RETAIN);
+
+ /**
+ * The possible value of this enumeration (NON_RETAIN).
+ */
+ public static final int _NON_RETAIN = 1;
+
+ /**
+ * An instance of ServantRetentionPolicyValue, indicating that
+ * the POA does not use the Active Object Map.
+ */
+ public static final ServantRetentionPolicyValue NON_RETAIN =
+ new ServantRetentionPolicyValue(_NON_RETAIN);
+
+ /**
+ * The private array that maps integer codes to the enumeration
+ * values.
+ */
+ private static final ServantRetentionPolicyValue[] enume =
+ new ServantRetentionPolicyValue[] { RETAIN, NON_RETAIN };
+
+ /**
+ * The private array of state names.
+ */
+ private static final String[] state_names =
+ new String[] { "RETAIN", "NON_RETAIN" };
+
+ /**
+ * Normally, no new instances are required, so the constructor is protected.
+ */
+ protected ServantRetentionPolicyValue(int a_value)
+ {
+ _value = a_value;
+ }
+
+ /**
+ * Returns the ServantRetentionPolicyValue, matching the given integer constant.
+ *
+ * @param code one of _RETAIN, _NON_RETAIN.
+ * @return one of RETAIN, NON_RETAIN.
+ * @throws BAD_PARAM if the parameter is not one of the valid values.
+ */
+ public static ServantRetentionPolicyValue from_int(int code)
+ {
+ try
+ {
+ return enume [ code ];
+ }
+ catch (ArrayIndexOutOfBoundsException ex)
+ {
+ BAD_OPERATION bad = new BAD_OPERATION("Invalid policy code " + code);
+ bad.minor = Minor.PolicyType;
+ throw bad;
+ }
+ }
+
+ /**
+ * Returns a short string representation.
+ * @return the name of the current enumeration value.
+ */
+ public String toString()
+ {
+ return state_names [ _value ];
+ }
+
+ /**
+ * Returns the integer code of the policy value.
+ * @return _RETAIN or _NON_RETAIN.
+ */
+ public int value()
+ {
+ return _value;
+ }
+}
diff --git a/libjava/classpath/org/omg/PortableServer/THREAD_POLICY_ID.java b/libjava/classpath/org/omg/PortableServer/THREAD_POLICY_ID.java
new file mode 100644
index 000000000..ef0427dde
--- /dev/null
+++ b/libjava/classpath/org/omg/PortableServer/THREAD_POLICY_ID.java
@@ -0,0 +1,52 @@
+/* THREAD_POLICY_ID.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.PortableServer;
+
+ /**
+ * Holds an integer {@link ThreadPolicy} identifier.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public interface THREAD_POLICY_ID
+{
+ /**
+ * Specifies the THREAD_POLICY_ID value, 16.
+ */
+ int value = 16;
+}
diff --git a/libjava/classpath/org/omg/PortableServer/ThreadPolicy.java b/libjava/classpath/org/omg/PortableServer/ThreadPolicy.java
new file mode 100644
index 000000000..77fe0a67c
--- /dev/null
+++ b/libjava/classpath/org/omg/PortableServer/ThreadPolicy.java
@@ -0,0 +1,57 @@
+/* ThreadPolicy.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.PortableServer;
+
+import org.omg.CORBA.Policy;
+import org.omg.CORBA.portable.IDLEntity;
+
+/**
+ * Defines the POA thread policy.
+ *
+ * The policy can return its current value, as defined.
+ * in {@link ThreadPolicyOperations}.
+ *
+ * @see ThreadPolicyValue for the possible values of this policy.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public interface ThreadPolicy
+ extends Policy, ThreadPolicyOperations, IDLEntity
+{
+}
diff --git a/libjava/classpath/org/omg/PortableServer/ThreadPolicyOperations.java b/libjava/classpath/org/omg/PortableServer/ThreadPolicyOperations.java
new file mode 100644
index 000000000..09835614f
--- /dev/null
+++ b/libjava/classpath/org/omg/PortableServer/ThreadPolicyOperations.java
@@ -0,0 +1,55 @@
+/* ThreadPolicyOperations.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.PortableServer;
+
+import org.omg.CORBA.PolicyOperations;
+
+/**
+ * Defines the operations, applicable to the ThreadPolicy.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public interface ThreadPolicyOperations
+ extends PolicyOperations
+{
+ /**
+ * Return the value of this policy type, stated by the current instance.
+ */
+ ThreadPolicyValue value();
+}
diff --git a/libjava/classpath/org/omg/PortableServer/ThreadPolicyValue.java b/libjava/classpath/org/omg/PortableServer/ThreadPolicyValue.java
new file mode 100644
index 000000000..4e1422dcd
--- /dev/null
+++ b/libjava/classpath/org/omg/PortableServer/ThreadPolicyValue.java
@@ -0,0 +1,168 @@
+/* ThreadPolicyValue.java --
+ Copyright (C) 2005, 2006 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.PortableServer;
+
+import gnu.CORBA.Minor;
+
+import org.omg.CORBA.BAD_OPERATION;
+import org.omg.CORBA.BAD_PARAM;
+import org.omg.CORBA.portable.IDLEntity;
+
+import java.io.Serializable;
+
+/**
+ * Defines the possible values for the POA thread policy.
+ *
+ * This enumeration can obtain the following values:
+ *
+ *
+ * OMG also defines a MAIN_THREAD_MODEL, currently not supported by
+ * the java API.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public class ThreadPolicyValue
+ implements Serializable, IDLEntity
+{
+ /**
+ * Use serialVersionUID (v1.4) for interoperability.
+ */
+ private static final long serialVersionUID = -8874988828297141512L;
+
+ /**
+ * The value field for the current instance.
+ */
+ private final int _value;
+
+ /**
+ * The possible value of this enumeration (ORB_CTRL_MODEL).
+ */
+ public static final int _ORB_CTRL_MODEL = 0;
+
+ /**
+ * An instance of ThreadPolicyValue, initialized to ORB_CTRL_MODEL.
+ */
+ public static final ThreadPolicyValue ORB_CTRL_MODEL =
+ new ThreadPolicyValue(_ORB_CTRL_MODEL);
+
+ /**
+ * The possible value of this enumeration (SINGLE_THREAD_MODEL).
+ */
+ public static final int _SINGLE_THREAD_MODEL = 1;
+
+ /**
+ * An instance of ThreadPolicyValue, initialized to SINGLE_THREAD_MODEL.
+ */
+ public static final ThreadPolicyValue SINGLE_THREAD_MODEL =
+ new ThreadPolicyValue(_SINGLE_THREAD_MODEL);
+
+ /**
+ * The private array that maps integer codes to the enumeration
+ * values.
+ */
+ private static final ThreadPolicyValue[] enume =
+ new ThreadPolicyValue[] { ORB_CTRL_MODEL, SINGLE_THREAD_MODEL };
+
+ /**
+ * The private array of state names.
+ */
+ private static final String[] state_names =
+ new String[] { "ORB_CTRL_MODEL", "SINGLE_THREAD_MODEL" };
+
+ /**
+ * Normally, no new instances are required, so the constructor is protected.
+ */
+ protected ThreadPolicyValue(int a_value)
+ {
+ _value = a_value;
+ }
+
+ /**
+ * Returns the ThreadPolicyValue, matching the given integer constant.
+ *
+ * @param code one of _ORB_CTRL_MODEL, _SINGLE_THREAD_MODEL.
+ * @return one of ORB_CTRL_MODEL, SINGLE_THREAD_MODEL.
+ * @throws BAD_PARAM if the parameter is not one of the valid values.
+ */
+ public static ThreadPolicyValue from_int(int code)
+ {
+ try
+ {
+ return enume [ code ];
+ }
+ catch (ArrayIndexOutOfBoundsException ex)
+ {
+ BAD_OPERATION bad = new BAD_OPERATION("Invalid policy code " + code);
+ bad.minor = Minor.PolicyType;
+ throw bad;
+ }
+ }
+
+ /**
+ * Returns a short string representation.
+ * @return the name of the current enumeration value.
+ */
+ public String toString()
+ {
+ return state_names [ _value ];
+ }
+
+ /**
+ * Returns the integer code of the enumeration value.
+ * @return one of ORB_CTRL_MODEL, SINGLE_THREAD_MODEL.
+ */
+ public int value()
+ {
+ return _value;
+ }
+}
diff --git a/libjava/classpath/org/omg/PortableServer/_ServantActivatorStub.java b/libjava/classpath/org/omg/PortableServer/_ServantActivatorStub.java
new file mode 100644
index 000000000..658ac683c
--- /dev/null
+++ b/libjava/classpath/org/omg/PortableServer/_ServantActivatorStub.java
@@ -0,0 +1,124 @@
+/* _ServantActivatorStub.java --
+ Copyright (C) 2005, 2006 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.PortableServer;
+
+import java.io.Serializable;
+
+import org.omg.CORBA.portable.ObjectImpl;
+
+/**
+ * *POA.java
instead of the previous
+_*ImplBase.java
). This *POA
suffix does not
+mean that these servants implement or are derived from POA. They are different
+classes that can be connected to one of the POAs, by instance, using
+{@link org.omg.PortableServer.POAOperations#servant_to_reference}.
+The implementation base also inherits an *Operations interface, containing
+definitions of the application specific methods. The application programmer
+writes a descendent of the implementation base, implementing these methods
+for the application - specific functionality.
+
+
+These values are also default for the child POAs The policies are
+never inherited from the parent POA.
+
+Policy type Accepted policy
+{@link org.omg.PortableServer.IdAssignmentPolicy} SYSTEM_ID
+(Ids are created by POA)
+{@link org.omg.PortableServer.IdUniquenessPolicy} UNIQUE_ID
+ (single object (and Id) per servant)
+
+{@link org.omg.PortableServer.ImplicitActivationPolicy}
+IMPLICIT_ACTIVATION (if inactive, activate)
+{@link org.omg.PortableServer.LifespanPolicy} TRANSIENT
+(the POA objects cannot outlive POA)
+{@link org.omg.PortableServer.RequestProcessingPolicy}
+USE_ACTIVE_OBJECT_MAP_ONLY (the servant is provided during activation)
+{@link org.omg.PortableServer.ServantRetentionPolicy}
+RETAIN (retain servants for subsequent invocations)
+{@link org.omg.PortableServer.ThreadPolicy} ORB_CTRL_MODEL
+(single thread per request and single server socket per object)
+This set of policies means that each object will have a separate serving +thread, separate network socket port and usually a separate servant. It +is appropriate when the expected number of objects is not too large. +If the expected number of objects is larger than the supportable number +of threads and socket ports, the SINGLE_THREAD_MODEL +{@link org.omg.PortableServer.ThreadPolicy} is +used. Then all objects in POA with this policy are served in a single +thread, using the same server socket, connected to a single port. If the +request processing policy is additionally set to USE_DEFAULT_SERVANT, +all objects of this POA share the same (default) servant. +
+The operations, supported by POA are defined +separately in {@link org.omg.PortableServer.POAOperations}. +
+
_this(ORB)
metod for servants for getting the object reference
+that is already narrowed to the exact object type.
+preinvoke
+will be followed by the call of the postinvoke
; in
+multithreaded environment these calls are not serialized in this way. If
+the preinvoke
has to tell something this-call-specific to
+the postinvoke
, it must use the provided cookie holder.
+The preinvoke/postinoke
are also called to provide a servant
+during each local invocation on the objects, belonging to the described POA.
+
+All these scenarios must work with the current GNU Classpath release.
+
+@author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+
+
diff --git a/libjava/classpath/org/omg/PortableServer/portable/Delegate.java b/libjava/classpath/org/omg/PortableServer/portable/Delegate.java
new file mode 100644
index 000000000..32697fdfb
--- /dev/null
+++ b/libjava/classpath/org/omg/PortableServer/portable/Delegate.java
@@ -0,0 +1,112 @@
+/* DelegateOperations.java --
+ Copyright (C) 2005, 2006 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.PortableServer.portable;
+
+import org.omg.CORBA.ORB;
+import org.omg.PortableServer.POA;
+import org.omg.PortableServer.Servant;
+
+/**
+ * Each {@link Servant} has an associated delegate, where the most of the calls
+ * are forwarded. The delegate is responsible for providing the actual
+ * functionality. This class is required to supports a conceptions of
+ * the CORBA 2.3.1 Servant.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public interface Delegate
+{
+ /**
+ * Returns the root POA of the ORB instance, associated with this servant.
+ * It is the same POA that would be returned by resolving the initial
+ * reference "RootPOA" for that orb. The default {@link Servant#_default_POA()}
+ * method forwards call to the delegate can be overridden to
+ * obtain the alternative default POA.
+ *
+ * @see ORB#resolve_initial_references
+ */
+ POA default_POA(Servant a_servant);
+
+ /**
+ * Get the interface repository defintion
+ * InterfaceDef
for this Object.
+ */
+ org.omg.CORBA.Object get_interface_def(Servant a_servant);
+
+ /**
+ * Checks if the passed servant is an instance of the given CORBA IDL type.
+ *
+ * @param a_servant a servant to check.
+ * @param an_id a repository ID, representing an IDL type for that the
+ * servant must be checked.
+ *
+ * @return true if the servant is an instance of the given type, false
+ * otherwise.
+ */
+ boolean is_a(Servant a_servant, String an_id);
+
+ /**
+ * Determines if the server object for this reference has already
+ * been destroyed.
+ *
+ * @return true if the object has been destroyed, false otherwise.
+ */
+ boolean non_existent(Servant a_servant);
+
+ /**
+ * Return the invocation target object identifier as a byte array.
+ */
+ byte[] object_id(Servant a_servant);
+
+ /**
+ * Returns the ORB that is directly associated with the given servant.
+ */
+ ORB orb(Servant a_servant);
+
+ /**
+ * Get POA that is directly associated with the given servant.
+ */
+ POA poa(Servant a_servant);
+
+ /**
+ * Obtains the CORBA object reference that is an invocation target for the
+ * given servant.
+ */
+ org.omg.CORBA.Object this_object(Servant a_servant);
+}
--
cgit v1.2.3