summaryrefslogtreecommitdiff
path: root/libjava/classpath/org/omg/CORBA/portable
diff options
context:
space:
mode:
authorupstream source tree <ports@midipix.org>2015-03-15 20:14:05 -0400
committerupstream source tree <ports@midipix.org>2015-03-15 20:14:05 -0400
commit554fd8c5195424bdbcabf5de30fdc183aba391bd (patch)
tree976dc5ab7fddf506dadce60ae936f43f58787092 /libjava/classpath/org/omg/CORBA/portable
downloadcbb-gcc-4.6.4-554fd8c5195424bdbcabf5de30fdc183aba391bd.tar.bz2
cbb-gcc-4.6.4-554fd8c5195424bdbcabf5de30fdc183aba391bd.tar.xz
obtained gcc-4.6.4.tar.bz2 from upstream website;upstream
verified gcc-4.6.4.tar.bz2.sig; imported gcc-4.6.4 source tree from verified upstream tarball. downloading a git-generated archive based on the 'upstream' tag should provide you with a source tree that is binary identical to the one extracted from the above tarball. if you have obtained the source via the command 'git clone', however, do note that line-endings of files in your working directory might differ from line-endings of the respective files in the upstream repository.
Diffstat (limited to 'libjava/classpath/org/omg/CORBA/portable')
-rw-r--r--libjava/classpath/org/omg/CORBA/portable/ApplicationException.java97
-rw-r--r--libjava/classpath/org/omg/CORBA/portable/ApplicationException.jbx6
-rw-r--r--libjava/classpath/org/omg/CORBA/portable/BoxedValueHelper.java79
-rw-r--r--libjava/classpath/org/omg/CORBA/portable/CustomValue.java57
-rw-r--r--libjava/classpath/org/omg/CORBA/portable/Delegate.java436
-rw-r--r--libjava/classpath/org/omg/CORBA/portable/IDLEntity.java50
-rw-r--r--libjava/classpath/org/omg/CORBA/portable/IndirectionException.java77
-rw-r--r--libjava/classpath/org/omg/CORBA/portable/InputStream.java287
-rw-r--r--libjava/classpath/org/omg/CORBA/portable/InvokeHandler.java66
-rw-r--r--libjava/classpath/org/omg/CORBA/portable/ObjectImpl.java401
-rw-r--r--libjava/classpath/org/omg/CORBA/portable/OutputStream.java283
-rw-r--r--libjava/classpath/org/omg/CORBA/portable/RemarshalException.java59
-rw-r--r--libjava/classpath/org/omg/CORBA/portable/ResponseHandler.java58
-rw-r--r--libjava/classpath/org/omg/CORBA/portable/ServantObject.java61
-rw-r--r--libjava/classpath/org/omg/CORBA/portable/Streamable.java70
-rw-r--r--libjava/classpath/org/omg/CORBA/portable/StreamableValue.java57
-rw-r--r--libjava/classpath/org/omg/CORBA/portable/UnknownException.java76
-rw-r--r--libjava/classpath/org/omg/CORBA/portable/ValueBase.java74
-rw-r--r--libjava/classpath/org/omg/CORBA/portable/ValueFactory.java62
-rw-r--r--libjava/classpath/org/omg/CORBA/portable/package.html50
20 files changed, 2406 insertions, 0 deletions
diff --git a/libjava/classpath/org/omg/CORBA/portable/ApplicationException.java b/libjava/classpath/org/omg/CORBA/portable/ApplicationException.java
new file mode 100644
index 000000000..83a8aa8d1
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/portable/ApplicationException.java
@@ -0,0 +1,97 @@
+/* ApplicationException.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.CORBA.portable;
+
+import java.io.Serializable;
+
+/**
+ * This expection is thrown if the application throws an exception,
+ * defined as a part of its remote method definition.
+ *
+ * @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
+ */
+public class ApplicationException
+ extends Exception
+ implements Serializable
+{
+ /**
+ * Use serialVersionUID (v1.4) for interoperability.
+ */
+ private static final long serialVersionUID = -2088103024111528125L;
+
+ /**
+ * The input from where the exception parameters can be read.
+ */
+ private final org.omg.CORBA.portable.InputStream m_input;
+
+ /**
+ * The CORBA repository Id of the exception.
+ */
+ private final String m_id;
+
+ /**
+ * Creates an exception.
+ *
+ * @param id the CORBA repository Id of the exception.
+ * @param input the input from where the exception parameters can be read.
+ */
+ public ApplicationException(String id,
+ org.omg.CORBA.portable.InputStream input
+ )
+ {
+ m_id = id;
+ m_input = input;
+ }
+
+ /**
+ * Get the CORBA repository Id of the exception.
+ */
+ public String getId()
+ {
+ return m_id;
+ }
+
+ /**
+ * Get the input stream from where the exception parameters can be read.
+ */
+ public org.omg.CORBA.portable.InputStream getInputStream()
+ {
+ return m_input;
+ }
+}
diff --git a/libjava/classpath/org/omg/CORBA/portable/ApplicationException.jbx b/libjava/classpath/org/omg/CORBA/portable/ApplicationException.jbx
new file mode 100644
index 000000000..0113ff3e0
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/portable/ApplicationException.jbx
@@ -0,0 +1,6 @@
+[PropertyInfo]
+[IconNames]
+
+
+
+
diff --git a/libjava/classpath/org/omg/CORBA/portable/BoxedValueHelper.java b/libjava/classpath/org/omg/CORBA/portable/BoxedValueHelper.java
new file mode 100644
index 000000000..47c2b9106
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/portable/BoxedValueHelper.java
@@ -0,0 +1,79 @@
+/* BoxedValueHelper.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.CORBA.portable;
+
+import java.io.Serializable;
+
+/**
+ * Provides a helper operations for the boxed value type.
+ * A boxed value type is a value type with no inheritance, no methods
+ * and with a single state member. No additional properties can
+ * be defined. It is an error to box value types.
+ *
+ * The value type may have its own helper, implementing
+ * this interface.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public interface BoxedValueHelper
+{
+ /**
+ * Get the repository id of this value type.
+ *
+ * @return a repository id.
+ */
+ String get_id();
+
+ /**
+ * Read this value type from the CDR stream.
+ *
+ * @param istream is a stream to read from.
+ *
+ * @return a loaded value type.
+ */
+ Serializable read_value(InputStream istream);
+
+ /**
+ * Write this value type to the CDR stream.
+ *
+ * @param ostream a stream to write to.
+ * @param value a value to write.
+ */
+ void write_value(OutputStream ostream, Serializable value);
+}
diff --git a/libjava/classpath/org/omg/CORBA/portable/CustomValue.java b/libjava/classpath/org/omg/CORBA/portable/CustomValue.java
new file mode 100644
index 000000000..dc46e8e25
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/portable/CustomValue.java
@@ -0,0 +1,57 @@
+/* CustomValue.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.CORBA.portable;
+
+import org.omg.CORBA.CustomMarshal;
+
+/**
+ * If the value type provides the user defined methods for reading
+ * and writing its content, it must implement this interface for reading
+ * and writing the content in a user-defined default way. This is done by
+ * implementing the {@link CustomMarshal#marshal} and
+ * {@link CustomMarshal#unmarshal}. The user must provide the supporting code.
+ *
+ * @see StreamableValue for specifying the IDL compiler generated IO methods.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public interface CustomValue
+ extends ValueBase, CustomMarshal
+{
+}
diff --git a/libjava/classpath/org/omg/CORBA/portable/Delegate.java b/libjava/classpath/org/omg/CORBA/portable/Delegate.java
new file mode 100644
index 000000000..33812abe2
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/portable/Delegate.java
@@ -0,0 +1,436 @@
+/* Delegate.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.CORBA.portable;
+
+import gnu.java.lang.CPStringBuilder;
+
+import org.omg.CORBA.BAD_PARAM;
+import org.omg.CORBA.Context;
+import org.omg.CORBA.ContextList;
+import org.omg.CORBA.DomainManager;
+import org.omg.CORBA.ExceptionList;
+import org.omg.CORBA.NO_IMPLEMENT;
+import org.omg.CORBA.NVList;
+import org.omg.CORBA.NamedValue;
+import org.omg.CORBA.ORB;
+import org.omg.CORBA.Policy;
+import org.omg.CORBA.Request;
+import org.omg.CORBA.SetOverrideType;
+
+/**
+ * Specifies a vendor specific implementation of the
+ * {@link org.omg.CORBA.Object} methods. The calls to these
+ * methods are forwarded to the object delegate that can be
+ * replaced, if needed. The first parameter is the actual
+ * CORBA object to that the operation must be applied.
+ *
+ * Some methods in this class are not abstract, but no implemented,
+ * thowing the {@link NO_IMPLEMENT}. This, however, does not mean that
+ * they are not implemented in the derived classes as well.
+ *
+ * @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
+ */
+public abstract class Delegate
+{
+ /**
+ * Explains the reason of throwing the NO_IMPLEMENT.
+ */
+ private static final String WHY =
+ "Following 1.4 API, this Delegate method must not be implemented. Override.";
+
+ /**
+ * Create a request to invoke the method of this object.
+ *
+ * @param target the CORBA object, to that this operation must be applied.
+ * @param context a list of additional properties.
+ * @param operation the name of method to be invoked.
+ * @param parameters the method parameters.
+ * @param returns the container for tge method returned value.
+ *
+ * @return the created reaquest.
+ */
+ public abstract Request create_request(org.omg.CORBA.Object target,
+ Context context, String operation,
+ NVList parameters, NamedValue returns
+ );
+
+ /**
+ * Create a request to invoke the method of this object, specifying
+ * context list and the list of the expected exception.
+ *
+ * @param target the CORBA object, to that this operation must be applied.
+ * @param context a list of additional properties.
+ * @param operation the name of method to be invoked.
+ * @param parameters the method parameters.
+ * @param returns the container for tge method returned value.
+ * @param exceptions the list of the possible exceptions that the method
+ * can throw.
+ * @param ctx_list the list of the context strings that need to be
+ * resolved and send as a context instance.
+ *
+ * @return the created reaquest.
+ */
+ public abstract Request create_request(org.omg.CORBA.Object target,
+ Context context, String operation,
+ NVList parameters, NamedValue returns,
+ ExceptionList exceptions,
+ ContextList ctx_list
+ );
+
+ /**
+ * Duplicate the object reference. This does not make much sense for
+ * java platform and is just included for the sake of compliance with
+ * CORBA APIs.
+ *
+ * @param target the CORBA object, to that this operation must be applied.
+ *
+ * The method may return the object reference itself.
+ *
+ * @return as a rule, <code>this</code>.
+ */
+ public abstract org.omg.CORBA.Object duplicate(org.omg.CORBA.Object target);
+
+ /**
+ * Retrieve the domain managers for this object.
+ *
+ * @param target the CORBA object, to that this operation must be applied.
+ *
+ * @return the domain managers.
+ *
+ * @throws NO_IMPLEMENT, always (following the 1.4 specification).
+ */
+ public DomainManager[] get_domain_managers(org.omg.CORBA.Object target)
+ {
+ throw new NO_IMPLEMENT(WHY);
+ }
+
+ /**
+ *
+ * @param target the CORBA object, to that this operation must be applied.
+ *
+ * Get the <code>InterfaceDef</code> for this Object.
+ */
+ public abstract org.omg.CORBA.Object get_interface_def(org.omg.CORBA.Object target);
+
+ /**
+ * Returns the {@link Policy}, applying to this object.
+ *
+ * @param target the CORBA object, to that this operation must be applied.
+ * @param a_policy_type a type of policy to be obtained.
+ * @return a corresponding Policy object.
+ *
+ * @throws NO_IMPLEMENT, always (following the 1.4 specification).
+ */
+ public Policy get_policy(org.omg.CORBA.Object target, int a_policy_type)
+ throws BAD_PARAM
+ {
+ throw new NO_IMPLEMENT(WHY);
+ }
+
+ /**
+ * Get the hashcode this object reference. The same hashcode still
+ * does not means that the references are the same. From the other
+ * side, two different references may still refer to the same CORBA
+ * object. The returned value must not change during the object
+ * lifetime.
+ *
+ * @param target the CORBA object, to that this operation must be applied.
+ * @param maximum the maximal value to return.
+ *
+ * @return the hashcode.
+ */
+ public abstract int hash(org.omg.CORBA.Object target, int maximum);
+
+ /**
+ * Check if this object can be referenced by the given repository id.
+ *
+ * @param target the CORBA object, to that this operation must be applied.
+ * @param repositoryIdentifer the repository id.
+ *
+ * @return true if the passed parameter is a repository id of this
+ * CORBA object.
+ */
+ public abstract boolean is_a(org.omg.CORBA.Object target,
+ String repositoryIdentifer
+ );
+
+ /**
+ * Return true if the other object references are equivalent, so far as
+ * it is possible to determine this easily.
+ *
+ * @param target the CORBA object, to that this operation must be applied.
+ * @param other the other object reference.
+ *
+ * @return true if both references refer the same object, false
+ * if they probably can refer different objects.
+ *
+ */
+ public abstract boolean is_equivalent(org.omg.CORBA.Object target,
+ org.omg.CORBA.Object other
+ );
+
+ /**
+ * Returns true if the object is local.
+ *
+ * @param self the object to check.
+ *
+ * @return false, always (following 1.4 specs). Override to get
+ * functionality.
+ */
+ public boolean is_local(org.omg.CORBA.Object self)
+ {
+ return false;
+ }
+
+ /**
+ * Determines if the server object for this reference has already
+ * been destroyed.
+ *
+ * @param target the CORBA object, to that this operation must be applied.
+ *
+ * @return true if the object has been destroyed, false otherwise.
+ */
+ public abstract boolean non_existent(org.omg.CORBA.Object target);
+
+ /**
+ * Compares two objects for equality. The default implementations
+ * delegated call to {@link java.lang.Object#equals(java.lang.Object)}.
+ *
+ * @param self this CORBA object.
+ * @param other the other CORBA object.
+ *
+ * @return true if the objects are equal.
+ */
+ public boolean equals(org.omg.CORBA.Object self, java.lang.Object other)
+ {
+ return self==other;
+ }
+
+ /**
+ * Return the hashcode for this CORBA object. The default implementation
+ * delegates call to {@link #hash(org.omg.CORBA.Object, int)}, passing Integer.MAX_VALUE as an
+ * argument.
+ *
+ * @param target the object, for that the hash code must be computed.
+ *
+ * @return the hashcode.
+ */
+ public int hashCode(org.omg.CORBA.Object target)
+ {
+ return hash(target, Integer.MAX_VALUE);
+ }
+
+ /**
+ * Invoke the operation.
+ *
+ * @param target the invocation target.
+ * @param output the stream, containing the written arguments.
+ *
+ * @return the stream, from where the input parameters could be read.
+ *
+ * @throws ApplicationException if the application throws an exception,
+ * defined as a part of its remote method definition.
+ *
+ * @throws RemarshalException if reading(remarshalling) fails.
+ *
+ * @throws NO_IMPLEMENT, always (following the 1.4 specification).
+ */
+ public InputStream invoke(org.omg.CORBA.Object target,
+ org.omg.CORBA.portable.OutputStream output
+ )
+ throws ApplicationException, RemarshalException
+ {
+ throw new NO_IMPLEMENT(WHY);
+ }
+
+ /**
+ * Provides the reference to ORB.
+ *
+ * @param target the object reference.
+ *
+ * @return the associated ORB.
+ *
+ * @throws NO_IMPLEMENT, always (following the 1.4 specification).
+ */
+ public ORB orb(org.omg.CORBA.Object target)
+ {
+ throw new NO_IMPLEMENT(WHY);
+ }
+
+ /**
+ * Free resoureces, occupied by this reference. The object implementation
+ * is not notified, and the other references to the same object are not
+ * affected.
+ *
+ * @param target the CORBA object, to that this operation must be applied.
+ */
+ public abstract void release(org.omg.CORBA.Object target);
+
+ /**
+ * Release the reply stream back to ORB after finishing reading the data
+ * from it.
+ *
+ * @param target the CORBA object, to that this operation must be applied.
+ * @param input the stream, normally returned by {@link #invoke} or
+ * {@link ApplicationException#getInputStream()}, can be null.
+ *
+ * The default method returns without action.
+ */
+ public void releaseReply(org.omg.CORBA.Object target,
+ org.omg.CORBA.portable.InputStream input
+ )
+ {
+ }
+
+ /**
+ * Create a request to invoke the method of this CORBA object.
+ *
+ * @param target the CORBA object, to that this operation must be applied.
+ * @param operation the name of the method to invoke.
+ *
+ * @return the request.
+ */
+ public abstract Request request(org.omg.CORBA.Object target, String operation);
+
+ /**
+ * Create a request to invoke the method of this CORBA object.
+ *
+ * @param target the CORBA object, to that this operation must be applied.
+ * @param operation the name of the method to invoke.
+ * @param response_expected specifies if this is one way message or the
+ * response to the message is expected.
+ *
+ * @return the stream where the method arguments should be written.
+ */
+ public org.omg.CORBA.portable.OutputStream request(org.omg.CORBA.Object target,
+ String operation,
+ boolean response_expected
+ )
+ {
+ throw new NO_IMPLEMENT(WHY);
+ }
+
+ /**
+ * This method is always called after invoking the operation on the
+ * local servant.
+ *
+ * The default method returns without action.
+ *
+ * @param self the object.
+ * @param servant the servant.
+ */
+ public void servant_postinvoke(org.omg.CORBA.Object self,
+ ServantObject servant
+ )
+ {
+ }
+
+ /**
+ * Returns a servant that should be used for this request.
+ * The servant can also be casted to the expected type, calling the
+ * required method directly.
+ *
+ * @param self the object
+ * @param operation the operation
+ * @param expectedType the expected type of the servant.
+ *
+ * This implementation always returns null; override for different
+ * behavior.
+ *
+ * @return the servant or null if the servant is not an expected type
+ * of the method is not supported, for example, due security reasons.
+ */
+ @SuppressWarnings("unchecked") // Needed for API compatibility
+ public ServantObject servant_preinvoke(org.omg.CORBA.Object self,
+ String operation, Class expectedType
+ )
+ {
+ return null;
+ }
+
+ /**
+ * Returns a new object with the new policies either replacing or
+ * extending the current policies, depending on the second parameter.
+ *
+ * @param target the CORBA object, to that this operation must be applied.
+ * @param policies the policy additions or replacements.
+ * @param how either {@link SetOverrideType#SET_OVERRIDE} to override the
+ * current policies of {@link SetOverrideType#ADD_OVERRIDE} to replace
+ * them.
+ *
+ * @throws NO_IMPLEMENT, always (following the 1.4 specification).
+ *
+ * @return the new reference with the changed policies.
+ */
+ public org.omg.CORBA.Object set_policy_override(org.omg.CORBA.Object target,
+ Policy[] policies,
+ SetOverrideType how
+ )
+ {
+ throw new NO_IMPLEMENT(WHY);
+ }
+
+ /**
+ * Return a string representation of the passed object.
+ *
+ * @param self the CORBA object, to that the string representation must be
+ * returned. By default, the call is delegated to
+ * {@link java.lang.Object#toString()}.
+ *
+ * @return the string representation.
+ */
+ public String toString(org.omg.CORBA.Object self)
+ {
+ if (self instanceof ObjectImpl)
+ {
+ ObjectImpl x = (ObjectImpl) self;
+ CPStringBuilder b = new CPStringBuilder(x.getClass().getName());
+ b.append(": [");
+ for (int i = 0; i < x._ids().length; i++)
+ {
+ b.append(x._ids() [ i ]);
+ b.append(" ");
+ }
+ b.append("]");
+ return b.toString();
+ }
+ else
+ return self.getClass().getName();
+ }
+}
diff --git a/libjava/classpath/org/omg/CORBA/portable/IDLEntity.java b/libjava/classpath/org/omg/CORBA/portable/IDLEntity.java
new file mode 100644
index 000000000..1e67a8835
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/portable/IDLEntity.java
@@ -0,0 +1,50 @@
+/* IDLEntity.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.CORBA.portable;
+
+import java.io.Serializable;
+
+/**
+ * Indicates that this class has a corresponding Helper class.
+ * @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
+ */
+public interface IDLEntity
+ extends Serializable
+{
+}
diff --git a/libjava/classpath/org/omg/CORBA/portable/IndirectionException.java b/libjava/classpath/org/omg/CORBA/portable/IndirectionException.java
new file mode 100644
index 000000000..7fa46a1f6
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/portable/IndirectionException.java
@@ -0,0 +1,77 @@
+/* IndirectionException.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.CORBA.portable;
+
+import java.io.Serializable;
+
+import org.omg.CORBA.CompletionStatus;
+import org.omg.CORBA.SystemException;
+
+/**
+ * This exception is thrown when reading from the ORBs input streams
+ * certain specific data layouts (object recursive references to itself).
+ * These layouts are not supported by this CORBA implementation.
+ *
+ * @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
+ */
+public class IndirectionException
+ extends SystemException
+ implements Serializable
+{
+ /**
+ * Use v 1.4 serialVersionUID for interoperability.
+ */
+ private static final long serialVersionUID = -1923858944380721643L;
+
+ /**
+ * The stream offset, indicating, where the error has occured.
+ */
+ public int offset;
+
+ /**
+ * Create the indirection exception.
+ *
+ * @param an_offset the stream offset, indicating the error position.
+ */
+ public IndirectionException(int an_offset)
+ {
+ super("Indirection exception", 0, CompletionStatus.COMPLETED_NO);
+ offset = an_offset;
+ }
+}
diff --git a/libjava/classpath/org/omg/CORBA/portable/InputStream.java b/libjava/classpath/org/omg/CORBA/portable/InputStream.java
new file mode 100644
index 000000000..aee540d01
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/portable/InputStream.java
@@ -0,0 +1,287 @@
+/* InputStream.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.CORBA.portable;
+
+import java.math.BigDecimal;
+
+import org.omg.CORBA.Any;
+import org.omg.CORBA.Context;
+import org.omg.CORBA.NO_IMPLEMENT;
+import org.omg.CORBA.ORB;
+import org.omg.CORBA.Object;
+import org.omg.CORBA.Principal;
+import org.omg.CORBA.TypeCode;
+
+/**
+ * This class is used to read CORBA IDL data types.
+ *
+ * @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
+ */
+public abstract class InputStream
+ extends java.io.InputStream
+{
+ /**
+ * Return the Object Request Broker that has created this stream.
+ * @return the ORB. This must be overridden, as the default
+ * method always returns null.
+ */
+ public ORB orb()
+ {
+ return null;
+ }
+
+ /**
+ * This should read the CORBA context, but following the 1.4 API
+ * specification, it must not be implemented.
+ *
+ * @throws NO_IMPLEMENT, always.
+ */
+ public Context read_Context()
+ {
+ throw new NO_IMPLEMENT();
+ }
+
+ /**
+ * Read a CORBA (not java) object
+ * @return an object.
+ */
+ public abstract org.omg.CORBA.Object read_Object();
+
+ /**
+ * Read a CORBA <code>char</code>.
+ * @return a value, corresponding the value of the CORBA <code>char</code>.
+ */
+ public abstract char read_char();
+
+ /**
+ * Read a CORBA <code>double</code>.
+ * @return a value, corresponding the value of the CORBA <code>double</code>.
+ */
+ public abstract double read_double();
+
+ /**
+ * Read a CORBA <code>float</code>.
+ * @return a value, corresponding the value of the CORBA <code>float</code>.
+ */
+ public abstract float read_float();
+
+ /**
+ * Read a and array of CORBA float.
+ */
+ public abstract void read_float_array(float[] value, int offset, int length);
+
+ /**
+ * Read a CORBA <code>long</code> that is mapped into java <code>int</code>.
+ * @return an integer, corresponding the CORBA <code>long</code>.
+ */
+ public abstract int read_long();
+
+ /**
+ * Read a CORBA <code>long long</code> that is mapped into java <code>
+ * long</code>.
+ * @return a value, corresponding the CORBA <code>long long</code>
+ */
+ public abstract long read_longlong();
+
+ /**
+ * Read an array of CORBA <code>long long</code>
+ */
+ public abstract void read_longlong_array(long[] value, int offset, int length);
+
+ /**
+ * Read a CORBA <code>octed</code> that is mapped into java <code>byte</code>.
+ * @return a byte, corresponding the CORBA <code>octet</code>.
+ */
+ public abstract byte read_octet();
+
+ /**
+ * Read a and array of CORBA octets that are mapped into java array of
+ * bytes.
+ */
+ public abstract void read_octet_array(byte[] value, int offset, int length);
+
+ /**
+ * Read a CORBA <code>short</code>.
+ * @return a value, corresponding the value of the CORBA <code>short</code>.
+ */
+ public abstract short read_short();
+
+ public abstract void read_short_array(short[] value, int offset, int length);
+
+ /**
+ * Read a CORBA unsigned long that is mapped into java <code>int</code>.
+ * @return an integer, matching the CORBA unsigned <code>long</code>.
+ */
+ public abstract int read_ulong();
+
+ /**
+ * Read an array of CORBA unsigned long.
+ */
+ public abstract void read_ulong_array(int[] value, int offset, int length);
+
+ /**
+ * Should read from the stream, but following specification it does not.
+ * @throws java.io.IOException
+ * @throws NO_IMPLEMENT, always.
+ */
+ public int read()
+ throws java.io.IOException
+ {
+ throw new NO_IMPLEMENT();
+ }
+
+ /**
+ * Read a TypeCode.
+ * @return a TypeCode.
+ */
+ public abstract TypeCode read_TypeCode();
+
+ /**
+ * Read a CORBA <code>boolean</code>.
+ * @return a value, corresponding the value of the CORBA <code>boolean</code>.
+ */
+ public abstract boolean read_boolean();
+
+ /**
+ * Read a and array of CORBA boolean values.
+ */
+ public abstract void read_boolean_array(boolean[] value, int offset,
+ int length
+ );
+
+ /**
+ * Read a and array of CORBA characters.
+ */
+ public abstract void read_char_array(char[] value, int offset, int length);
+
+ /**
+ * Read a and array of CORBA doubles.
+ */
+ public abstract void read_double_array(double[] value, int offset, int length);
+
+ /**
+ * Read a and array of CORBA longs.
+ */
+ public abstract void read_long_array(int[] value, int offset, int length);
+
+ /**
+ * Read a CORBA <code>string</code> that is mapped into java
+ * <code>String</code>.
+ * @return a value, corresponding the value of the CORBA
+ * <code>string</code>.
+ */
+ public abstract String read_string();
+
+ /**
+ * Read a and array of CORBA unsigned longs.
+ */
+ public abstract long read_ulonglong();
+
+ /**
+ * Read a and array of CORBA unsigned longs.
+ */
+ public abstract void read_ulonglong_array(long[] value, int offset, int length);
+
+ /**
+ * Read a CORBA unsigned short that is mapped into java <code>short</code>.
+ * @return a value of the CORBA unsigned <code>short</code>.
+ */
+ public abstract short read_ushort();
+
+ /**
+ * Read a and array of CORBA unsigned shorts.
+ */
+ public abstract void read_ushort_array(short[] value, int offset, int length);
+
+ /**
+ * Read a CORBA object that is an instance of the class, passed
+ * as an argument. This method is not abstract, but following the
+ * specifications it must not be implemented.
+ *
+ * @param klass a CORBA class
+ * @throws NO_IMPLEMENT, always.
+ */
+ @SuppressWarnings("unchecked") // Needed for API compatibility
+ public Object read_Object(Class klass)
+ {
+ throw new NO_IMPLEMENT();
+ }
+
+ /**
+ * Read a CORBA <code>Any</code>.
+ * @return an <code>Any</code>.
+ */
+ public abstract Any read_any();
+
+ /**
+ * Read a CORBA <code>fixed</code>. This method is not abstract,
+ * but following the specifications it must not be implemented.
+ *
+ * @throws NO_IMPLEMENT, always.
+ */
+ public BigDecimal read_fixed()
+ {
+ throw new NO_IMPLEMENT();
+ }
+
+ /**
+ * Read a CORBA <code>wchar</code> that is mapped into java <code>char</code>.
+ * @return a value, corresponding the value of the CORBA <code>wchar</code>.
+ */
+ public abstract char read_wchar();
+
+ public abstract void read_wchar_array(char[] value, int offset, int length);
+
+ /**
+ * Read a CORBA <code>wstring</code> that is mapped into
+ * java <code>String</code>.
+ * @return a string, corresponding CORBA <code>wstring</code>.
+ */
+ public abstract String read_wstring();
+
+ /**
+ * Read a CORBA <code>Principal</code>.
+ * @deprecated by CORBA 2.2
+ * @return a Principal.
+ */
+ public Principal read_Principal()
+ {
+ throw new NO_IMPLEMENT();
+ }
+}
diff --git a/libjava/classpath/org/omg/CORBA/portable/InvokeHandler.java b/libjava/classpath/org/omg/CORBA/portable/InvokeHandler.java
new file mode 100644
index 000000000..d4381204a
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/portable/InvokeHandler.java
@@ -0,0 +1,66 @@
+/* InvokeHandler.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.CORBA.portable;
+
+import org.omg.CORBA.SystemException;
+
+/**
+ * Provides the dispatching mechanism for incoming call.
+ *
+ * @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
+ */
+public interface InvokeHandler
+{
+ /**
+ * Invoke the object method.
+ *
+ * @param method the name of the method to invoke.
+ * @param input the input stream to read parameters from.
+ * @param handler the response handler, used for creating the reply.
+ *
+ * @return the output stream, returned by {@link ResponseHandler}.
+ * The response values are already written to that stream.
+ *
+ * @throws SystemException if invocation has failed due CORBA system exception.
+ */
+ OutputStream _invoke(String method, org.omg.CORBA.portable.InputStream input,
+ ResponseHandler handler
+ )
+ throws SystemException;
+}
diff --git a/libjava/classpath/org/omg/CORBA/portable/ObjectImpl.java b/libjava/classpath/org/omg/CORBA/portable/ObjectImpl.java
new file mode 100644
index 000000000..c7ee707f3
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/portable/ObjectImpl.java
@@ -0,0 +1,401 @@
+/* ObjectImpl.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.CORBA.portable;
+
+import org.omg.CORBA.BAD_PARAM;
+import org.omg.CORBA.Context;
+import org.omg.CORBA.ContextList;
+import org.omg.CORBA.DomainManager;
+import org.omg.CORBA.ExceptionList;
+import org.omg.CORBA.NVList;
+import org.omg.CORBA.NamedValue;
+import org.omg.CORBA.ORB;
+import org.omg.CORBA.Policy;
+import org.omg.CORBA.Request;
+import org.omg.CORBA.SetOverrideType;
+
+/**
+ * The basic implementation of the CORBA Object. The most of the methods
+ * delegate the functionality to the {@link Delegate} that can be replaced
+ * by {@link #_set_delegate(Delegate)}.
+ *
+ * @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
+ */
+public abstract class ObjectImpl
+ implements org.omg.CORBA.Object
+{
+ /**
+ * The delegate, responsible for the method implementations.
+ */
+ transient Delegate delegate;
+
+ /**
+ * Create a request to invoke the method of this object, specifying
+ * context list and the list of the expected exception.
+ *
+ * @param context a list of additional properties.
+ * @param operation the name of method to be invoked.
+ * @param parameters the method parameters.
+ * @param returns the container for tge method returned value.
+ * @param exceptions the list of the possible exceptions that the method
+ * can throw.
+ * @param ctx_list the list of the context strings that need to be
+ * resolved and send as a context instance.
+ *
+ * @return the created reaquest.
+ */
+ public Request _create_request(Context context, String operation,
+ NVList parameters, NamedValue returns,
+ ExceptionList exceptions, ContextList ctx_list
+ )
+ {
+ return delegate.create_request(this, context, operation, parameters,
+ returns, exceptions, ctx_list
+ );
+ }
+
+ /**
+ * Create a request to invoke the method of this object.
+ *
+ * @param context a list of additional properties.
+ * @param operation the name of method to be invoked.
+ * @param parameters the method parameters.
+ * @param returns the container for tge method returned value.
+ *
+ * @return the created reaquest.
+ */
+ public Request _create_request(Context context, String operation,
+ NVList parameters, NamedValue returns
+ )
+ {
+ return delegate.create_request(this, context, operation, parameters, returns);
+ }
+
+ /**
+ * Duplicate the object reference. This does not make much sense for
+ * java platform and is just included for the sake of compliance with
+ * CORBA APIs.
+ *
+ * The method may return the object reference itself.
+ *
+ * @return as a rule, <code>this</code>.
+ */
+ public org.omg.CORBA.Object _duplicate()
+ {
+ return delegate.duplicate(this);
+ }
+
+ /**
+ * Get vendor specific delegate, responsible for the implemented
+ * functionality.
+ */
+ public Delegate _get_delegate()
+ {
+ return delegate;
+ }
+
+ /**
+ * Retrieve the domain managers for this object.
+ *
+ * @return the domain managers.
+ */
+ public DomainManager[] _get_domain_managers()
+ {
+ return delegate.get_domain_managers(this);
+ }
+
+ /**
+ * Get the <code>InterfaceDef</code> for this Object.
+ */
+ public org.omg.CORBA.Object _get_interface_def()
+ {
+ return delegate.get_interface_def(this);
+ }
+
+ /**
+ * Returns the {@link Policy}, applying to this object.
+ *
+ * @param a_policy_type a type of policy to be obtained.
+ * @return a corresponding Policy object.
+ *
+ * @throws BAD_PARAM if the policy of the given type is not
+ * associated with this object, or if it is not supported by this ORB.
+ */
+ public Policy _get_policy(int a_policy_type)
+ {
+ return delegate.get_policy(this, a_policy_type);
+ }
+
+ /**
+ * Get the array of interface repository ids, defining this object.
+ */
+ public abstract String[] _ids();
+
+ /**
+ * Get the hashcode this object reference. The same hashcode still
+ * does not means that the references are the same. From the other
+ * side, two different references may still refer to the same CORBA
+ * object. The returned value must not change during the object
+ * lifetime.
+ *
+ * @param max the maximal value to return.
+ *
+ * @return the hashcode.
+ */
+ public int _hash(int max)
+ {
+ return delegate.hash(this, max);
+ }
+
+ /**
+ * Invoke the operation.
+ *
+ * @param output the stream, containing the written arguments.
+ *
+ * @return the stream, from where the input parameters could be read.
+ *
+ * @throws ApplicationException if the application throws an exception,
+ * defined as a part of its remote method definition.
+ *
+ * @throws RemarshalException if reading(remarshalling) fails.
+ */
+ public InputStream _invoke(OutputStream output)
+ throws org.omg.CORBA.portable.ApplicationException,
+ org.omg.CORBA.portable.RemarshalException
+ {
+ return delegate.invoke(this, output);
+ }
+
+ /**
+ * Check if this object can be referenced by the given repository id.
+ *
+ * @param idl_id the repository id.
+ *
+ * @return true if the passed parameter is a repository id of this
+ * CORBA object.
+ */
+ public boolean _is_a(String idl_id)
+ {
+ return delegate.is_a(this, idl_id);
+ }
+
+ /**
+ * Return true if the other object references are equivalent, so far as
+ * it is possible to determine this easily.
+ *
+ * @param other the other object reference.
+ *
+ * @return true if both references refer the same object, false
+ * if they probably can refer different objects. Uses direct
+ * comparison if the delegate has not been set.
+ */
+ public boolean _is_equivalent(org.omg.CORBA.Object other)
+ {
+ return (delegate == null) ? this == other
+ : delegate.is_equivalent(this, other);
+ }
+
+ /**
+ * Returns true if the object is local.
+ *
+ * @return false, always (following 1.4 specs). Override to get
+ * functionality.
+ */
+ public boolean _is_local()
+ {
+ return delegate.is_local(this);
+ }
+
+ /**
+ * Determines if the server object for this reference has already
+ * been destroyed.
+ *
+ * @return true if the object has been destroyed, false otherwise.
+ */
+ public boolean _non_existent()
+ {
+ return delegate.non_existent(this);
+ }
+
+ /**
+ * Provides the reference to ORB.
+ *
+ * @return the associated ORB.
+ */
+ public ORB _orb()
+ {
+ return delegate.orb(this);
+ }
+
+ /**
+ * Free resoureces, occupied by this reference. The object implementation
+ * is not notified, and the other references to the same object are not
+ * affected.
+ */
+ public void _release()
+ {
+ delegate.release(this);
+ }
+
+ /**
+ * Release the reply stream back to ORB after finishing reading the data
+ * from it.
+ *
+ * @param stream the stream, normally returned by {@link #_invoke} or
+ * {@link ApplicationException#getInputStream()}, can be null.
+ */
+ public void _releaseReply(InputStream stream)
+ {
+ if (delegate != null)
+ delegate.releaseReply(this, stream);
+ }
+
+ /**
+ * Create a request to invoke the method of this CORBA object.
+ *
+ * @param method the name of the method to invoke.
+ *
+ * @return the request.
+ */
+ public Request _request(String method)
+ {
+ return delegate.request(this, method);
+ }
+
+ /**
+ * Create a request to invoke the method of this CORBA object.
+ *
+ * @param method the name of the method to invoke.
+ * @param response_expected specifies if this is one way message or the
+ * response to the message is expected.
+ *
+ * @return the stream where the method arguments should be written.
+ */
+ public org.omg.CORBA.portable.OutputStream _request(String method,
+ boolean response_expected
+ )
+ {
+ return delegate.request(this, method, response_expected);
+ }
+
+ /**
+ * This method is always called after invoking the operation on the
+ * local servant.
+ *
+ * The default method returns without action.
+ *
+ * @param servant the servant.
+ */
+ public void _servant_postinvoke(ServantObject servant)
+ {
+ delegate.servant_postinvoke(this, servant);
+ }
+
+ /**
+ * Returns a servant that should be used for this request.
+ * The servant can also be casted to the expected type, calling the
+ * required method directly.
+ *
+ * @param method the operation
+ * @param expected_type the expected type of the servant.
+ *
+ * This implementation always returns null; override for different
+ * behavior.
+ *
+ * @return the servant or null if the servant is not an expected type
+ * of the method is not supported, for example, due security reasons.
+ */
+ @SuppressWarnings("unchecked") // Needed for API compatibility
+ public ServantObject _servant_preinvoke(String method, Class expected_type)
+ {
+ return delegate.servant_preinvoke(this, method, expected_type);
+ }
+
+ /**
+ * Set the delegate, responsible for the implemented functionality.
+ *
+ * @param a_delegate a delegate, responsible for the implemented
+ * functionality.
+ */
+ public void _set_delegate(Delegate a_delegate)
+ {
+ delegate = a_delegate;
+ }
+
+ /**
+ * Returns a new object with the new policies either replacing or
+ * extending the current policies, depending on the second parameter.
+ *
+ * @param policies the policy additions or replacements.
+ * @param how either {@link SetOverrideType#SET_OVERRIDE} to override the
+ * current policies of {@link SetOverrideType#ADD_OVERRIDE} to replace
+ * them.
+ */
+ public org.omg.CORBA.Object _set_policy_override(Policy[] policies,
+ SetOverrideType how
+ )
+ {
+ return delegate.set_policy_override(this, policies, how);
+ }
+
+ /**
+ * Check if this object is equal to another object.
+ *
+ * @param other the other object to compare.
+ *
+ * @return true if the objects are equal.
+ */
+ public boolean equals(java.lang.Object other)
+ {
+ if (delegate == null)
+ return this == other;
+ else
+ return delegate.equals(this, other);
+ }
+
+ /**
+ * Return the string representation of the passed object.
+ *
+ * @return the string representation.
+ */
+ public String toString()
+ {
+ return delegate.toString(this);
+ }
+}
diff --git a/libjava/classpath/org/omg/CORBA/portable/OutputStream.java b/libjava/classpath/org/omg/CORBA/portable/OutputStream.java
new file mode 100644
index 000000000..f40be2365
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/portable/OutputStream.java
@@ -0,0 +1,283 @@
+/* OutputStream.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.CORBA.portable;
+
+import org.omg.CORBA.Any;
+import org.omg.CORBA.Context;
+import org.omg.CORBA.ContextList;
+import org.omg.CORBA.NO_IMPLEMENT;
+import org.omg.CORBA.ORB;
+import org.omg.CORBA.Principal;
+import org.omg.CORBA.TypeCode;
+
+import java.io.IOException;
+
+import java.math.BigDecimal;
+
+/**
+ * This class is used to write CORBA IDL data types.
+ *
+ * @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
+ */
+public abstract class OutputStream
+ extends java.io.OutputStream
+{
+ /**
+ * Returns an input stream with the same buffer.
+ * @return an input stream
+ */
+ public abstract InputStream create_input_stream();
+
+ /**
+ * Return the Object Request Broker that has created this stream.
+ * @return the ORB. This must be overridden, as the default
+ * method always returns null.
+ */
+ public ORB orb()
+ {
+ return null;
+ }
+
+ /**
+ * Should write an byte (lower 8 bits) to the output stream, but,
+ * following specification, it does not and
+ * must be overridden to get a functionality.
+ *
+ * @param n an integer to write.
+ *
+ * @throws NO_IMPLEMENT, always.
+ * @throws IOException in overriden methods.
+ */
+ public void write(int n)
+ throws IOException
+ {
+ throw new NO_IMPLEMENT();
+ }
+
+ /**
+ * Should write a CORBA context to the output stream, but,
+ * following the 1.4 specification, it does not and
+ * must be overridden to get a functionality.
+ *
+ * @throws NO_IMPLEMENT, always.
+ */
+ public void write_Context(Context context, ContextList contexts)
+ {
+ throw new NO_IMPLEMENT();
+ }
+
+ /**
+ * Write CORBA (not java) Object.
+ */
+ public abstract void write_Object(org.omg.CORBA.Object x);
+
+ /**
+ * Should write a principal to the output stream, but,
+ * following specification, it does not and
+ * must be overridden to get a functionality.
+ *
+ * @deprecated by CORBA 2.2
+ *
+ * @param principal a Principal to write
+ *
+ * @throws NO_IMPLEMENT, always.
+ */
+ public void write_Principal(Principal principal)
+ {
+ throw new NO_IMPLEMENT();
+ }
+
+ /**
+ * Write TypeCode.
+ */
+ public abstract void write_TypeCode(TypeCode x);
+
+ /**
+ * Write CORBA <code>Any</code>.
+ */
+ public abstract void write_any(Any x);
+
+ /**
+ * Write CORBA <code>boolean</code>.
+ */
+ public abstract void write_boolean(boolean x);
+
+ /**
+ * Write CORBA <code>booelan[]</code>.
+ */
+ public abstract void write_boolean_array(boolean[] x, int ofs, int len);
+
+ /**
+ * Write CORBA <code>char</code>.
+ */
+ public abstract void write_char(char x);
+
+ /**
+ * Write CORBA <code>char[]</code>.
+ */
+ public abstract void write_char_array(char[] chars, int offset, int length);
+
+ /**
+ * Write CORBA <code>double</code>.
+ */
+ public abstract void write_double(double x);
+
+ /**
+ * Write CORBA <code>double[]</code>.
+ */
+ public abstract void write_double_array(double[] x, int ofs, int len);
+
+ /**
+ * Should write a BigDecimal number, but, following specification,
+ * it does not and must be overridden to get a functionality.
+ *
+ * @param fixed a number to write
+ * @throws NO_IMPLEMENT, always.
+ */
+ public void write_fixed(BigDecimal fixed)
+ {
+ throw new NO_IMPLEMENT();
+ }
+
+ /**
+ * Write CORBA <code>float</code>.
+ */
+ public abstract void write_float(float x);
+
+ /**
+ * Write CORBA <code>float[]</code>.
+ */
+ public abstract void write_float_array(float[] x, int ofs, int len);
+
+ /**
+ * Write CORBA <code>long</code> that is mapped into java <code>int</code>.
+ */
+ public abstract void write_long(int x);
+
+ /**
+ * Write CORBA <code>long[]</code>.
+ */
+ public abstract void write_long_array(int[] x, int ofs, int len);
+
+ /**
+ * Write CORBA <code>long long</code> that is mapped into
+ * java <code>long</code>.
+ */
+ public abstract void write_longlong(long x);
+
+ /**
+ * Write CORBA <code>long long []</code>.
+ */
+ public abstract void write_longlong_array(long[] x, int ofs, int len);
+
+ /**
+ * Write CORBA <code>octed</code> that is mapped into java <code>byte</code>
+ */
+ public abstract void write_octet(byte x);
+
+ /**
+ * Write CORBA <code>octet[]</code>.
+ */
+ public abstract void write_octet_array(byte[] x, int ofs, int len);
+
+ /**
+ * Write CORBA <code>short</code>.
+ */
+ public abstract void write_short(short x);
+
+ /**
+ * Write CORBA <code>short[]</code>.
+ */
+ public abstract void write_short_array(short[] x, int ofs, int len);
+
+ /**
+ * Write CORBA <code>string</code>.
+ */
+ public abstract void write_string(String x);
+
+ /**
+ * Write unsigned CORBA <code>long</code> that is mapped into
+ * java <code>int</code>.
+ */
+ public abstract void write_ulong(int x);
+
+ /**
+ * Write array of CORBA unsigned longs.
+ */
+ public abstract void write_ulong_array(int[] x, int ofs, int len);
+
+ /**
+ * Write unsigned CORBA <code>long long </code> that is mapped into
+ * java <code>long</code>.
+ */
+ public abstract void write_ulonglong(long x);
+
+ /**
+ * Write array of unsigned CORBA long-longs.
+ */
+ public abstract void write_ulonglong_array(long[] x, int ofs, int len);
+
+ /**
+ * Write unsigned CORBA <code>short</code> that is mapped into
+ * java <code>short</code>.
+ */
+ public abstract void write_ushort(short x);
+
+ /**
+ * Write array of unsigned CORBA shorts.
+ */
+ public abstract void write_ushort_array(short[] x, int ofs, int len);
+
+ /**
+ * Write CORBA <code>wchar</code> that is mapped into
+ * java <code>char</code>.
+ */
+ public abstract void write_wchar(char x);
+
+ /**
+ * Write array of CORBA wchars.
+ */
+ public abstract void write_wchar_array(char[] chars, int offset, int length);
+
+ /**
+ * Write CORBA <code>wstring</code> that is mapped into
+ * java <code>string</code>.
+ */
+ public abstract void write_wstring(String x);
+}
diff --git a/libjava/classpath/org/omg/CORBA/portable/RemarshalException.java b/libjava/classpath/org/omg/CORBA/portable/RemarshalException.java
new file mode 100644
index 000000000..14836ea14
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/portable/RemarshalException.java
@@ -0,0 +1,59 @@
+/* RemarshalException.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.CORBA.portable;
+
+import java.io.Serializable;
+
+/**
+ * This is exception is potentially thrown by the _invoke()
+ * method of the object implementation, requiring to write the method
+ * parameters repeatedly. The parameters must be re-written as long as this
+ * exception is thrown.
+ *
+ * @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
+ */
+public final class RemarshalException
+ extends Exception
+ implements Serializable
+{
+ /**
+ * Use serialVersionUID (v1.4) for interoperability.
+ */
+ private static final long serialVersionUID = -7025491253080954918L;
+}
diff --git a/libjava/classpath/org/omg/CORBA/portable/ResponseHandler.java b/libjava/classpath/org/omg/CORBA/portable/ResponseHandler.java
new file mode 100644
index 000000000..1715b01b3
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/portable/ResponseHandler.java
@@ -0,0 +1,58 @@
+/* ResponseHandler.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.CORBA.portable;
+
+/**
+ * The interface, able to return streams, where the reply data can be
+ * marshalled.
+ *
+ * @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
+ */
+public interface ResponseHandler
+{
+ /**
+ * Create a stream, suitable for writing a user exception.
+ */
+ org.omg.CORBA.portable.OutputStream createExceptionReply();
+
+ /**
+ * Create a stream for writing an ordinary reply (not an exception).
+ */
+ org.omg.CORBA.portable.OutputStream createReply();
+}
diff --git a/libjava/classpath/org/omg/CORBA/portable/ServantObject.java b/libjava/classpath/org/omg/CORBA/portable/ServantObject.java
new file mode 100644
index 000000000..253defc0a
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/portable/ServantObject.java
@@ -0,0 +1,61 @@
+/* ServantObject.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.CORBA.portable;
+
+
+/**
+ * Together with supporting methods in {@link ObjectImpl} and {@link Delegate},
+ * provides mechanism for direct calls of clients, running on the same
+ * virtual machine (collocated).
+ *
+ * @see ObjectImpl#_servant_preinvoke(String, Class)
+ * @see ObjectImpl#_servant_postinvoke(ServantObject)
+ * @see Delegate#servant_preinvoke(org.omg.CORBA.Object, String, Class)
+ * @see Delegate#servant_postinvoke(org.omg.CORBA.Object, ServantObject)
+ *
+ * @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
+ */
+public class ServantObject
+{
+ /**
+ * The real servant, that can be casted to the expected type, later
+ * invoking the methods directly.
+ */
+ public java.lang.Object servant;
+}
diff --git a/libjava/classpath/org/omg/CORBA/portable/Streamable.java b/libjava/classpath/org/omg/CORBA/portable/Streamable.java
new file mode 100644
index 000000000..c59ee2a02
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/portable/Streamable.java
@@ -0,0 +1,70 @@
+/* Streamable.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.CORBA.portable;
+
+import org.omg.CORBA.TypeCode;
+
+/**
+ * The base class for the Holder classess of IDL types.
+ *
+ * @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
+ */
+public interface Streamable
+{
+ /**
+ * Fill in the value field for this holder by reading the required data
+ * from the given stream.
+ *
+ * @param input the input stream to read from.
+ */
+ void _read(InputStream input);
+
+ /**
+ * Returns the TypeCode, corresponding the CORBA type that is stored
+ * using this holder.
+ */
+ TypeCode _type();
+
+ /**
+ * Write the value field to the given stream.
+ *
+ * @param output the output stream to write into.
+ */
+ void _write(OutputStream output);
+}
diff --git a/libjava/classpath/org/omg/CORBA/portable/StreamableValue.java b/libjava/classpath/org/omg/CORBA/portable/StreamableValue.java
new file mode 100644
index 000000000..13dbad210
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/portable/StreamableValue.java
@@ -0,0 +1,57 @@
+/* StreamableValue.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.CORBA.portable;
+
+import java.io.Serializable;
+
+/**
+ * If the value type does not provide the user defined methods for reading
+ * and writing its content, it must implement this interface for reading
+ * and writing the content in a default way. This is done by implementing
+ * the {@link Streamable#_read} and {@link Streamable#_write}. IDL compiler
+ * should generate the implementation of this interface automatically.
+ *
+ * @see CustomValue for specifying the user-defined io methods.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public interface StreamableValue
+ extends Streamable, Serializable, ValueBase, IDLEntity
+{
+}
diff --git a/libjava/classpath/org/omg/CORBA/portable/UnknownException.java b/libjava/classpath/org/omg/CORBA/portable/UnknownException.java
new file mode 100644
index 000000000..a9b754b21
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/portable/UnknownException.java
@@ -0,0 +1,76 @@
+/* UnknownException.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.CORBA.portable;
+
+import java.io.Serializable;
+
+import org.omg.CORBA.CompletionStatus;
+import org.omg.CORBA.SystemException;
+
+/**
+ * The wrapper of the arbitrary exception into the System exception.
+ *
+ * @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
+ */
+public class UnknownException
+ extends SystemException
+ implements Serializable
+{
+ /**
+ * Use serialVersionUID (1.4) for interoperability.
+ */
+ private static final long serialVersionUID = 1725238280802233450L;
+
+ /**
+ * The original exception.
+ */
+ public Throwable originalEx;
+
+ /**
+ * Create a new unknown exception, wrapping a reason.
+ *
+ * @param reason an exception that has caused this unknown exception.
+ */
+ public UnknownException(Throwable reason)
+ {
+ super("" + reason, 0, CompletionStatus.COMPLETED_MAYBE);
+
+ originalEx = reason;
+ }
+}
diff --git a/libjava/classpath/org/omg/CORBA/portable/ValueBase.java b/libjava/classpath/org/omg/CORBA/portable/ValueBase.java
new file mode 100644
index 000000000..167f532ac
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/portable/ValueBase.java
@@ -0,0 +1,74 @@
+/* ValueBase.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.CORBA.portable;
+
+
+/**
+ * ValueBase is the basic interface for all CORBA value data types. A value
+ * type is something between CORBA structure and CORBA object. Like CORBA
+ * object, it can have methods, supporting some IDL-defined interface.
+ * However, like structures, they are local and passed by value,
+ * not by IOR reference.
+ *
+ * Unlike CORBA objects, values are not connected to any ORB by
+ * default; they hanlde the implemented functionality locally. The classes,
+ * required to implement that functionality, should either be pre-defined
+ * or they can be downloaded from the certain URL, defined as CodeBase.
+ *
+ * The value types can have both public and private members. They support
+ * inheritance. Value types can also be abstract.
+ *
+ * For transferring the value type data via stream, it must implement either
+ * {@link CustomValue} or {@link StreamableValue}.
+ *
+ * @since 1.3
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public interface ValueBase
+ extends IDLEntity
+{
+ /**
+ * Get the truncatable repository ids.
+ *
+ * @return the array of repository ids, defining the base types, to that
+ * basic types this value base can be truncated.
+ */
+ String[] _truncatable_ids();
+}
diff --git a/libjava/classpath/org/omg/CORBA/portable/ValueFactory.java b/libjava/classpath/org/omg/CORBA/portable/ValueFactory.java
new file mode 100644
index 000000000..aaffe8684
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/portable/ValueFactory.java
@@ -0,0 +1,62 @@
+/* ValueFactory.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.CORBA.portable;
+
+import java.io.Serializable;
+
+/**
+ * An interface for reading an instance of the value type
+ * from the input stream.
+ *
+ * @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
+ */
+public interface ValueFactory
+{
+ /**
+ * Read the value type. The method is responsible both
+ * for creating a new instance of the value type and
+ * reading the content of this nstance from the stream.
+ *
+ * @param from_stream a stream to read from.
+ *
+ * @return a created value type, intialised with the data from
+ * the stream.
+ */
+ Serializable read_value(org.omg.CORBA_2_3.portable.InputStream from_stream);
+}
diff --git a/libjava/classpath/org/omg/CORBA/portable/package.html b/libjava/classpath/org/omg/CORBA/portable/package.html
new file mode 100644
index 000000000..8104136e0
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/portable/package.html
@@ -0,0 +1,50 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
+<!-- package.html - describes classes in org.omg.CORBA.portable package
+ 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. -->
+
+<html>
+<head><title>GNU Classpath - org.omg.CORBA.portable</title></head>
+
+<body>
+<p>This package defines CDR streams,
+used for communications between orbs, normally via network.
+It also declares mechanisms, enabling the code, provided by one vendor, to run on the
+{@link org.omg.CORBA.ORB}, implemented by another vendor.</p>
+
+@author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+</body>
+</html>