diff options
Diffstat (limited to 'libjava/classpath/org/omg/IOP')
14 files changed, 232 insertions, 6 deletions
diff --git a/libjava/classpath/org/omg/IOP/CodecFactoryHelper.java b/libjava/classpath/org/omg/IOP/CodecFactoryHelper.java index d5c55a264cc..fea0b887bd9 100644 --- a/libjava/classpath/org/omg/IOP/CodecFactoryHelper.java +++ b/libjava/classpath/org/omg/IOP/CodecFactoryHelper.java @@ -120,6 +120,25 @@ public abstract class CodecFactoryHelper throw bad; } } + + /** + * Narrow the given object to the CodecFactory. 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). + * + * @param obj the object to cast. + * + * @return the casted CodecFactory. + * + * @since 1.5 + * + * @see OMG issue 4158. + */ + public static CodecFactory unchecked_narrow(org.omg.CORBA.Object obj) + { + return narrow(obj); + } /** * This should read the CodecFactory from the CDR intput stream, diff --git a/libjava/classpath/org/omg/IOP/CodecFactoryPackage/UnknownEncodingHelper.java b/libjava/classpath/org/omg/IOP/CodecFactoryPackage/UnknownEncodingHelper.java index a1082178c52..e036dbf1f42 100644 --- a/libjava/classpath/org/omg/IOP/CodecFactoryPackage/UnknownEncodingHelper.java +++ b/libjava/classpath/org/omg/IOP/CodecFactoryPackage/UnknownEncodingHelper.java @@ -39,6 +39,7 @@ exception statement from your version. */ package org.omg.IOP.CodecFactoryPackage; import gnu.CORBA.EmptyExceptionHolder; +import gnu.CORBA.Minor; import org.omg.CORBA.ORB; import org.omg.CORBA.Any; @@ -108,6 +109,7 @@ public abstract class UnknownEncodingHelper { BAD_OPERATION bad = new BAD_OPERATION("UnknownEncoding expected"); bad.initCause(cex); + bad.minor = Minor.Any; throw bad; } } diff --git a/libjava/classpath/org/omg/IOP/CodecPackage/FormatMismatchHelper.java b/libjava/classpath/org/omg/IOP/CodecPackage/FormatMismatchHelper.java index e5910ac57a0..e353be8f9ed 100644 --- a/libjava/classpath/org/omg/IOP/CodecPackage/FormatMismatchHelper.java +++ b/libjava/classpath/org/omg/IOP/CodecPackage/FormatMismatchHelper.java @@ -39,6 +39,7 @@ exception statement from your version. */ package org.omg.IOP.CodecPackage; import gnu.CORBA.EmptyExceptionHolder; +import gnu.CORBA.Minor; import org.omg.CORBA.Any; import org.omg.CORBA.BAD_OPERATION; @@ -103,6 +104,7 @@ public abstract class FormatMismatchHelper catch (ClassCastException cex) { BAD_OPERATION bad = new BAD_OPERATION("FormatMismatch expected"); + bad.minor = Minor.Any; bad.initCause(cex); throw bad; } diff --git a/libjava/classpath/org/omg/IOP/CodecPackage/InvalidTypeForEncodingHelper.java b/libjava/classpath/org/omg/IOP/CodecPackage/InvalidTypeForEncodingHelper.java index 6c4ce52f0b5..8a93c5895a0 100644 --- a/libjava/classpath/org/omg/IOP/CodecPackage/InvalidTypeForEncodingHelper.java +++ b/libjava/classpath/org/omg/IOP/CodecPackage/InvalidTypeForEncodingHelper.java @@ -39,6 +39,7 @@ exception statement from your version. */ package org.omg.IOP.CodecPackage; import gnu.CORBA.EmptyExceptionHolder; +import gnu.CORBA.Minor; import org.omg.CORBA.Any; import org.omg.CORBA.BAD_OPERATION; @@ -106,6 +107,7 @@ public abstract class InvalidTypeForEncodingHelper { BAD_OPERATION bad = new BAD_OPERATION("InvalidTypeForEncoding expected"); + bad.minor = Minor.Any; bad.initCause(cex); throw bad; } diff --git a/libjava/classpath/org/omg/IOP/CodecPackage/TypeMismatchHelper.java b/libjava/classpath/org/omg/IOP/CodecPackage/TypeMismatchHelper.java index 9f422863755..33951de701f 100644 --- a/libjava/classpath/org/omg/IOP/CodecPackage/TypeMismatchHelper.java +++ b/libjava/classpath/org/omg/IOP/CodecPackage/TypeMismatchHelper.java @@ -39,6 +39,7 @@ exception statement from your version. */ package org.omg.IOP.CodecPackage; import gnu.CORBA.EmptyExceptionHolder; +import gnu.CORBA.Minor; import org.omg.CORBA.Any; import org.omg.CORBA.BAD_OPERATION; @@ -103,6 +104,7 @@ public abstract class TypeMismatchHelper catch (ClassCastException cex) { BAD_OPERATION bad = new BAD_OPERATION("TypeMismatch expected"); + bad.minor = Minor.Any; bad.initCause(cex); throw bad; } diff --git a/libjava/classpath/org/omg/IOP/ExceptionDetailMessage.java b/libjava/classpath/org/omg/IOP/ExceptionDetailMessage.java new file mode 100644 index 00000000000..167ab1ac7e9 --- /dev/null +++ b/libjava/classpath/org/omg/IOP/ExceptionDetailMessage.java @@ -0,0 +1,60 @@ +/* ExceptionDetailMessage.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.IOP; + +/** + * <p>Defines the ExceptionDetailMessage (= 14) service context. This context + * may be included into reply message, having the SYSTEM_EXCEPTION or + * USER_EXCEPTION reply status, as the alternative to the stack trace + * that might contain sensitive or unwanted information. The service + * context contains the CDR-encapsulated wide string, usually + * returned by {@link Exception#getMessage}. + * </p><p> + * The applications may also send the more comprehensive UnknownExceptionInfo + * ( = 9 ) service context that contains the thrown exception, written + * as the Value type. + * </p> + */ +public interface ExceptionDetailMessage +{ + /** + * Specifies the ExceptionDetailMessage value, 14. + */ + int value = 14; +} diff --git a/libjava/classpath/org/omg/IOP/IORHelper.java b/libjava/classpath/org/omg/IOP/IORHelper.java index 5945bb75aa4..77f18d9b9cd 100644 --- a/libjava/classpath/org/omg/IOP/IORHelper.java +++ b/libjava/classpath/org/omg/IOP/IORHelper.java @@ -38,6 +38,8 @@ exception statement from your version. */ package org.omg.IOP; +import gnu.CORBA.Minor; + import org.omg.CORBA.Any; import org.omg.CORBA.BAD_OPERATION; import org.omg.CORBA.ORB; @@ -111,6 +113,7 @@ public abstract class IORHelper catch (ClassCastException cex) { BAD_OPERATION bad = new BAD_OPERATION("IOR expected"); + bad.minor = Minor.Any; bad.initCause(cex); throw bad; } diff --git a/libjava/classpath/org/omg/IOP/MultipleComponentProfileHelper.java b/libjava/classpath/org/omg/IOP/MultipleComponentProfileHelper.java index bc26068c94c..6f5156fe223 100644 --- a/libjava/classpath/org/omg/IOP/MultipleComponentProfileHelper.java +++ b/libjava/classpath/org/omg/IOP/MultipleComponentProfileHelper.java @@ -38,6 +38,8 @@ exception statement from your version. */ package org.omg.IOP; +import gnu.CORBA.Minor; + import org.omg.CORBA.ORB; import org.omg.CORBA.Any; import org.omg.CORBA.TypeCode; @@ -96,6 +98,7 @@ public abstract class MultipleComponentProfileHelper catch (ClassCastException cex) { BAD_OPERATION bad = new BAD_OPERATION("MultipleComponentProfile expected"); + bad.minor = Minor.Any; bad.initCause(cex); throw bad; } diff --git a/libjava/classpath/org/omg/IOP/RMICustomMaxStreamFormat.java b/libjava/classpath/org/omg/IOP/RMICustomMaxStreamFormat.java new file mode 100644 index 00000000000..a071c848887 --- /dev/null +++ b/libjava/classpath/org/omg/IOP/RMICustomMaxStreamFormat.java @@ -0,0 +1,56 @@ +/* RMICustomMaxStreamFormat.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.IOP; + + /** + * A single constant interface, defining the RMICustomMaxStreamFormat (= 17) + * service context. This constant is used in the service contexts + * inside the message when the {@link TAG_RMI_CUSTOM_MAX_STREAM_FORMAT} + * are used in IOR references. Please note that these two constants have + * different values. + * + * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org) + */ +public interface RMICustomMaxStreamFormat +{ + /** + * Specifies the RMICustomMaxStreamFormat value, 17. + */ + int value = 17; +} diff --git a/libjava/classpath/org/omg/IOP/ServiceContextHelper.java b/libjava/classpath/org/omg/IOP/ServiceContextHelper.java index a8224a64cdc..5693a32357a 100644 --- a/libjava/classpath/org/omg/IOP/ServiceContextHelper.java +++ b/libjava/classpath/org/omg/IOP/ServiceContextHelper.java @@ -38,6 +38,8 @@ exception statement from your version. */ package org.omg.IOP; +import gnu.CORBA.Minor; + import org.omg.CORBA.Any; import org.omg.CORBA.BAD_OPERATION; import org.omg.CORBA.ORB; @@ -115,6 +117,7 @@ public abstract class ServiceContextHelper catch (ClassCastException cex) { BAD_OPERATION bad = new BAD_OPERATION("ServiceContext expected"); + bad.minor = Minor.Any; bad.initCause(cex); throw bad; } diff --git a/libjava/classpath/org/omg/IOP/ServiceContextListHelper.java b/libjava/classpath/org/omg/IOP/ServiceContextListHelper.java index 11bbe253fea..fa436cbb885 100644 --- a/libjava/classpath/org/omg/IOP/ServiceContextListHelper.java +++ b/libjava/classpath/org/omg/IOP/ServiceContextListHelper.java @@ -38,6 +38,8 @@ exception statement from your version. */ package org.omg.IOP; +import gnu.CORBA.Minor; + import org.omg.CORBA.Any; import org.omg.CORBA.BAD_OPERATION; import org.omg.CORBA.ORB; @@ -94,7 +96,10 @@ public abstract class ServiceContextListHelper } catch (ClassCastException ex) { - throw new BAD_OPERATION("ServiceContext[] expected."); + BAD_OPERATION bad = new BAD_OPERATION("ServiceContext[] expected"); + bad.minor = Minor.Any; + bad.initCause(ex); + throw bad; } } diff --git a/libjava/classpath/org/omg/IOP/TAG_RMI_CUSTOM_MAX_STREAM_FORMAT.java b/libjava/classpath/org/omg/IOP/TAG_RMI_CUSTOM_MAX_STREAM_FORMAT.java new file mode 100644 index 00000000000..e13c759c954 --- /dev/null +++ b/libjava/classpath/org/omg/IOP/TAG_RMI_CUSTOM_MAX_STREAM_FORMAT.java @@ -0,0 +1,61 @@ +/* TAG_RMI_CUSTOM_MAX_STREAM_FORMAT.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.IOP; + +/** + * A single constant interface, defining the + * TAG_RMI_CUSTOM_MAX_STREAM_FORMAT (= 38) tagged component. + * + * This component defines the format that has been used to write the RMI-IIOP + * value type objects in the message. It consists of the single byte, + * having the value of the used version. If this component is missing, + * the default value is assumed to be 1 for GIOP 1.2 and 2 for GIOP 1.3. + * The component can occur only once in the same IOR profile. + * + * @since 1.5 + * + * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org) + */ +public interface TAG_RMI_CUSTOM_MAX_STREAM_FORMAT +{ + /** + * Specifies the TAG_RMI_CUSTOM_MAX_STREAM_FORMAT value, 38. + */ + int value = 38; +} diff --git a/libjava/classpath/org/omg/IOP/TaggedComponentHelper.java b/libjava/classpath/org/omg/IOP/TaggedComponentHelper.java index 906d6390a36..eaee120f081 100644 --- a/libjava/classpath/org/omg/IOP/TaggedComponentHelper.java +++ b/libjava/classpath/org/omg/IOP/TaggedComponentHelper.java @@ -38,6 +38,8 @@ exception statement from your version. */ package org.omg.IOP; +import gnu.CORBA.Minor; + import org.omg.CORBA.Any; import org.omg.CORBA.BAD_OPERATION; import org.omg.CORBA.MARSHAL; @@ -115,6 +117,7 @@ public abstract class TaggedComponentHelper catch (ClassCastException cex) { BAD_OPERATION bad = new BAD_OPERATION("TaggedComponent expected"); + bad.minor = Minor.Any; bad.initCause(cex); throw bad; } @@ -149,6 +152,7 @@ public abstract class TaggedComponentHelper catch (IOException e) { MARSHAL m = new MARSHAL(); + m.minor = Minor.Encapsulation; m.initCause(e); throw m; } @@ -175,6 +179,7 @@ public abstract class TaggedComponentHelper catch (IOException e) { MARSHAL m = new MARSHAL(); + m.minor = Minor.Encapsulation; m.initCause(e); throw m; } diff --git a/libjava/classpath/org/omg/IOP/TaggedProfileHelper.java b/libjava/classpath/org/omg/IOP/TaggedProfileHelper.java index a23122eb975..2943657c01f 100644 --- a/libjava/classpath/org/omg/IOP/TaggedProfileHelper.java +++ b/libjava/classpath/org/omg/IOP/TaggedProfileHelper.java @@ -38,8 +38,9 @@ exception statement from your version. */ package org.omg.IOP; -import gnu.CORBA.CDR.cdrBufInput; -import gnu.CORBA.CDR.cdrBufOutput; +import gnu.CORBA.Minor; +import gnu.CORBA.CDR.BufferredCdrInput; +import gnu.CORBA.CDR.BufferedCdrOutput; import org.omg.CORBA.Any; import org.omg.CORBA.BAD_OPERATION; @@ -118,6 +119,7 @@ public abstract class TaggedProfileHelper catch (ClassCastException cex) { BAD_OPERATION bad = new BAD_OPERATION("TaggedProfile expected"); + bad.minor = Minor.Any; bad.initCause(cex); throw bad; } @@ -143,10 +145,10 @@ public abstract class TaggedProfileHelper TaggedProfile value = new TaggedProfile(); value.tag = input.read_long(); - if (input instanceof cdrBufInput) + if (input instanceof BufferredCdrInput) { // Highly probable. - value.profile_data = ((cdrBufInput) input).read_sequence(); + value.profile_data = ((BufferredCdrInput) input).read_sequence(); } else { @@ -167,7 +169,7 @@ public abstract class TaggedProfileHelper { output.write_long(value.tag); - if (output instanceof cdrBufOutput) + if (output instanceof BufferedCdrOutput) { // Highly probable. output.write_long(value.profile_data.length); @@ -178,6 +180,7 @@ public abstract class TaggedProfileHelper catch (IOException e) { MARSHAL m = new MARSHAL(); + m.minor = Minor.Encapsulation; m.initCause(e); throw m; } |