summaryrefslogtreecommitdiffstats
path: root/libjava/classpath/org
diff options
context:
space:
mode:
authortromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4>2005-07-16 00:30:23 +0000
committertromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4>2005-07-16 00:30:23 +0000
commitc8875fb97fc03779a5bba09872227b1d08e5d52a (patch)
treea0b991cf5866ae1d616639b906ac001811d74508 /libjava/classpath/org
parentc40c1730800ed292b6db39a83d592476fa59623c (diff)
downloadppe42-gcc-c8875fb97fc03779a5bba09872227b1d08e5d52a.tar.gz
ppe42-gcc-c8875fb97fc03779a5bba09872227b1d08e5d52a.zip
Initial revision
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@102074 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava/classpath/org')
-rw-r--r--libjava/classpath/org/ietf/jgss/ChannelBinding.java215
-rw-r--r--libjava/classpath/org/ietf/jgss/GSSContext.java924
-rw-r--r--libjava/classpath/org/ietf/jgss/GSSCredential.java334
-rw-r--r--libjava/classpath/org/ietf/jgss/GSSException.java435
-rw-r--r--libjava/classpath/org/ietf/jgss/GSSManager.java501
-rw-r--r--libjava/classpath/org/ietf/jgss/GSSName.java269
-rw-r--r--libjava/classpath/org/ietf/jgss/MessageProp.java273
-rw-r--r--libjava/classpath/org/ietf/jgss/Oid.java385
-rw-r--r--libjava/classpath/org/omg/CORBA/ARG_IN.java55
-rw-r--r--libjava/classpath/org/omg/CORBA/ARG_INOUT.java57
-rw-r--r--libjava/classpath/org/omg/CORBA/ARG_OUT.java55
-rw-r--r--libjava/classpath/org/omg/CORBA/Any.java454
-rw-r--r--libjava/classpath/org/omg/CORBA/AnyHolder.java119
-rw-r--r--libjava/classpath/org/omg/CORBA/AnySeqHelper.java151
-rw-r--r--libjava/classpath/org/omg/CORBA/AnySeqHolder.java128
-rw-r--r--libjava/classpath/org/omg/CORBA/BAD_CONTEXT.java97
-rw-r--r--libjava/classpath/org/omg/CORBA/BAD_INV_ORDER.java96
-rwxr-xr-xlibjava/classpath/org/omg/CORBA/BAD_OPERATION.java97
-rw-r--r--libjava/classpath/org/omg/CORBA/BAD_PARAM.java96
-rw-r--r--libjava/classpath/org/omg/CORBA/BAD_POLICY.java55
-rw-r--r--libjava/classpath/org/omg/CORBA/BAD_POLICY_TYPE.java55
-rw-r--r--libjava/classpath/org/omg/CORBA/BAD_POLICY_VALUE.java55
-rw-r--r--libjava/classpath/org/omg/CORBA/BAD_TYPECODE.java97
-rw-r--r--libjava/classpath/org/omg/CORBA/BooleanHolder.java127
-rw-r--r--libjava/classpath/org/omg/CORBA/BooleanSeqHelper.java142
-rw-r--r--libjava/classpath/org/omg/CORBA/BooleanSeqHolder.java126
-rw-r--r--libjava/classpath/org/omg/CORBA/Bounds.java71
-rw-r--r--libjava/classpath/org/omg/CORBA/ByteHolder.java127
-rw-r--r--libjava/classpath/org/omg/CORBA/COMM_FAILURE.java97
-rw-r--r--libjava/classpath/org/omg/CORBA/CTX_RESTRICT_SCOPE.java54
-rw-r--r--libjava/classpath/org/omg/CORBA/CharHolder.java126
-rw-r--r--libjava/classpath/org/omg/CORBA/CharSeqHelper.java142
-rw-r--r--libjava/classpath/org/omg/CORBA/CharSeqHolder.java126
-rw-r--r--libjava/classpath/org/omg/CORBA/CompletionStatus.java158
-rw-r--r--libjava/classpath/org/omg/CORBA/CompletionStatusHelper.java140
-rw-r--r--libjava/classpath/org/omg/CORBA/Context.java122
-rw-r--r--libjava/classpath/org/omg/CORBA/ContextList.java85
-rw-r--r--libjava/classpath/org/omg/CORBA/Current.java59
-rw-r--r--libjava/classpath/org/omg/CORBA/CurrentHelper.java180
-rw-r--r--libjava/classpath/org/omg/CORBA/CurrentHolder.java103
-rw-r--r--libjava/classpath/org/omg/CORBA/CurrentOperations.java57
-rw-r--r--libjava/classpath/org/omg/CORBA/CustomMarshal.java68
-rw-r--r--libjava/classpath/org/omg/CORBA/CustomValue.java60
-rw-r--r--libjava/classpath/org/omg/CORBA/DATA_CONVERSION.java97
-rw-r--r--libjava/classpath/org/omg/CORBA/DataInputStream.java276
-rw-r--r--libjava/classpath/org/omg/CORBA/DataOutputStream.java281
-rw-r--r--libjava/classpath/org/omg/CORBA/DefinitionKind.java425
-rw-r--r--libjava/classpath/org/omg/CORBA/DefinitionKindHelper.java137
-rw-r--r--libjava/classpath/org/omg/CORBA/DomainManager.java57
-rw-r--r--libjava/classpath/org/omg/CORBA/DomainManagerOperations.java59
-rw-r--r--libjava/classpath/org/omg/CORBA/DoubleHolder.java127
-rw-r--r--libjava/classpath/org/omg/CORBA/DoubleSeqHelper.java142
-rw-r--r--libjava/classpath/org/omg/CORBA/DoubleSeqHolder.java126
-rw-r--r--libjava/classpath/org/omg/CORBA/DynAny.java505
-rw-r--r--libjava/classpath/org/omg/CORBA/DynAnyPackage/Invalid.java77
-rw-r--r--libjava/classpath/org/omg/CORBA/DynAnyPackage/InvalidSeq.java77
-rw-r--r--libjava/classpath/org/omg/CORBA/DynAnyPackage/InvalidValue.java77
-rw-r--r--libjava/classpath/org/omg/CORBA/DynAnyPackage/TypeMismatch.java77
-rw-r--r--libjava/classpath/org/omg/CORBA/DynAnyPackage/package.html46
-rw-r--r--libjava/classpath/org/omg/CORBA/DynArray.java65
-rw-r--r--libjava/classpath/org/omg/CORBA/DynEnum.java84
-rw-r--r--libjava/classpath/org/omg/CORBA/DynFixed.java77
-rw-r--r--libjava/classpath/org/omg/CORBA/DynSequence.java78
-rw-r--r--libjava/classpath/org/omg/CORBA/DynStruct.java89
-rw-r--r--libjava/classpath/org/omg/CORBA/DynUnion.java99
-rw-r--r--libjava/classpath/org/omg/CORBA/DynValue.java88
-rw-r--r--libjava/classpath/org/omg/CORBA/DynamicImplementation.java81
-rw-r--r--libjava/classpath/org/omg/CORBA/Environment.java70
-rw-r--r--libjava/classpath/org/omg/CORBA/ExceptionList.java73
-rw-r--r--libjava/classpath/org/omg/CORBA/FREE_MEM.java96
-rw-r--r--libjava/classpath/org/omg/CORBA/FieldNameHelper.java116
-rw-r--r--libjava/classpath/org/omg/CORBA/FixedHolder.java126
-rw-r--r--libjava/classpath/org/omg/CORBA/FloatHolder.java127
-rw-r--r--libjava/classpath/org/omg/CORBA/FloatSeqHelper.java142
-rw-r--r--libjava/classpath/org/omg/CORBA/FloatSeqHolder.java126
-rw-r--r--libjava/classpath/org/omg/CORBA/IDLEntity.java50
-rw-r--r--libjava/classpath/org/omg/CORBA/IDLType.java55
-rw-r--r--libjava/classpath/org/omg/CORBA/IDLTypeHelper.java139
-rw-r--r--libjava/classpath/org/omg/CORBA/IDLTypeOperations.java56
-rw-r--r--libjava/classpath/org/omg/CORBA/IMP_LIMIT.java97
-rw-r--r--libjava/classpath/org/omg/CORBA/INITIALIZE.java96
-rw-r--r--libjava/classpath/org/omg/CORBA/INTERNAL.java96
-rw-r--r--libjava/classpath/org/omg/CORBA/INTF_REPOS.java96
-rw-r--r--libjava/classpath/org/omg/CORBA/INVALID_TRANSACTION.java96
-rw-r--r--libjava/classpath/org/omg/CORBA/INV_FLAG.java96
-rw-r--r--libjava/classpath/org/omg/CORBA/INV_IDENT.java96
-rw-r--r--libjava/classpath/org/omg/CORBA/INV_OBJREF.java96
-rw-r--r--libjava/classpath/org/omg/CORBA/INV_POLICY.java98
-rw-r--r--libjava/classpath/org/omg/CORBA/IRObject.java53
-rw-r--r--libjava/classpath/org/omg/CORBA/IRObjectOperations.java68
-rw-r--r--libjava/classpath/org/omg/CORBA/IdentifierHelper.java116
-rw-r--r--libjava/classpath/org/omg/CORBA/IntHolder.java126
-rw-r--r--libjava/classpath/org/omg/CORBA/LocalObject.java235
-rw-r--r--libjava/classpath/org/omg/CORBA/LongHolder.java127
-rw-r--r--libjava/classpath/org/omg/CORBA/LongLongSeqHelper.java142
-rw-r--r--libjava/classpath/org/omg/CORBA/LongLongSeqHolder.java126
-rw-r--r--libjava/classpath/org/omg/CORBA/LongSeqHelper.java142
-rw-r--r--libjava/classpath/org/omg/CORBA/LongSeqHolder.java128
-rw-r--r--libjava/classpath/org/omg/CORBA/MARSHAL.java97
-rw-r--r--libjava/classpath/org/omg/CORBA/NO_IMPLEMENT.java97
-rw-r--r--libjava/classpath/org/omg/CORBA/NO_MEMORY.java96
-rw-r--r--libjava/classpath/org/omg/CORBA/NO_PERMISSION.java96
-rw-r--r--libjava/classpath/org/omg/CORBA/NO_RESOURCES.java97
-rw-r--r--libjava/classpath/org/omg/CORBA/NO_RESPONSE.java97
-rw-r--r--libjava/classpath/org/omg/CORBA/NVList.java117
-rw-r--r--libjava/classpath/org/omg/CORBA/NameValuePair.java90
-rw-r--r--libjava/classpath/org/omg/CORBA/NameValuePairHelper.java141
-rw-r--r--libjava/classpath/org/omg/CORBA/NamedValue.java71
-rw-r--r--libjava/classpath/org/omg/CORBA/OBJECT_NOT_EXIST.java95
-rw-r--r--libjava/classpath/org/omg/CORBA/OBJ_ADAPTER.java96
-rw-r--r--libjava/classpath/org/omg/CORBA/OMGVMCID.java54
-rw-r--r--libjava/classpath/org/omg/CORBA/ORB.java1101
-rw-r--r--libjava/classpath/org/omg/CORBA/ORBPackage/InconsistentTypeCode.java79
-rw-r--r--libjava/classpath/org/omg/CORBA/ORBPackage/InvalidName.java79
-rw-r--r--libjava/classpath/org/omg/CORBA/ORBPackage/package.html46
-rw-r--r--libjava/classpath/org/omg/CORBA/Object.java191
-rw-r--r--libjava/classpath/org/omg/CORBA/ObjectHelper.java113
-rw-r--r--libjava/classpath/org/omg/CORBA/ObjectHolder.java127
-rw-r--r--libjava/classpath/org/omg/CORBA/OctetSeqHelper.java142
-rw-r--r--libjava/classpath/org/omg/CORBA/OctetSeqHolder.java126
-rw-r--r--libjava/classpath/org/omg/CORBA/PERSIST_STORE.java96
-rw-r--r--libjava/classpath/org/omg/CORBA/PRIVATE_MEMBER.java55
-rw-r--r--libjava/classpath/org/omg/CORBA/PUBLIC_MEMBER.java55
-rw-r--r--libjava/classpath/org/omg/CORBA/ParameterMode.java142
-rw-r--r--libjava/classpath/org/omg/CORBA/ParameterModeHelper.java125
-rw-r--r--libjava/classpath/org/omg/CORBA/ParameterModeHolder.java93
-rw-r--r--libjava/classpath/org/omg/CORBA/Policy.java55
-rw-r--r--libjava/classpath/org/omg/CORBA/PolicyError.java102
-rw-r--r--libjava/classpath/org/omg/CORBA/PolicyHelper.java164
-rw-r--r--libjava/classpath/org/omg/CORBA/PolicyHolder.java106
-rw-r--r--libjava/classpath/org/omg/CORBA/PolicyListHelper.java149
-rw-r--r--libjava/classpath/org/omg/CORBA/PolicyListHolder.java106
-rw-r--r--libjava/classpath/org/omg/CORBA/PolicyOperations.java70
-rw-r--r--libjava/classpath/org/omg/CORBA/PolicyTypeHelper.java122
-rw-r--r--libjava/classpath/org/omg/CORBA/Principal.java89
-rw-r--r--libjava/classpath/org/omg/CORBA/PrincipalHolder.java122
-rw-r--r--libjava/classpath/org/omg/CORBA/RepositoryIdHelper.java116
-rw-r--r--libjava/classpath/org/omg/CORBA/Request.java242
-rw-r--r--libjava/classpath/org/omg/CORBA/ServerRequest.java164
-rw-r--r--libjava/classpath/org/omg/CORBA/ServiceDetail.java81
-rw-r--r--libjava/classpath/org/omg/CORBA/ServiceDetailHelper.java172
-rw-r--r--libjava/classpath/org/omg/CORBA/ServiceInformation.java88
-rw-r--r--libjava/classpath/org/omg/CORBA/ServiceInformationHelper.java154
-rw-r--r--libjava/classpath/org/omg/CORBA/ServiceInformationHolder.java101
-rw-r--r--libjava/classpath/org/omg/CORBA/SetOverrideType.java136
-rw-r--r--libjava/classpath/org/omg/CORBA/SetOverrideTypeHelper.java128
-rw-r--r--libjava/classpath/org/omg/CORBA/ShortHolder.java127
-rw-r--r--libjava/classpath/org/omg/CORBA/ShortSeqHelper.java142
-rw-r--r--libjava/classpath/org/omg/CORBA/ShortSeqHolder.java126
-rw-r--r--libjava/classpath/org/omg/CORBA/StringHolder.java128
-rw-r--r--libjava/classpath/org/omg/CORBA/StringSeqHelper.java144
-rwxr-xr-xlibjava/classpath/org/omg/CORBA/StringSeqHolder.java131
-rw-r--r--libjava/classpath/org/omg/CORBA/StringValueHelper.java198
-rw-r--r--libjava/classpath/org/omg/CORBA/StructMember.java94
-rw-r--r--libjava/classpath/org/omg/CORBA/StructMemberHelper.java177
-rw-r--r--libjava/classpath/org/omg/CORBA/SystemException.java82
-rw-r--r--libjava/classpath/org/omg/CORBA/TCKind.java504
-rw-r--r--libjava/classpath/org/omg/CORBA/TRANSACTION_REQUIRED.java96
-rw-r--r--libjava/classpath/org/omg/CORBA/TRANSACTION_ROLLEDBACK.java97
-rw-r--r--libjava/classpath/org/omg/CORBA/TRANSIENT.java97
-rw-r--r--libjava/classpath/org/omg/CORBA/TypeCode.java271
-rw-r--r--libjava/classpath/org/omg/CORBA/TypeCodeHolder.java123
-rw-r--r--libjava/classpath/org/omg/CORBA/TypeCodePackage/BadKind.java76
-rw-r--r--libjava/classpath/org/omg/CORBA/TypeCodePackage/Bounds.java79
-rw-r--r--libjava/classpath/org/omg/CORBA/TypeCodePackage/package.html46
-rw-r--r--libjava/classpath/org/omg/CORBA/ULongLongSeqHelper.java142
-rw-r--r--libjava/classpath/org/omg/CORBA/ULongLongSeqHolder.java126
-rw-r--r--libjava/classpath/org/omg/CORBA/ULongSeqHelper.java142
-rw-r--r--libjava/classpath/org/omg/CORBA/ULongSeqHolder.java126
-rw-r--r--libjava/classpath/org/omg/CORBA/UNKNOWN.java95
-rw-r--r--libjava/classpath/org/omg/CORBA/UNSUPPORTED_POLICY.java56
-rw-r--r--libjava/classpath/org/omg/CORBA/UNSUPPORTED_POLICY_VALUE.java56
-rw-r--r--libjava/classpath/org/omg/CORBA/UShortSeqHelper.java142
-rw-r--r--libjava/classpath/org/omg/CORBA/UShortSeqHolder.java126
-rw-r--r--libjava/classpath/org/omg/CORBA/UnionMember.java102
-rw-r--r--libjava/classpath/org/omg/CORBA/UnionMemberHelper.java179
-rw-r--r--libjava/classpath/org/omg/CORBA/UnknownUserException.java87
-rw-r--r--libjava/classpath/org/omg/CORBA/UserException.java74
-rw-r--r--libjava/classpath/org/omg/CORBA/VM_ABSTRACT.java52
-rw-r--r--libjava/classpath/org/omg/CORBA/VM_CUSTOM.java53
-rw-r--r--libjava/classpath/org/omg/CORBA/VM_NONE.java52
-rw-r--r--libjava/classpath/org/omg/CORBA/VM_TRUNCATABLE.java53
-rw-r--r--libjava/classpath/org/omg/CORBA/ValueBaseHelper.java135
-rw-r--r--libjava/classpath/org/omg/CORBA/ValueBaseHolder.java109
-rw-r--r--libjava/classpath/org/omg/CORBA/ValueMember.java124
-rw-r--r--libjava/classpath/org/omg/CORBA/ValueMemberHelper.java207
-rw-r--r--libjava/classpath/org/omg/CORBA/VersionSpecHelper.java116
-rw-r--r--libjava/classpath/org/omg/CORBA/VisibilityHelper.java127
-rw-r--r--libjava/classpath/org/omg/CORBA/WCharSeqHelper.java142
-rw-r--r--libjava/classpath/org/omg/CORBA/WCharSeqHolder.java126
-rw-r--r--libjava/classpath/org/omg/CORBA/WStringSeqHelper.java148
-rwxr-xr-xlibjava/classpath/org/omg/CORBA/WStringSeqHolder.java131
-rw-r--r--libjava/classpath/org/omg/CORBA/WStringValueHelper.java198
-rw-r--r--libjava/classpath/org/omg/CORBA/WrongTransaction.java70
-rw-r--r--libjava/classpath/org/omg/CORBA/_IDLTypeStub.java197
-rw-r--r--libjava/classpath/org/omg/CORBA/_PolicyStub.java176
-rw-r--r--libjava/classpath/org/omg/CORBA/package.html82
-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.java433
-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.java286
-rw-r--r--libjava/classpath/org/omg/CORBA/portable/InvokeHandler.java66
-rw-r--r--libjava/classpath/org/omg/CORBA/portable/ObjectImpl.java402
-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
-rw-r--r--libjava/classpath/org/omg/CORBA_2_3/ORB.java130
-rw-r--r--libjava/classpath/org/omg/CORBA_2_3/package.html46
-rw-r--r--libjava/classpath/org/omg/CORBA_2_3/portable/Delegate.java67
-rw-r--r--libjava/classpath/org/omg/CORBA_2_3/portable/InputStream.java208
-rw-r--r--libjava/classpath/org/omg/CORBA_2_3/portable/ObjectImpl.java82
-rw-r--r--libjava/classpath/org/omg/CORBA_2_3/portable/OutputStream.java156
-rw-r--r--libjava/classpath/org/omg/CORBA_2_3/portable/package.html47
-rw-r--r--libjava/classpath/org/omg/CosNaming/Binding.java81
-rw-r--r--libjava/classpath/org/omg/CosNaming/BindingHelper.java138
-rw-r--r--libjava/classpath/org/omg/CosNaming/BindingHolder.java94
-rw-r--r--libjava/classpath/org/omg/CosNaming/BindingIterator.java87
-rw-r--r--libjava/classpath/org/omg/CosNaming/BindingIteratorHelper.java150
-rw-r--r--libjava/classpath/org/omg/CosNaming/BindingIteratorHolder.java97
-rw-r--r--libjava/classpath/org/omg/CosNaming/BindingIteratorOperations.java78
-rw-r--r--libjava/classpath/org/omg/CosNaming/BindingListHelper.java134
-rw-r--r--libjava/classpath/org/omg/CosNaming/BindingListHolder.java97
-rw-r--r--libjava/classpath/org/omg/CosNaming/BindingType.java129
-rw-r--r--libjava/classpath/org/omg/CosNaming/BindingTypeHelper.java124
-rw-r--r--libjava/classpath/org/omg/CosNaming/BindingTypeHolder.java93
-rw-r--r--libjava/classpath/org/omg/CosNaming/IstringHelper.java120
-rw-r--r--libjava/classpath/org/omg/CosNaming/NameComponent.java118
-rw-r--r--libjava/classpath/org/omg/CosNaming/NameComponentHelper.java142
-rw-r--r--libjava/classpath/org/omg/CosNaming/NameComponentHolder.java97
-rw-r--r--libjava/classpath/org/omg/CosNaming/NameHelper.java137
-rw-r--r--libjava/classpath/org/omg/CosNaming/NameHolder.java99
-rw-r--r--libjava/classpath/org/omg/CosNaming/NamingContext.java197
-rw-r--r--libjava/classpath/org/omg/CosNaming/NamingContextExt.java55
-rw-r--r--libjava/classpath/org/omg/CosNaming/NamingContextExtHelper.java154
-rw-r--r--libjava/classpath/org/omg/CosNaming/NamingContextExtHolder.java97
-rw-r--r--libjava/classpath/org/omg/CosNaming/NamingContextExtOperations.java97
-rw-r--r--libjava/classpath/org/omg/CosNaming/NamingContextExtPackage/AddressHelper.java119
-rw-r--r--libjava/classpath/org/omg/CosNaming/NamingContextExtPackage/InvalidAddress.java76
-rw-r--r--libjava/classpath/org/omg/CosNaming/NamingContextExtPackage/InvalidAddressHelper.java122
-rw-r--r--libjava/classpath/org/omg/CosNaming/NamingContextExtPackage/InvalidAddressHolder.java97
-rw-r--r--libjava/classpath/org/omg/CosNaming/NamingContextExtPackage/StringNameHelper.java120
-rw-r--r--libjava/classpath/org/omg/CosNaming/NamingContextExtPackage/URLStringHelper.java119
-rw-r--r--libjava/classpath/org/omg/CosNaming/NamingContextExtPackage/package.html47
-rw-r--r--libjava/classpath/org/omg/CosNaming/NamingContextHelper.java159
-rw-r--r--libjava/classpath/org/omg/CosNaming/NamingContextHolder.java97
-rw-r--r--libjava/classpath/org/omg/CosNaming/NamingContextOperations.java176
-rw-r--r--libjava/classpath/org/omg/CosNaming/NamingContextPackage/AlreadyBound.java75
-rw-r--r--libjava/classpath/org/omg/CosNaming/NamingContextPackage/AlreadyBoundHelper.java128
-rw-r--r--libjava/classpath/org/omg/CosNaming/NamingContextPackage/AlreadyBoundHolder.java97
-rw-r--r--libjava/classpath/org/omg/CosNaming/NamingContextPackage/CannotProceed.java102
-rw-r--r--libjava/classpath/org/omg/CosNaming/NamingContextPackage/CannotProceedHelper.java147
-rw-r--r--libjava/classpath/org/omg/CosNaming/NamingContextPackage/CannotProceedHolder.java97
-rw-r--r--libjava/classpath/org/omg/CosNaming/NamingContextPackage/InvalidName.java76
-rw-r--r--libjava/classpath/org/omg/CosNaming/NamingContextPackage/InvalidNameHelper.java133
-rw-r--r--libjava/classpath/org/omg/CosNaming/NamingContextPackage/InvalidNameHolder.java97
-rw-r--r--libjava/classpath/org/omg/CosNaming/NamingContextPackage/NotEmpty.java74
-rw-r--r--libjava/classpath/org/omg/CosNaming/NamingContextPackage/NotEmptyHelper.java128
-rw-r--r--libjava/classpath/org/omg/CosNaming/NamingContextPackage/NotEmptyHolder.java97
-rw-r--r--libjava/classpath/org/omg/CosNaming/NamingContextPackage/NotFound.java101
-rw-r--r--libjava/classpath/org/omg/CosNaming/NamingContextPackage/NotFoundHelper.java145
-rw-r--r--libjava/classpath/org/omg/CosNaming/NamingContextPackage/NotFoundHolder.java97
-rw-r--r--libjava/classpath/org/omg/CosNaming/NamingContextPackage/NotFoundReason.java134
-rw-r--r--libjava/classpath/org/omg/CosNaming/NamingContextPackage/NotFoundReasonHelper.java128
-rw-r--r--libjava/classpath/org/omg/CosNaming/NamingContextPackage/NotFoundReasonHolder.java98
-rw-r--r--libjava/classpath/org/omg/CosNaming/NamingContextPackage/package.html46
-rw-r--r--libjava/classpath/org/omg/CosNaming/_BindingIteratorImplBase.java136
-rw-r--r--libjava/classpath/org/omg/CosNaming/_BindingIteratorStub.java203
-rw-r--r--libjava/classpath/org/omg/CosNaming/_NamingContextExtImplBase.java237
-rw-r--r--libjava/classpath/org/omg/CosNaming/_NamingContextExtStub.java210
-rw-r--r--libjava/classpath/org/omg/CosNaming/_NamingContextImplBase.java412
-rw-r--r--libjava/classpath/org/omg/CosNaming/_NamingContextStub.java455
-rw-r--r--libjava/classpath/org/omg/CosNaming/package.html50
-rw-r--r--libjava/classpath/org/omg/Dynamic/Parameter.java90
-rw-r--r--libjava/classpath/org/omg/DynamicAny/DynAnyFactoryPackage/InconsistentTypeCode.java82
-rw-r--r--libjava/classpath/org/omg/DynamicAny/DynAnyFactoryPackage/InconsistentTypeCodeHelper.java148
-rw-r--r--libjava/classpath/org/omg/DynamicAny/DynAnyPackage/InvalidValue.java81
-rw-r--r--libjava/classpath/org/omg/DynamicAny/DynAnyPackage/InvalidValueHelper.java149
-rw-r--r--libjava/classpath/org/omg/DynamicAny/DynAnyPackage/TypeMismatch.java81
-rw-r--r--libjava/classpath/org/omg/DynamicAny/DynAnyPackage/TypeMismatchHelper.java149
-rw-r--r--libjava/classpath/org/omg/DynamicAny/DynAnyPackage/package.html49
-rw-r--r--libjava/classpath/org/omg/IOP/CodeSets.java62
-rw-r--r--libjava/classpath/org/omg/IOP/Codec.java71
-rw-r--r--libjava/classpath/org/omg/IOP/CodecFactory.java67
-rw-r--r--libjava/classpath/org/omg/IOP/CodecFactoryHelper.java152
-rw-r--r--libjava/classpath/org/omg/IOP/CodecFactoryOperations.java63
-rw-r--r--libjava/classpath/org/omg/IOP/CodecFactoryPackage/UnknownEncoding.java78
-rw-r--r--libjava/classpath/org/omg/IOP/CodecFactoryPackage/UnknownEncodingHelper.java150
-rw-r--r--libjava/classpath/org/omg/IOP/CodecOperations.java126
-rw-r--r--libjava/classpath/org/omg/IOP/CodecPackage/FormatMismatch.java81
-rw-r--r--libjava/classpath/org/omg/IOP/CodecPackage/FormatMismatchHelper.java146
-rw-r--r--libjava/classpath/org/omg/IOP/CodecPackage/InvalidTypeForEncoding.java81
-rw-r--r--libjava/classpath/org/omg/IOP/CodecPackage/InvalidTypeForEncodingHelper.java149
-rw-r--r--libjava/classpath/org/omg/IOP/CodecPackage/TypeMismatch.java79
-rw-r--r--libjava/classpath/org/omg/IOP/CodecPackage/TypeMismatchHelper.java146
-rw-r--r--libjava/classpath/org/omg/IOP/ComponentIdHelper.java122
-rw-r--r--libjava/classpath/org/omg/IOP/ENCODING_CDR_ENCAPS.java58
-rw-r--r--libjava/classpath/org/omg/IOP/Encoding.java98
-rw-r--r--libjava/classpath/org/omg/IOP/IOR.java112
-rw-r--r--libjava/classpath/org/omg/IOP/IORHelper.java163
-rw-r--r--libjava/classpath/org/omg/IOP/IORHolder.java103
-rw-r--r--libjava/classpath/org/omg/IOP/MultipleComponentProfileHelper.java144
-rw-r--r--libjava/classpath/org/omg/IOP/MultipleComponentProfileHolder.java105
-rw-r--r--libjava/classpath/org/omg/IOP/ProfileIdHelper.java123
-rw-r--r--libjava/classpath/org/omg/IOP/ServiceContext.java95
-rw-r--r--libjava/classpath/org/omg/IOP/ServiceContextHelper.java163
-rw-r--r--libjava/classpath/org/omg/IOP/ServiceContextHolder.java103
-rw-r--r--libjava/classpath/org/omg/IOP/ServiceContextListHelper.java142
-rw-r--r--libjava/classpath/org/omg/IOP/ServiceContextListHolder.java103
-rw-r--r--libjava/classpath/org/omg/IOP/ServiceIdHelper.java123
-rw-r--r--libjava/classpath/org/omg/IOP/TAG_ALTERNATE_IIOP_ADDRESS.java59
-rw-r--r--libjava/classpath/org/omg/IOP/TAG_CODE_SETS.java69
-rw-r--r--libjava/classpath/org/omg/IOP/TAG_INTERNET_IOP.java55
-rw-r--r--libjava/classpath/org/omg/IOP/TAG_JAVA_CODEBASE.java59
-rw-r--r--libjava/classpath/org/omg/IOP/TAG_MULTIPLE_COMPONENTS.java52
-rw-r--r--libjava/classpath/org/omg/IOP/TAG_ORB_TYPE.java67
-rw-r--r--libjava/classpath/org/omg/IOP/TAG_POLICIES.java54
-rw-r--r--libjava/classpath/org/omg/IOP/TaggedComponent.java93
-rw-r--r--libjava/classpath/org/omg/IOP/TaggedComponentHelper.java167
-rw-r--r--libjava/classpath/org/omg/IOP/TaggedComponentHolder.java103
-rw-r--r--libjava/classpath/org/omg/IOP/TaggedProfile.java110
-rw-r--r--libjava/classpath/org/omg/IOP/TaggedProfileHelper.java161
-rw-r--r--libjava/classpath/org/omg/IOP/TaggedProfileHolder.java103
-rw-r--r--libjava/classpath/org/omg/IOP/TransactionService.java56
-rw-r--r--libjava/classpath/org/omg/Messaging/SYNC_WITH_TRANSPORT.java74
-rw-r--r--libjava/classpath/org/omg/Messaging/SyncScopeHelper.java121
-rw-r--r--libjava/classpath/org/omg/Messaging/package.html64
-rw-r--r--libjava/classpath/org/omg/PortableInterceptor/LOCATION_FORWARD.java53
-rw-r--r--libjava/classpath/org/omg/PortableInterceptor/ORBInitInfoPackage/DuplicateName.java103
-rw-r--r--libjava/classpath/org/omg/PortableInterceptor/ORBInitInfoPackage/DuplicateNameHelper.java154
-rw-r--r--libjava/classpath/org/omg/PortableInterceptor/ORBInitInfoPackage/InvalidName.java80
-rw-r--r--libjava/classpath/org/omg/PortableInterceptor/ORBInitInfoPackage/InvalidNameHelper.java146
-rw-r--r--libjava/classpath/org/omg/PortableInterceptor/ORBInitInfoPackage/ObjectIdHelper.java117
-rw-r--r--libjava/classpath/org/omg/PortableInterceptor/SUCCESSFUL.java53
-rw-r--r--libjava/classpath/org/omg/PortableInterceptor/SYSTEM_EXCEPTION.java54
-rw-r--r--libjava/classpath/org/omg/PortableInterceptor/TRANSPORT_RETRY.java54
-rw-r--r--libjava/classpath/org/omg/PortableInterceptor/USER_EXCEPTION.java54
-rw-r--r--libjava/classpath/org/omg/PortableServer/CurrentPackage/NoContext.java82
-rw-r--r--libjava/classpath/org/omg/PortableServer/CurrentPackage/NoContextHelper.java148
-rw-r--r--libjava/classpath/org/omg/PortableServer/ID_ASSIGNMENT_POLICY_ID.java53
-rw-r--r--libjava/classpath/org/omg/PortableServer/ID_UNIQUENESS_POLICY_ID.java53
-rw-r--r--libjava/classpath/org/omg/PortableServer/IMPLICIT_ACTIVATION_POLICY_ID.java53
-rw-r--r--libjava/classpath/org/omg/PortableServer/IdAssignmentPolicyValue.java153
-rw-r--r--libjava/classpath/org/omg/PortableServer/IdUniquenessPolicyValue.java153
-rw-r--r--libjava/classpath/org/omg/PortableServer/ImplicitActivationPolicyValue.java153
-rw-r--r--libjava/classpath/org/omg/PortableServer/LIFESPAN_POLICY_ID.java52
-rw-r--r--libjava/classpath/org/omg/PortableServer/LifespanPolicyValue.java150
-rw-r--r--libjava/classpath/org/omg/PortableServer/POAManagerPackage/AdapterInactive.java79
-rw-r--r--libjava/classpath/org/omg/PortableServer/POAManagerPackage/AdapterInactiveHelper.java149
-rw-r--r--libjava/classpath/org/omg/PortableServer/POAManagerPackage/State.java177
-rw-r--r--libjava/classpath/org/omg/PortableServer/POAManagerPackage/package.html46
-rw-r--r--libjava/classpath/org/omg/PortableServer/POAPackage/AdapterAlreadyExists.java79
-rw-r--r--libjava/classpath/org/omg/PortableServer/POAPackage/AdapterAlreadyExistsHelper.java150
-rw-r--r--libjava/classpath/org/omg/PortableServer/POAPackage/AdapterNonExistent.java79
-rw-r--r--libjava/classpath/org/omg/PortableServer/POAPackage/AdapterNonExistentHelper.java149
-rw-r--r--libjava/classpath/org/omg/PortableServer/POAPackage/InvalidPolicy.java109
-rw-r--r--libjava/classpath/org/omg/PortableServer/POAPackage/InvalidPolicyHelper.java155
-rw-r--r--libjava/classpath/org/omg/PortableServer/POAPackage/NoServant.java79
-rw-r--r--libjava/classpath/org/omg/PortableServer/POAPackage/NoServantHelper.java149
-rw-r--r--libjava/classpath/org/omg/PortableServer/POAPackage/ObjectAlreadyActive.java78
-rw-r--r--libjava/classpath/org/omg/PortableServer/POAPackage/ObjectAlreadyActiveHelper.java150
-rw-r--r--libjava/classpath/org/omg/PortableServer/POAPackage/ObjectNotActive.java79
-rw-r--r--libjava/classpath/org/omg/PortableServer/POAPackage/ObjectNotActiveHelper.java149
-rw-r--r--libjava/classpath/org/omg/PortableServer/POAPackage/ServantAlreadyActive.java83
-rw-r--r--libjava/classpath/org/omg/PortableServer/POAPackage/ServantAlreadyActiveHelper.java150
-rw-r--r--libjava/classpath/org/omg/PortableServer/POAPackage/ServantNotActive.java79
-rw-r--r--libjava/classpath/org/omg/PortableServer/POAPackage/ServantNotActiveHelper.java149
-rw-r--r--libjava/classpath/org/omg/PortableServer/POAPackage/WrongAdapter.java80
-rw-r--r--libjava/classpath/org/omg/PortableServer/POAPackage/WrongAdapterHelper.java149
-rw-r--r--libjava/classpath/org/omg/PortableServer/POAPackage/WrongPolicy.java79
-rw-r--r--libjava/classpath/org/omg/PortableServer/POAPackage/WrongPolicyHelper.java149
-rw-r--r--libjava/classpath/org/omg/PortableServer/POAPackage/package.html49
-rw-r--r--libjava/classpath/org/omg/PortableServer/REQUEST_PROCESSING_POLICY_ID.java52
-rw-r--r--libjava/classpath/org/omg/PortableServer/RequestProcessingPolicyValue.java176
-rw-r--r--libjava/classpath/org/omg/PortableServer/SERVANT_RETENTION_POLICY_ID.java52
-rw-r--r--libjava/classpath/org/omg/PortableServer/ServantLocatorPackage/CookieHolder.java114
-rw-r--r--libjava/classpath/org/omg/PortableServer/ServantLocatorPackage/package.html49
-rw-r--r--libjava/classpath/org/omg/PortableServer/ServantRetentionPolicyValue.java150
-rw-r--r--libjava/classpath/org/omg/PortableServer/THREAD_POLICY_ID.java52
-rw-r--r--libjava/classpath/org/omg/SendingContext/RunTime.java60
-rw-r--r--libjava/classpath/org/omg/SendingContext/RunTimeOperations.java57
-rw-r--r--libjava/classpath/org/omg/SendingContext/package.html0
-rw-r--r--libjava/classpath/org/omg/stub/java/rmi/_Remote_Stub.java78
-rw-r--r--libjava/classpath/org/omg/stub/java/rmi/package.html48
394 files changed, 48218 insertions, 0 deletions
diff --git a/libjava/classpath/org/ietf/jgss/ChannelBinding.java b/libjava/classpath/org/ietf/jgss/ChannelBinding.java
new file mode 100644
index 00000000000..9ea266de554
--- /dev/null
+++ b/libjava/classpath/org/ietf/jgss/ChannelBinding.java
@@ -0,0 +1,215 @@
+/* ChannelBinding.java -- a channel binding in the GSS-API.
+ Copyright (C) 2004 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.
+
+ The documentation comments of this class are derived from the text
+ of RFC 2853: Generic Security Service API Version 2: Java Bindings.
+ That document is covered under the following license notice:
+
+Copyright (C) The Internet Society (2000). All Rights Reserved.
+
+This document and translations of it may be copied and furnished to
+others, and derivative works that comment on or otherwise explain it
+or assist in its implementation may be prepared, copied, published and
+distributed, in whole or in part, without restriction of any kind,
+provided that the above copyright notice and this paragraph are
+included on all such copies and derivative works. However, this
+document itself may not be modified in any way, such as by removing
+the copyright notice or references to the Internet Society or other
+Internet organizations, except as needed for the purpose of developing
+Internet standards in which case the procedures for copyrights defined
+in the Internet Standards process must be followed, or as required to
+translate it into languages other than English.
+
+The limited permissions granted above are perpetual and will not be
+revoked by the Internet Society or its successors or assigns.
+
+This document and the information contained herein is provided on an
+"AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING
+TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT
+NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN
+WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF
+MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. */
+
+
+package org.ietf.jgss;
+
+import java.net.InetAddress;
+import java.util.Arrays;
+
+/**
+ * <p>The GSS-API accommodates the concept of caller-provided channel
+ * binding information. Channel bindings are used to strengthen the
+ * quality with which peer entity authentication is provided during
+ * context establishment. They enable the GSS-API callers to bind the
+ * establishment of the security context to relevant characteristics
+ * like addresses or to application specific data.</p>
+ *
+ * <p>The caller initiating the security context must determine the
+ * appropriate channel binding values to set in the {@link GSSContext}
+ * object. The acceptor must provide an identical binding in order to
+ * validate that received tokens possess correct channel-related
+ * characteristics.</p>
+ *
+ * <p>Use of channel bindings is optional in GSS-API. Since channel-binding
+ * information may be transmitted in context establishment tokens,
+ * applications should therefore not use confidential data as
+ * channel-binding components.</p>
+ */
+public class ChannelBinding
+{
+
+ // Fields.
+ // -------------------------------------------------------------------------
+
+ private final byte[] appData;
+ private final InetAddress initAddr;
+ private final InetAddress acceptAddr;
+
+ // Constructor.
+ // -------------------------------------------------------------------------
+
+ /**
+ * Create a ChannelBinding object with user supplied address information
+ * and data. <code>null</code> values can be used for any fields which the
+ * application does not want to specify.
+ *
+ * @param initAddr The address of the context initiator. <code>null</code>
+ * value can be supplied to indicate that the application
+ * does not want to set this value.
+ * @param acceptAddr The address of the context acceptor. <code>null</code>
+ * value can be supplied to indicate that the application
+ * does not want to set this value.
+ * @param appData Application supplied data to be used as part of the
+ * channel bindings. <code>null</code> value can be
+ * supplied to indicate that the application does not
+ * want to set this value.
+ */
+ public ChannelBinding(InetAddress initAddr, InetAddress acceptAddr,
+ byte[] appData)
+ {
+ this.appData = (appData != null) ? (byte[]) appData.clone() : null;
+ this.initAddr = initAddr;
+ this.acceptAddr = acceptAddr;
+ }
+
+ /**
+ * Creates a ChannelBinding object without any addressing information.
+ *
+ * @param appData Application supplied data to be used as part of the
+ * channel bindings.
+ */
+ public ChannelBinding(byte[] appData)
+ {
+ this(null, null, appData);
+ }
+
+ // Instance methods.
+ // -------------------------------------------------------------------------
+
+ /**
+ * Returns the initiator's address for this channel binding.
+ * <code>null</code> is returned if the address has not been set.
+ *
+ * @return The initiator's address, or <code>null</code>.
+ */
+ public InetAddress getInitiatorAddress()
+ {
+ return initAddr;
+ }
+
+ /**
+ * Returns the acceptor's address for this channel binding.
+ * <code>null</code> is returned if the address has not been set.
+ *
+ * @return The acceptor's address, or <code>null</code>.
+ */
+ public InetAddress getAcceptorAddress()
+ {
+ return acceptAddr;
+ }
+
+ /**
+ * Returns application data being used as part of the ChannelBinding.
+ * <code>null</code> is returned if no application data has been
+ * specified for the channel binding.
+ *
+ * @return The application data, or <code>null</code>.
+ */
+ public byte[] getApplicationData()
+ {
+ if (appData != null)
+ return (byte[]) appData.clone();
+ return null;
+ }
+
+ /**
+ * Returns <code>true</code> if two channel bindings match.
+ *
+ * @param obj Another channel binding to compare with.
+ * @return True if this channel binding equals the other.
+ */
+ public boolean equals(Object obj)
+ {
+ if (!(obj instanceof ChannelBinding))
+ return false;
+ ChannelBinding cb = (ChannelBinding) obj;
+ boolean b1 = Arrays.equals(appData, cb.appData);
+ boolean b2 = (initAddr == null && cb.initAddr == null)
+ || (cb.initAddr != null && initAddr.equals(cb.initAddr));
+ boolean b3 = (acceptAddr == null && cb.acceptAddr == null)
+ || (cb.acceptAddr != null && acceptAddr.equals(cb.acceptAddr));
+ return b1 && b2 && b3;
+ }
+
+ /**
+ * Returns the hash code for this channel binding.
+ *
+ * @return The hash code.
+ */
+ public int hashCode()
+ {
+ int code = 0;
+ if (appData != null)
+ for (int i = 0; i < appData.length; i++)
+ code ^= appData[i] << ((8 * i) & 31);
+ if (initAddr != null)
+ code ^= initAddr.hashCode();
+ if (acceptAddr != null)
+ code ^= acceptAddr.hashCode();
+ return code;
+ }
+}
diff --git a/libjava/classpath/org/ietf/jgss/GSSContext.java b/libjava/classpath/org/ietf/jgss/GSSContext.java
new file mode 100644
index 00000000000..6f469e235a3
--- /dev/null
+++ b/libjava/classpath/org/ietf/jgss/GSSContext.java
@@ -0,0 +1,924 @@
+/* GSSContext.java -- The GSS context interface.
+ Copyright (C) 2004 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.ietf.jgss;
+
+import java.io.InputStream;
+import java.io.OutputStream;
+
+/**
+ * <p>This interface encapsulates the GSS-API security context and provides
+ * the security services ({@link #wrap(byte[],int,int,org.ietf.jgss.MessageProp)},
+ * {@link #unwrap(byte[],int,int,org.ietf.jgss.MessageProp)}, {@link
+ * #getMIC(byte[],int,int,org.ietf.jgss.MessageProp)}, {@link
+ * #verifyMIC(byte[],int,int,byte[],int,int,org.ietf.jgss.MessageProp)}) that
+ * are available over the context. Security contexts are established
+ * between peers using locally acquired credentials. Multiple contexts
+ * may exist simultaneously between a pair of peers, using the same or
+ * different set of credentials. GSS-API functions in a manner
+ * independent of the underlying transport protocol and depends on its
+ * calling application to transport its tokens between peers.</p>
+ *
+ * <p>Before the context establishment phase is initiated, the context
+ * initiator may request specific characteristics desired of the
+ * established context. These can be set using the set methods. After
+ * the context is established, the caller can check the actual
+ * characteristic and services offered by the context using the query
+ * methods.</p>
+ *
+ * <p>The context establishment phase begins with the first call to the
+ * init method by the context initiator. During this phase the
+ * {@link #initSecContext(byte[],int,int)} and {@link
+ * #acceptSecContext(byte[],int,int)} methods will produce GSS-API
+ * authentication tokens which the calling application needs to send to
+ * its peer. If an error occurs at any point, an exception will get
+ * thrown and the code will start executing in a catch block. If not,
+ * the normal flow of code continues and the application can make a call
+ * to the {@link #isEstablished()} method. If this method returns false it
+ * indicates that a token is needed from its peer in order to continue
+ * the context establishment phase. A return value of true signals that
+ * the local end of the context is established. This may still require
+ * that a token be sent to the peer, if one is produced by GSS-API.
+ * During the context establishment phase, the {@link #isProtReady()}
+ * method may be called to determine if the context can be used for the
+ * per-message operations. This allows applications to use per-message
+ * operations on contexts which aren't fully established.</p>
+ *
+ * <p>After the context has been established or the {@link #isProtReady()}
+ * method returns <code>true</code>, the query routines can be invoked to
+ * determine the actual characteristics and services of the established
+ * context. The application can also start using the per-message methods
+ * of {@link #wrap(byte[],int,int,org.ietf.jgss.MessageProp)} and
+ * {@link #getMIC(byte[],int,int,org.ietf.jgss.MessageProp)} to obtain
+ * cryptographic operations on application supplied data.</p>
+ *
+ * <p>When the context is no longer needed, the application should call
+ * {@link dispose()} to release any system resources the context may be
+ * using.</p>
+ *
+ * <h3>Example Code</h3>
+ *
+ * <pre>
+GSSManager mgr = GSSManager.getInstance();
+
+// start by creating the name for a service entity
+GSSName targetName = mgr.createName("service@host",
+ GSSName.NT_HOSTBASED_SERVICE);
+
+// create a context using default credentials for the above entity
+// and the implementation specific default mechanism
+GSSContext context = mgr.createContext(targetName,
+ null, // default mechanism
+ null, // default credentials
+ GSSContext.INDEFINITE_LIFETIME);
+
+// set desired context options - all others are false by default
+context.requestConf(true);
+context.requestMutualAuth(true);
+context.requestReplayDet(true);
+context.requestSequenceDet(true);
+
+// establish a context between peers - using byte arrays
+byte []inTok = new byte[0];
+
+try
+ {
+ do
+ {
+ byte[] outTok = context.initSecContext(inTok, 0,
+ inTok.length);
+
+ // send the token if present
+ if (outTok != null)
+ sendToken(outTok);
+
+ // check if we should expect more tokens
+ if (context.isEstablished())
+ break;
+
+ // another token expected from peer
+ inTok = readToken();
+
+ }
+ while (true);
+ }
+catch (GSSException e)
+ {
+ print("GSSAPI error: " + e.getMessage());
+ }
+
+// display context information
+print("Remaining lifetime in seconds = " + context.getLifetime());
+print("Context mechanism = " + context.getMech().toString());
+print("Initiator = " + context.getSrcName().toString());
+print("Acceptor = " + context.getTargName().toString());
+
+if (context.getConfState())
+ print("Confidentiality security service available");
+
+if (context.getIntegState())
+ print("Integrity security service available");
+
+// perform wrap on an application supplied message, appMsg,
+// using QOP = 0, and requesting privacy service
+byte[] appMsg ...
+MessageProp mProp = new MessageProp(0, true);
+byte[] tok = context.wrap(appMsg, 0, appMsg.length, mProp);
+
+if (mProp.getPrivacy())
+ print("Message protected with privacy.");
+
+sendToken(tok);
+
+
+// release the local-end of the context
+context.dispose();
+ * </pre>
+ */
+public interface GSSContext
+{
+
+ // Constants.
+ // -------------------------------------------------------------------------
+
+ /**
+ * A lifetime constant representing the default context lifetime.
+ */
+ int DEFAULT_LIFETIME = 0;
+
+ /**
+ * A lifetime constant representing indefinite context lifetime.
+ */
+ int INDEFINITE_LIFETIME = Integer.MAX_VALUE;
+
+ // Methods.
+ // -------------------------------------------------------------------------
+
+ /**
+ * <p>Called by the context initiator to start the context creation
+ * process. This is equivalent to the stream based method except that
+ * the token buffers are handled as byte arrays instead of using stream
+ * objects. This method may return an output token which the
+ * application will need to send to the peer for processing by the
+ * accept call. Typically, the application would do so by calling the
+ * {@link OutputStream#flush()} method on an OutputStream that
+ * encapsulates the connection between the two peers. The application
+ * can call {@link #isEstablished()} to determine if the context
+ * establishment phase is complete for this peer. A return value of
+ * <code>false</code> from {@link #isEstablished()} indicates that more
+ * tokens are expected to be supplied to the initSecContext() method. Note
+ * that it is possible that the initSecContext() method return a token for
+ * the peer, and {@link #isEstablished()} to return <code>true</code> also.
+ * This indicates that the token needs to be sent to the peer, but the local
+ * end of the context is now fully established.</p>
+ *
+ * <p>Upon completion of the context establishment, the available context
+ * options may be queried through the get methods.</p>
+ *
+ * @param inputBuf Token generated by the peer. This parameter is ignored
+ * on the first call.
+ * @param offset The offset within the <i>inputBuf</i> where the token
+ * begins.
+ * @param len The length of the token within the <i>inputBuf</i>
+ * (starting at the offset).
+ * @return The output token, if any.
+ * @throws GSSException If this operation fails.
+ */
+ byte[] initSecContext(byte[] inputBuf, int offset, int len)
+ throws GSSException;
+
+ /**
+ * <p>Called by the context initiator to start the context creation
+ * process. This is equivalent to the byte array based method. This
+ * method may write an output token to the <i>outStream</i>, which the
+ * application will need to send to the peer for processing by the
+ * accept call. Typically, the application would do so by calling the
+ * {@link OutputStream#flush()} method on an OutputStream that encapsulates
+ * the connection between the two peers. The application can call {@link
+ * #isEstablished()} to determine if the context establishment phase is
+ * complete for this peer. A return value of <code>false</code> from
+ * isEstablished indicates that more tokens are expected to be supplied
+ * to the initSecContext() method. Note that it is possible that the
+ * initSecContext() method return a token for the peer, and {@link
+ * #isEstablished() return <code>true</code> also. This indicates that
+ * the token needs to be sent to the peer, but the local end of the context
+ * is now fully established.</p>
+ *
+ * <p>The GSS-API authentication tokens contain a definitive start and end.
+ * This method will attempt to read one of these tokens per invocation,
+ * and may block on the stream if only part of the token is available.</p>
+ *
+ * <p>Upon completion of the context establishment, the available context
+ * options may be queried through the get methods.</p>
+ *
+ * @param inStream Contains the token generated by the peer. This
+ * parameter is ignored on the first call.
+ * @param outStream Output stream where the output token will be written.
+ * During the final stage of context establishment, there
+ * may be no bytes written.
+ * @return The number of bytes written to <i>outStream</i>, or 0 if no
+ * token is written.
+ * @throws GSSException If this operation fails.
+ */
+ int initSecContext(InputStream inStream, OutputStream outStream)
+ throws GSSException;
+
+ /**
+ * <p>Called by the context acceptor upon receiving a token from the peer.
+ * This call is equivalent to the stream based method except that the
+ * token buffers are handled as byte arrays instead of using stream
+ * objects.</p>
+ *
+ * <p>This method may return an output token which the application will
+ * need to send to the peer for further processing by the init call.</p>
+ *
+ * <p><code>null</code> return value indicates that no token needs to be
+ * sent to the peer. The application can call {@link #isEstablished()}
+ * to determine if the context establishment phase is complete for this
+ * peer. A return value of <code>false</code> from {@link #isEstablished()}
+ * indicates that more tokens are expected to be supplied to this
+ * method.</p>
+ *
+ * <p>Note that it is possible that acceptSecContext() return a token for
+ * the peer, and isEstablished() return <code>true</code> also. This
+ * indicates that the token needs to be sent to the peer, but the local
+ * end of the context is now fully established.</p>
+ *
+ * <p>Upon completion of the context establishment, the available context
+ * options may be queried through the get methods.</p>
+ *
+ * @param inTok Token generated by the peer.
+ * @param offset The offset within the <i>inTok</i> where the token begins.
+ * @param len The length of the token within the <i>inTok</i> (starting
+ * at the offset).
+ * @return The output token, if any.
+ * @throws GSSException If this operation fails.
+ */
+ byte[] acceptSecContext(byte[] inTok, int offset, int len)
+ throws GSSException;
+
+ /**
+ * <p>Called by the context acceptor upon receiving a token from the peer.
+ * This call is equivalent to the byte array method. It may write an
+ * output token to the outStream, which the application will need to
+ * send to the peer for processing by its initSecContext method.
+ * Typically, the application would do so by calling the {@link
+ * OutputStream#flush()} method on an OutputStream that encapsulates the
+ * connection between the two peers. The application can call {@link
+ * #isEstablished()} to determine if the context establishment phase is
+ * complete for this peer. A return value of <code>false</code> from
+ * {@link #isEstablished()} indicates that more tokens are expected to be
+ * supplied to this method.</p>
+ *
+ * <p>Note that it is possible that acceptSecContext() return a token for
+ * the peer, and isEstablished() return <code>true</code> also. This
+ * indicates that the token needs to be sent to the peer, but the local
+ * end of the context is now fully established.</p>
+ *
+ * <p>The GSS-API authentication tokens contain a definitive start and end.
+ * This method will attempt to read one of these tokens per invocation,
+ * and may block on the stream if only part of the token is available.</p>
+ *
+ * <p>Upon completion of the context establishment, the available context
+ * options may be queried through the get methods.</p>
+ *
+ * @param inStream Contains the token generated by the peer.
+ * @param outStream Output stream where the output token will be written.
+ * During the final stage of context establishment, there
+ * may be no bytes written.
+ * @return The number of bytes written, or 0 if no token is written.
+ * @throws GSSException If this operation fails.
+ */
+ void acceptSecContext(InputStream inStream, OutputStream outStream)
+ throws GSSException;
+
+ /**
+ * Used during context establishment to determine the state of the
+ * context. Returns <code>true</code> if this is a fully established
+ * context on the caller's side and no more tokens are needed from the
+ * peer. Should be called after a call to {@link
+ * #initSecContext(byte[],int,int)} or {@link
+ * #acceptSecContext(byte[],int,int)} when no {@link GSSException}
+ * is thrown.
+ *
+ * @return True of this context is fully established on this side.
+ */
+ boolean isEstablished();
+
+ /**
+ * Releases any system resources and cryptographic information stored in
+ * the context object. This will invalidate the context.
+ *
+ * @throws GSSException If this operation fails.
+ */
+ void dispose() throws GSSException;
+
+ /**
+ * <p>Returns the maximum message size that, if presented to the
+ * {@link #wrap(byte[],int,int,org.ietf.jgss.MessageProp)} method with
+ * the same <i>confReq</i> and <i>qop</i> parameters, will result in an
+ * output token containing no more than the <i>maxTokenSize</i> bytes.</p>
+ *
+ * <p>This call is intended for use by applications that communicate over
+ * protocols that impose a maximum message size. It enables the
+ * application to fragment messages prior to applying protection.</p>
+ *
+ * <p>GSS-API implementations are recommended but not required to detect
+ * invalid QOP values when getWrapSizeLimit is called. This routine
+ * guarantees only a maximum message size, not the availability of
+ * specific QOP values for message protection.</p>
+ *
+ * <p>Successful completion of this call does not guarantee that wrap will
+ * be able to protect a message of the computed length, since this
+ * ability may depend on the availability of system resources at the
+ * time that wrap is called. However, if the implementation itself
+ * imposes an upper limit on the length of messages that may be
+ * processed by wrap, the implementation should not return a value that
+ * is greater than this length.</p>
+ *
+ * @param qop Indicates the level of protection wrap will be asked
+ * to provide.
+ * @param confReq Indicates if wrap will be asked to provide privacy
+ * service.
+ * @param maxTokenSize The desired maximum size of the token emitted
+ * by {@link #wrap(byte[],int,int,org.ietf.jgss.MessageProp)}.
+ * @return The maximum wrapped output size.
+ * @throws GSSException If this operation fails.
+ */
+ int getWrapSizeLimit(int qop, boolean confReq, int maxTokenSize)
+ throws GSSException;
+
+ /**
+ * <p>Applies per-message security services over the established security
+ * context. The method will return a token with a cryptographic MIC and
+ * may optionally encrypt the specified <i>inBuf</i>. This method is
+ * equivalent in functionality to its stream counterpart. The returned
+ * byte array will contain both the MIC and the message.</p>
+ *
+ * <p>The {@link MessageProp} object is instantiated by the application
+ * and used to specify a QOP value which selects cryptographic algorithms,
+ * and a privacy service to optionally encrypt the message. The underlying
+ * mechanism that is used in the call may not be able to provide the
+ * privacy service. It sets the actual privacy service that it does
+ * provide in this {@link MessageProp} object which the caller should then
+ * query upon return. If the mechanism is not able to provide the
+ * requested QOP, it throws a {@link GSSException} with the {@link
+ * GSSException#BAD_QOP} code.</p>
+ *
+ * <p>Since some application-level protocols may wish to use tokens emitted
+ * by wrap to provide "secure framing", implementations should support
+ * the wrapping of zero-length messages.</p>
+ *
+ * <p>The application will be responsible for sending the token to the
+ * peer.</p>
+ *
+ * @param inBuf Application data to be protected.
+ * @param offset The offset within the inBuf where the data begins.
+ * @param len The length of the data within the inBuf (starting at
+ * the offset).
+ * @param msgProp Instance of {@link MessageProp} that is used by the
+ * application to set the desired QOP and privacy state.
+ * Set the desired QOP to 0 to request the default QOP.
+ * Upon return from this method, this object will contain
+ * the the actual privacy state that was applied to the
+ * message by the underlying mechanism.
+ * @return The wrapped data.
+ * @throws GSSException If this operation fails.
+ */
+ byte[] wrap(byte[] inBuf, int offset, int len, MessageProp msgProp)
+ throws GSSException;
+
+ /**
+ * <p>Allows to apply per-message security services over the established
+ * security context. The method will produce a token with a
+ * cryptographic MIC and may optionally encrypt the message in inStream.
+ * The outStream will contain both the MIC and the message.</p>
+ *
+ * <p>The {@link MessageProp} object is instantiated by the application and
+ * used to specify a QOP value which selects cryptographic algorithms, and
+ * a privacy service to optionally encrypt the message. The underlying
+ * mechanism that is used in the call may not be able to provide the
+ * privacy service. It sets the actual privacy service that it does
+ * provide in this MessageProp object which the caller should then query
+ * upon return. If the mechanism is not able to provide the requested
+ * QOP, it throws a {@link GSSException} with the {@link
+ * GSSException#BAD_QOP} code.</p>
+ *
+ * <p>Since some application-level protocols may wish to use tokens emitted
+ * by wrap to provide "secure framing", implementations should support
+ * the wrapping of zero-length messages.</p>
+ *
+ * <p>The application will be responsible for sending the token to the
+ * peer.</p>
+ *
+ * @param inStream Input stream containing the application data to be
+ * protected.
+ * @param outStream The output stream to write the protected message to.
+ * The application is responsible for sending this to the
+ * other peer for processing in its unwrap method.
+ * @param msgProp Instance of {@link MessageProp} that is used by the
+ * application to set the desired QOP and privacy state.
+ * Set the desired QOP to 0 to request the default QOP.
+ * Upon return from this method, this object will contain
+ * the the actual privacy state that was applied to the
+ * message by the underlying mechanism.
+ * @throws GSSException If this operation fails.
+ */
+ void wrap(InputStream inStream, OutputStream outStream, MessageProp msgProp)
+ throws GSSException;
+
+ /**
+ * <p>Used by the peer application to process tokens generated with the
+ * wrap call. This call is equal in functionality to its stream
+ * counterpart. The method will return the message supplied in the peer
+ * application to the wrap call, verifying the embedded MIC.</p>
+ *
+ * <p>The {@link MessageProp} object is instantiated by the application and
+ * is used by the underlying mechanism to return information to the caller
+ * such as the QOP, whether confidentiality was applied to the message, and
+ * other supplementary message state information.</p>
+ *
+ * <p>Since some application-level protocols may wish to use tokens emitted
+ * by wrap to provide "secure framing", implementations should support
+ * the wrapping and unwrapping of zero-length messages.</p>
+ *
+ * @param inBuf GSS-API wrap token received from peer.
+ * @param offset The offset within the inBuf where the token begins.
+ * @param len The length of the token within the inBuf (starting at
+ * the offset).
+ * @param msgProp Upon return from the method, this object will contain
+ * the applied QOP, the privacy state of the message, and
+ * supplementary information stating whether the token was
+ * a duplicate, old, out of sequence or arriving after a gap.
+ * @return The unwrapped token.
+ * @throws GSSException If this operation fails.
+ */
+ byte[] unwrap(byte[] inBuf, int offset, int len, MessageProp msgProp)
+ throws GSSException;
+
+ /**
+ * <p>Used by the peer application to process tokens generated with the
+ * wrap call. This call is equal in functionality to its byte array
+ * counterpart. It will produce the message supplied in the peer
+ * application to the wrap call, verifying the embedded MIC.</p>
+ *
+ * <p>The {@link MessageProp} object is instantiated by the application
+ * and is used by the underlying mechanism to return information to the
+ * caller such as the QOP, whether confidentiality was applied to the
+ * message, and other supplementary message state information.</p>
+ *
+ * <p>Since some application-level protocols may wish to use tokens emitted
+ * by wrap to provide "secure framing", implementations should support
+ * the wrapping and unwrapping of zero-length messages.</p>
+ *
+ * @param inStream Input stream containing the GSS-API wrap token
+ * received from the peer.
+ * @param outStream The output stream to write the application message to.
+ * @param msgProp Upon return from the method, this object will contain
+ * the applied QOP, the privacy state of the message, and
+ * supplementary information stating whether the token was
+ * a duplicate, old, out of sequence or arriving after a gap.
+ * @throws GSSException If this operation fails.
+ */
+ void unwrap(InputStream inStream, OutputStream outStream, MessageProp msgProp)
+ throws GSSException;
+
+ /**
+ * <p>Returns a token containing a cryptographic MIC for the supplied
+ * message, for transfer to the peer application. Unlike wrap, which
+ * encapsulates the user message in the returned token, only the message
+ * MIC is returned in the output token. This method is identical in
+ * functionality to its stream counterpart.</p>
+ *
+ * <p>Note that privacy can only be applied through the wrap call.</p>
+ *
+ * <p>Since some application-level protocols may wish to use tokens emitted
+ * by getMIC to provide "secure framing", implementations should support
+ * derivation of MICs from zero-length messages.</p>
+ *
+ * @param inMsg Message to generate MIC over.
+ * @param offset The offset within the inMsg where the token begins.
+ * @param len The length of the token within the inMsg (starting at
+ * the offset).
+ * @param msgProp Instance of MessageProp that is used by the
+ * application to set the desired QOP. Set the desired
+ * QOP to 0 in msgProp to request the default QOP.
+ * Alternatively pass in <code>null</code> for msgProp to
+ * request default QOP.
+ * @return The MIC.
+ * @throws GSSException If this operation fails.
+ */
+ byte[] getMIC(byte[] inMsg, int offset, int len, MessageProp msgProp)
+ throws GSSException;
+
+ /**
+ * <p>Produces a token containing a cryptographic MIC for the supplied
+ * message, for transfer to the peer application. Unlike wrap, which
+ * encapsulates the user message in the returned token, only the message
+ * MIC is produced in the output token. This method is identical in
+ * functionality to its byte array counterpart.</p>
+ *
+ * <p>Note that privacy can only be applied through the wrap call.</p>
+ *
+ * <p>Since some application-level protocols may wish to use tokens emitted
+ * by getMIC to provide "secure framing", implementations should support
+ * derivation of MICs from zero-length messages.</p>
+ *
+ * @param inStream Input stream containing the message to generate
+ * the MIC over.
+ * @param outStream Output stream to write the GSS-API output token to.
+ * @param msgProp Instance of MessageProp that is used by the
+ * application to set the desired QOP. Set the desired
+ * QOP to 0 in msgProp to request the default QOP.
+ * Alternatively pass in <code>null</code> for msgProp
+ * to request default QOP.
+ * @throws GSSException If this operation fails.
+ */
+ void getMIC(InputStream inStream, OutputStream outStream, MessageProp mgProp)
+ throws GSSException;
+
+ /**
+ * <p>Verifies the cryptographic MIC, contained in the token parameter,
+ * over the supplied message. This method is equivalent in
+ * functionality to its stream counterpart.</p>
+ *
+ * <p>The MessageProp object is instantiated by the application and is used
+ * by the underlying mechanism to return information to the caller such
+ * as the QOP indicating the strength of protection that was applied to
+ * the message and other supplementary message state information.</p>
+ *
+ * <p>Since some application-level protocols may wish to use tokens emitted
+ * by getMIC to provide "secure framing", implementations should support
+ * the calculation and verification of MICs over zero-length messages.</p>
+ *
+ * @param inTok Token generated by peer's getMIC method.
+ * @param tokOffset The offset within the inTok where the token begins.
+ * @param tokLen The length of the token within the inTok (starting at
+ * the offset).
+ * @param inMsg Application message to verify the cryptographic MIC
+ * over.
+ * @param msgOffset The offset within the inMsg where the message begins.
+ * @param msgLen The length of the message within the inMsg (starting
+ * at the offset).
+ * @param msgProp Upon return from the method, this object will contain
+ * the applied QOP and supplementary information
+ * stating whether the token was a duplicate, old, out
+ * of sequence or arriving after a gap. The
+ * confidentiality state will be set to <code>false</code>.
+ * @throws GSSException If this operation fails.
+ */
+ void verifyMIC(byte[] inTok, int tokOffset, int tokLen, byte[] inMsg,
+ int msgOffset, int msgLen, MessageProp msgProp)
+ throws GSSException;
+
+ /**
+ * <p>Verifies the cryptographic MIC, contained in the token parameter,
+ * over the supplied message. This method is equivalent in
+ * functionality to its byte array counterpart.</p>
+ *
+ * <p>The MessageProp object is instantiated by the application and is used
+ * by the underlying mechanism to return information to the caller such
+ * as the QOP indicating the strength of protection that was applied to
+ * the message and other supplementary message state information.</p>
+ *
+ * <p>Since some application-level protocols may wish to use tokens emitted
+ * by getMIC to provide "secure framing", implementations should support
+ * the calculation and verification of MICs over zero-length messages.</p>
+ *
+ * @param tokStream Input stream containing the token generated by peer's
+ * getMIC method.
+ * @param msgStream Input stream containing the application message to
+ * verify the cryptographic MIC over.
+ * @param msgProp Upon return from the method, this object will contain
+ * the applied QOP and supplementary information
+ * stating whether the token was a duplicate, old, out of
+ * sequence or arriving after a gap. The confidentiality
+ * state will be set to <code>false</code>.
+ * @throws GSSException If this operation fails.
+ */
+ void verifyMIC(InputStream tokStream, InputStream msgStream, MessageProp msgProp)
+ throws GSSException;
+
+ /**
+ * <p>Provided to support the sharing of work between multiple processes.
+ * This routine will typically be used by the context-acceptor, in an
+ * application where a single process receives incoming connection
+ * requests and accepts security contexts over them, then passes the
+ * established context to one or more other processes for message
+ * exchange.</p>
+ *
+ * <p>This method deactivates the security context and creates an
+ * interprocess token which, when passed to the byte array constructor
+ * of the GSSContext interface in another process, will re-activate the
+ * context in the second process. Only a single instantiation of a
+ * given context may be active at any one time; a subsequent attempt by
+ * a context exporter to access the exported security context will fail.</p>
+ *
+ * <p>The implementation may constrain the set of processes by which the
+ * interprocess token may be imported, either as a function of local
+ * security policy, or as a result of implementation decisions. For
+ * example, some implementations may constrain contexts to be passed
+ * only between processes that run under the same account, or which are
+ * part of the same process group.</p>
+ *
+ * <p>The interprocess token may contain security-sensitive information
+ * (for example cryptographic keys). While mechanisms are encouraged to
+ * either avoid placing such sensitive information within interprocess
+ * tokens, or to encrypt the token before returning it to the
+ * application, in a typical GSS-API implementation this may not be
+ * possible. Thus the application must take care to protect the
+ * interprocess token, and ensure that any process to which the token is
+ * transferred is trustworthy.</p>
+ *
+ * @return The exported context.
+ * @throws GSSException If this operation fails.
+ */
+ byte[] export() throws GSSException;
+
+ /**
+ * <p>Sets the request state of the mutual authentication flag for the
+ * context. This method is only valid before the context creation
+ * process begins and only for the initiator.</p>
+ *
+ * @param state Boolean representing if mutual authentication should
+ * be requested during context establishment.
+ * @throws GSSException If this operation fails.
+ */
+ void requestMutualAuth(boolean state) throws GSSException;
+
+ /**
+ * <p>Sets the request state of the replay detection service for the
+ * context. This method is only valid before the context creation
+ * process begins and only for the initiator.</p>
+ *
+ * @param state Boolean representing if replay detection is desired
+ * over the established context.
+ * @throws GSSException If this operation fails.
+ */
+ void requestReplayDet(boolean state) throws GSSException;
+
+ /**
+ * <p>Sets the request state for the sequence checking service of the
+ * context. This method is only valid before the context creation
+ * process begins and only for the initiator.</p>
+ *
+ * @param state Boolean representing if sequence detection is desired
+ * over the established context.
+ * @throws GSSException If this operation fails.
+ */
+ void requestSequenceDet(boolean state) throws GSSException;
+
+ /**
+ * <p>Sets the request state for the credential delegation flag for the
+ * context. This method is only valid before the context creation
+ * process begins and only for the initiator.</p>
+ *
+ * @param state Boolean representing if credential delegation is
+ * desired.
+ * @throws GSSException If this operation fails.
+ */
+ void requestCredDeleg(boolean state) throws GSSException;
+
+ /**
+ * <p>Requests anonymous support over the context. This method is only
+ * valid before the context creation process begins and only for the
+ * initiator.</p>
+ *
+ * @param state Boolean representing if anonymity support is requested.
+ * @throws GSSException If this operation fails.
+ */
+ void requestAnonymity(boolean state) throws GSSException;
+
+ /**
+ * <p>Requests that confidentiality service be available over the context.
+ * This method is only valid before the context creation process begins
+ * and only for the initiator.</p>
+ *
+ * @param state Boolean indicating if confidentiality services are to
+ * be requested for the context.
+ * @throws GSSException If this operation fails.
+ */
+ void requestConf(boolean state) throws GSSException;
+
+ /**
+ * <p>Requests that integrity services be available over the context. This
+ * method is only valid before the context creation process begins and
+ * only for the initiator.</p>
+ *
+ * @param state Boolean indicating if integrity services are to be
+ * requested for the context.
+ * @throws GSSException If this operation fails.
+ */
+ void requestInteg(boolean state) throws GSSException;
+
+ /**
+ * <p>Sets the desired lifetime for the context in seconds. This method is
+ * only valid before the context creation process begins and only for
+ * the initiator. Use {@link #INDEFINITE_LIFETIME} and {@link
+ * #DEFAULT_LIFETIME} to request indefinite or default context lifetime.</p>
+ *
+ * @param lifetime The desired context lifetime in seconds.
+ * @throws GSSException If this operation fails.
+ */
+ void requestLifetime(int lifetime) throws GSSException;
+
+ /**
+ * <p>Sets the channel bindings to be used during context establishment.
+ * This method is only valid before the context creation process begins.</p>
+ *
+ * @param cb Channel bindings to be used.
+ * @throws GSSException If this operation fails.
+ */
+ void setChannelBinding(ChannelBinding cb) throws GSSException;
+
+ /**
+ * <p>Returns the state of the delegated credentials for the context.
+ * When issued before context establishment is completed or when the
+ * isProtReady method returns "false", it returns the desired state,
+ * otherwise it will indicate the actual state over the established
+ * context.</p>
+ *
+ * @return The state of the delegated credentials for the context.
+ */
+ boolean getCredDelegState();
+
+ /**
+ * <p>Returns the state of the mutual authentication option for the
+ * context. When issued before context establishment completes or when
+ * the isProtReady method returns "false", it returns the desired state,
+ * otherwise it will indicate the actual state over the established
+ * context.</p>
+ *
+ * @return The state of the mutual authentication option.
+ */
+ boolean getMutualAuthState();
+
+ /**
+ * <p>Returns the state of the replay detection option for the context.
+ * When issued before context establishment completes or when the
+ * isProtReady method returns "false", it returns the desired state,
+ * otherwise it will indicate the actual state over the established
+ * context.</p>
+ *
+ * @return The state of the replay detection option.
+ */
+ boolean getReplayDetState();
+
+ /**
+ * <p>Returns the state of the sequence detection option for the context.
+ * When issued before context establishment completes or when the
+ * isProtReady method returns "false", it returns the desired state,
+ * otherwise it will indicate the actual state over the established
+ * context.</p>
+ *
+ * @return The state of the sequence detection option.
+ */
+ boolean getSequenceDetState();
+
+ /**
+ * <p>Returns "true" if this is an anonymous context. When issued before
+ * context establishment completes or when the isProtReady method
+ * returns "false", it returns the desired state, otherwise it will
+ * indicate the actual state over the established context.</p>
+ *
+ * @return True if this is an anonymous context.
+ */
+ boolean getAnonymityState();
+
+ /**
+ * <p>Returns "true" if the context is transferable to other processes
+ * through the use of the {@link #export()} method. This call is only
+ * valid on fully established contexts.</p>
+ *
+ * @return True if the context is transferable.
+ * @throws GSSException If this operation fails.
+ */
+ boolean isTransferable() throws GSSException;
+
+ /**
+ * <p>Returns "true" if the per message operations can be applied over
+ * the context. Some mechanisms may allow the usage of per-message
+ * operations before the context is fully established. This will also
+ * indicate that the get methods will return actual context state
+ * characteristics instead of the desired ones.</p>
+ *
+ * @return True if the per message operations can be applied over
+ * the context.
+ */
+ boolean isProtReady();
+
+ /**
+ * <p>Returns the confidentiality service state over the context. When
+ * issued before context establishment completes or when the isProtReady
+ * method returns "false", it returns the desired state, otherwise it
+ * will indicate the actual state over the established context.</p>
+ *
+ * @return True the confidentiality service state.
+ */
+ boolean getConfState();
+
+ /**
+ * <p>Returns the integrity service state over the context. When issued
+ * before context establishment completes or when the isProtReady method
+ * returns "false", it returns the desired state, otherwise it will
+ * indicate the actual state over the established context.</p>
+ *
+ * @return The integrity service state.
+ */
+ boolean getIntegState();
+
+ /**
+ * <p>Returns the context lifetime in seconds. When issued before context
+ * establishment completes or when the isProtReady method returns
+ * "false", it returns the desired lifetime, otherwise it will indicate
+ * the remaining lifetime for the context.</p>
+ *
+ * @return The lifetime.
+ */
+ int getLifetime();
+
+ /**
+ * <p>Returns the name of the context initiator. This call is valid only
+ * after the context is fully established or the isProtReady method
+ * returns "true". It is guaranteed to return an MN.</p>
+ *
+ * @return The name of the context initiator.
+ * @throws GSSException If this operation fails.
+ */
+ GSSName getSrcName() throws GSSException;
+
+ /**
+ * <p>Returns the name of the context target (acceptor). This call is
+ * valid only after the context is fully established or the isProtReady
+ * method returns "true". It is guaranteed to return an MN.</p>
+ *
+ * @return The name of the context target.
+ * @throws GSSException If this operation fails.
+ */
+ GSSName getTargName() throws GSSException;
+
+ /**
+ * <p>Returns the mechanism oid for this context. This method may be called
+ * before the context is fully established, but the mechanism returned
+ * may change on successive calls in negotiated mechanism case.</p>
+ *
+ * @return The mechanism OID.
+ * @throws GSSException If this operation fails.
+ */
+ Oid getMech() throws GSSException;
+
+ /**
+ * <p>Returns the delegated credential object on the acceptor's side.
+ * To check for availability of delegated credentials call
+ * {@link #getDelegCredState()}. This call is only valid on fully
+ * established contexts.</p>
+ *
+ * @return The delegated credential object.
+ * @throws GSSException If this operation fails.
+ */
+ GSSCredential getDelegCred() throws GSSException;
+
+ /**
+ * <p>Returns "true" if this is the initiator of the context. This call is
+ * only valid after the context creation process has started.</p>
+ *
+ * @return True if this is the initiator.
+ * @throws GSSException If this operation fails.
+ */
+ boolean isInitiator() throws GSSException;
+}
diff --git a/libjava/classpath/org/ietf/jgss/GSSCredential.java b/libjava/classpath/org/ietf/jgss/GSSCredential.java
new file mode 100644
index 00000000000..724825d5eed
--- /dev/null
+++ b/libjava/classpath/org/ietf/jgss/GSSCredential.java
@@ -0,0 +1,334 @@
+/* GSSCredential.java -- GSS credential interface.
+ Copyright (C) 2004 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.
+
+ The documentation comments of this class are derived from the text
+ of RFC 2853: Generic Security Service API Version 2: Java Bindings.
+ That document is covered under the following license notice:
+
+Copyright (C) The Internet Society (2000). All Rights Reserved.
+
+This document and translations of it may be copied and furnished to
+others, and derivative works that comment on or otherwise explain it
+or assist in its implementation may be prepared, copied, published and
+distributed, in whole or in part, without restriction of any kind,
+provided that the above copyright notice and this paragraph are
+included on all such copies and derivative works. However, this
+document itself may not be modified in any way, such as by removing
+the copyright notice or references to the Internet Society or other
+Internet organizations, except as needed for the purpose of developing
+Internet standards in which case the procedures for copyrights defined
+in the Internet Standards process must be followed, or as required to
+translate it into languages other than English.
+
+The limited permissions granted above are perpetual and will not be
+revoked by the Internet Society or its successors or assigns.
+
+This document and the information contained herein is provided on an
+"AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING
+TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT
+NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN
+WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF
+MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. */
+
+
+package org.ietf.jgss;
+
+/**
+ * <p>This interface encapsulates the GSS-API credentials for an entity.
+ * A credential contains all the necessary cryptographic information to
+ * enable the creation of a context on behalf of the entity that it
+ * represents. It may contain multiple, distinct, mechanism specific
+ * credential elements, each containing information for a specific
+ * security mechanism, but all referring to the same entity.</p>
+ *
+ * <p>A credential may be used to perform context initiation, acceptance,
+ * or both.</p>
+ *
+ * <p>GSS-API implementations must impose a local access-control policy on
+ * callers to prevent unauthorized callers from acquiring credentials to
+ * which they are not entitled. GSS-API credential creation is not
+ * intended to provide a "login to the network" function, as such a
+ * function would involve the creation of new credentials rather than
+ * merely acquiring a handle to existing credentials. Such functions,
+ * if required, should be defined in implementation-specific extensions
+ * to the API.</p>
+ *
+ * <p>If credential acquisition is time-consuming for a mechanism, the
+ * mechanism may choose to delay the actual acquisition until the
+ * credential is required (e.g. by {@link GSSContext}). Such mechanism-
+ * specific implementation decisions should be invisible to the calling
+ * application; thus the query methods immediately following the
+ * creation of a credential object must return valid credential data,
+ * and may therefore incur the overhead of a deferred credential
+ * acquisition.</p>
+ *
+ * <p>Applications will create a credential object passing the desired
+ * parameters. The application can then use the query methods to obtain
+ * specific information about the instantiated credential object
+ * (equivalent to the gss_inquire routines). When the credential is no
+ * longer needed, the application should call the dispose (equivalent to
+ * gss_release_cred) method to release any resources held by the
+ * credential object and to destroy any cryptographically sensitive
+ * information.</p>
+ *
+ * <p>Classes implementing this interface also implement the {@link Cloneable}
+ * interface. This indicates the the class will support the {@link
+ * Cloneable#clone()} method that will allow the creation of duplicate
+ * credentials. This is useful when called just before the {@link
+ * #add(org.ietf.jgss.GSSName,int,int,org.ietf.jgss.Oid,int)} call to retain
+ * a copy of the original credential.</p>
+ *
+ * <h3>Example Code</h3>
+ *
+ * <pre>
+GSSManager mgr = GSSManager.getInstance();
+
+// start by creating a name object for the entity
+GSSName name = mgr.createName("userName", GSSName.NT_USER_NAME);
+
+// now acquire credentials for the entity
+GSSCredential cred = mgr.createCredential(name,
+ GSSCredential.ACCEPT_ONLY);
+
+// display credential information - name, remaining lifetime,
+// and the mechanisms it has been acquired over
+print(cred.getName().toString());
+print(cred.getRemainingLifetime());
+
+Oid [] mechs = cred.getMechs();
+if (mechs != null)
+ {
+ for (int i = 0; i < mechs.length; i++)
+ print(mechs[i].toString());
+ }
+
+// release system resources held by the credential
+cred.dispose();
+ * </pre>
+ */
+public interface GSSCredential extends Cloneable
+{
+
+ // Constants.
+ // -------------------------------------------------------------------------
+
+ /**
+ * Credential usage flag requesting that it be able to be used for both
+ * context initiation and acceptance.
+ */
+ int INITIATE_AND_ACCEPT = 0;
+
+ /**
+ * Credential usage flag requesting that it be able to be used for
+ * context initiation only.
+ */
+ int INITIATE_ONLY = 1;
+
+ /**
+ * Credential usage flag requesting that it be able to be used for
+ * context acceptance only.
+ */
+ int ACCEPT_ONLY = 2;
+
+ /**
+ * A lifetime constant representing the default credential lifetime.
+ */
+ int DEFAULT_LIFETIME = 0;
+
+ /**
+ * A lifetime constant representing indefinite credential lifetime.
+ */
+ int INDEFINITE_LIFETIME = Integer.MAX_VALUE;
+
+ // Methods.
+ // -------------------------------------------------------------------------
+
+ /**
+ * Releases any sensitive information that the GSSCredential object may
+ * be containing. Applications should call this method as soon as the
+ * credential is no longer needed to minimize the time any sensitive
+ * information is maintained.
+ *
+ * @throws GSSException If this operation fails.
+ */
+ void dispose() throws GSSException;
+
+ /**
+ * Retrieves the name of the entity that the credential asserts.
+ *
+ * @return The name.
+ * @throws GSSException If this operation fails.
+ */
+ GSSName getName() throws GSSException;
+
+ /**
+ * Retrieves a mechanism name of the entity that the credential asserts.
+ * Equivalent to calling {@link GSSName#canonicalize(org.ietf.jgss.Oid)}
+ * on the name returned by {@link #getName()}.
+ *
+ * @param mechOID The mechanism for which information should be returned.
+ * @return The name.
+ * @throws GSSException If this operation fails.
+ */
+ GSSName getName(Oid mechOID) throws GSSException;
+
+ /**
+ * Returns the remaining lifetime in seconds for a credential. The
+ * remaining lifetime is the minimum lifetime for any of the underlying
+ * credential mechanisms. A return value of {@link
+ * GSSCredential#INDEFINITE_LIFETIME} indicates that the credential does
+ * not expire. A return value of 0 indicates that the credential is
+ * already expired.
+ *
+ * @return The remaining lifetime.
+ * @throws GSSException If this operation fails.
+ */
+ int getRemainingLifetime() throws GSSException;
+
+ /**
+ * Returns the remaining lifetime is seconds for the credential to
+ * remain capable of initiating security contexts under the specified
+ * mechanism. A return value of {@link GSSCredential#INDEFINITE_LIFETIME}
+ * indicates that the credential does not expire for context initiation.
+ * A return value of 0 indicates that the credential is already expired.
+ *
+ * @param mech The mechanism for which information should be returned.
+ * @return The remaining lifetime.
+ * @throws GSSException If this operation fails.
+ */
+ int getRemainingInitLifetime(Oid mech) throws GSSException;
+
+ /**
+ * Returns the remaining lifetime is seconds for the credential to
+ * remain capable of accepting security contexts under the specified
+ * mechanism. A return value of {@link GSSCredential#INDEFINITE_LIFETIME}
+ * indicates that the credential does not expire for context acceptance.
+ * A return value of 0 indicates that the credential is already expired.
+ *
+ * @param mech The mechanism for which information should be returned.
+ * @return The remaining lifetime.
+ * @throws GSSException If this operation fails.
+ */
+ int getRemainingAcceptLifetime(Oid mech) throws GSSException;
+
+ /**
+ * Returns the credential usage flag. The return value will be one of
+ * {@link GSSCredential#INITIATE_ONLY}, {@link GSSCredential#ACCEPT_ONLY},
+ * or {@link GSSCredential#INITIATE_AND_ACCEPT}.
+ *
+ * @return The credential usage flag.
+ * @throws GSSException If this operation fails.
+ */
+ int getUsage() throws GSSException;
+
+ /**
+ * Returns the credential usage flag for the specified credential
+ * mechanism. The return value will be one of
+ * {@link GSSCredential#INITIATE_ONLY}, {@link GSSCredential#ACCEPT_ONLY},
+ * or {@link GSSCredential#INITIATE_AND_ACCEPT}.
+ *
+ * @param mechOID The mechanism for which information should be returned.
+ * @return The credential usage flag.
+ * @throws GSSException If this operation fails.
+ */
+ int getUsage(Oid mechOID) throws GSSException;
+
+ /**
+ * Returns an array of mechanisms supported by this credential.
+ *
+ * @return The supported mechanism.
+ * @throws GSSException If this operation fails.
+ */
+ Oid[] getMechs() throws GSSException;
+
+ /**
+ * <p>Adds a mechanism specific credential-element to an existing
+ * credential. This method allows the construction of credentials one
+ * mechanism at a time.</p>
+ *
+ * <p>This routine is envisioned to be used mainly by context acceptors
+ * during the creation of acceptance credentials which are to be used
+ * with a variety of clients using different security mechanisms.</p>
+ *
+ * <p>This routine adds the new credential element "in-place". To add the
+ * element in a new credential, first call {@link Cloneable#clone()} to
+ * obtain a copy of this credential, then call its <code>add()</code>
+ * method.</p>
+ *
+ * @param aName Name of the principal for whom this credential
+ * is to be acquired. Use <code>null</code> to
+ * specify the default principal.
+ * @param initLifetime The number of seconds that credentials should
+ * remain valid for initiating of security contexts.
+ * Use {@link #INDEFINITE_LIFETIME} to request that
+ * the credentials have the maximum permitted lifetime.
+ * Use {@link GSSCredential#DEFAULT_LIFETIME} to
+ * request the default credential lifetime.
+ * @param acceptLifetime The number of seconds that credentials should
+ * remain valid for accepting of security contexts.
+ * Use {@link GSSCredential#INDEFINITE_LIFETIME} to
+ * request that the credentials have the maximum
+ * permitted lifetime. Use {@link
+ * GSSCredential#DEFAULT_LIFETIME} to request
+ * the default credential lifetime.
+ * @param mech The mechanisms over which the credential is to be
+ * acquired.
+ * @param usage The intended usage for this credential object. The
+ * value of this parameter must be one of:
+ * {@link GSSCredential#ACCEPT_AND_INITIATE},
+ * {@link GSSCredential#ACCEPT_ONLY},
+ * {@link GSSCredential#INITIATE_ONLY}.
+ * @throws GSSException If this operation fails.
+ */
+ void add(GSSName aName, int initLifetime, int acceptLifetime,
+ Oid mech, int usage) throws GSSException;
+
+ /**
+ * Tests if this GSSCredential refers to the same entity as the supplied
+ * object. The two credentials must be acquired over the same
+ * mechanisms and must refer to the same principal. Returns <code>true</code>
+ * if the two GSSCredentials refer to the same entity; <code>false</code>
+ * otherwise. (Note that the Java language specification requires that two
+ * objects that are equal according to the {@link
+ * Object#equals(java.lang.Object)} method must return the same integer
+ * result when the {@link Object#hashCode()} method is called on them.)
+ *
+ * @param another Another GSSCredential object for comparison.
+ * @return True if this object equals the other.
+ */
+ boolean equals(Object another);
+}
diff --git a/libjava/classpath/org/ietf/jgss/GSSException.java b/libjava/classpath/org/ietf/jgss/GSSException.java
new file mode 100644
index 00000000000..5443f766cfe
--- /dev/null
+++ b/libjava/classpath/org/ietf/jgss/GSSException.java
@@ -0,0 +1,435 @@
+/* GSSException.java -- a general exception in GSS.
+ Copyright (C) 2004 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.
+
+ The documentation comments of this class are derived from the text
+ of RFC 2853: Generic Security Service API Version 2: Java Bindings.
+ That document is covered under the following license notice:
+
+Copyright (C) The Internet Society (2000). All Rights Reserved.
+
+This document and translations of it may be copied and furnished to
+others, and derivative works that comment on or otherwise explain it
+or assist in its implementation may be prepared, copied, published and
+distributed, in whole or in part, without restriction of any kind,
+provided that the above copyright notice and this paragraph are
+included on all such copies and derivative works. However, this
+document itself may not be modified in any way, such as by removing
+the copyright notice or references to the Internet Society or other
+Internet organizations, except as needed for the purpose of developing
+Internet standards in which case the procedures for copyrights defined
+in the Internet Standards process must be followed, or as required to
+translate it into languages other than English.
+
+The limited permissions granted above are perpetual and will not be
+revoked by the Internet Society or its successors or assigns.
+
+This document and the information contained herein is provided on an
+"AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING
+TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT
+NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN
+WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF
+MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. */
+
+
+package org.ietf.jgss;
+
+import java.util.PropertyResourceBundle;
+import java.util.ResourceBundle;
+
+/**
+ * This exception is thrown whenever a fatal GSS-API error occurs
+ * including mechanism specific errors. It may contain both, the major
+ * and minor, GSS-API status codes. The mechanism implementers are
+ * responsible for setting appropriate minor status codes when throwing
+ * this exception. Aside from delivering the numeric error code(s) to
+ * the caller, this class performs the mapping from their numeric values
+ * to textual representations. All Java GSS-API methods are declared
+ * throwing this exception.
+ */
+public class GSSException extends Exception
+{
+ /**
+ * For compatability with Sun's JDK 1.4.2 rev. 5
+ */
+ private static final long serialVersionUID = -2706218945227726672L;
+
+ // Constants and fields.
+ // -------------------------------------------------------------------------
+
+ // These values do not jive with the "Constant Field Values" in the J2SE
+ // 1.4.1, but do follow RFC 2853. I trust the IETF, but not Sun.
+
+ /**
+ * Channel bindings mismatch error.
+ */
+ public static final int BAD_BINDINGS = 4;
+
+ /**
+ * Unsupported mechanism requested error.
+ */
+ public static final int BAD_MECH = 1;
+
+ /**
+ * Invalid name provided error.
+ */
+ public static final int BAD_NAME = 2;
+
+ /**
+ * Name of unsupported type provided error.
+ */
+ public static final int BAD_NAMETYPE = 3;
+
+ /**
+ * Invalid status code error - this is the default status value.
+ */
+ public static final int BAD_STATUS = 5;
+
+ /**
+ * Token had invalid integrity check error.
+ */
+ public static final int BAD_MIC = 6;
+
+ /**
+ * Specified security context expired error.
+ */
+ public static final int CONTEXT_EXPIRED = 12;
+
+ /**
+ * Expired credentials detected error.
+ */
+ public static final int CREDENTIALS_EXPIRED = 11;
+
+ /**
+ * Defective credential error.
+ */
+ public static final int DEFECTIVE_CREDENTIAL = 10;
+
+ /**
+ * Defective token error.
+ */
+ public static final int DEFECTIVE_TOKEN = 9;
+
+ /**
+ * General failure, unspecified at GSS-API level.
+ */
+ public static final int FAILURE = 13;
+
+ /**
+ * Invalid security context error.
+ */
+ public static final int NO_CONTEXT = 8;
+
+ /**
+ * Invalid credentials error.
+ */
+ public static final int NO_CRED = 7;
+
+ /**
+ * Unsupported QOP value error.
+ */
+ public static final int BAD_QOP = 14;
+
+ /**
+ * Operation unauthorized error.
+ */
+ public static final int UNAUTHORIZED = 15;
+
+ /**
+ * Operation unavailable error.
+ */
+ public static final int UNAVAILABLE = 16;
+
+ /**
+ * Duplicate credential element requested error.
+ */
+ public static final int DUPLICATE_ELEMENT = 17;
+
+ /**
+ * Name contains multi-mechanism elements error.
+ */
+ public static final int NAME_NOT_MN = 18;
+
+ /**
+ * The token was a duplicate of an earlier token. This is a fatal error
+ * code that may occur during context establishment. It is not used to
+ * indicate supplementary status values. The MessageProp object is used
+ * for that purpose.
+ */
+ public static final int DUPLICATE_TOKEN = 20;
+
+ /**
+ * The token's validity period has expired. This is a fatal error code
+ * that may occur during context establishment. It is not used to
+ * indicate supplementary status values. The MessageProp object is used
+ * for that purpose.
+ */
+ public static final int OLD_TOKEN = 19;
+
+ /**
+ * A later token has already been processed. This is a fatal error code
+ * that may occur during context establishment. It is not used to
+ * indicate supplementary status values. The MessageProp object is used
+ * for that purpose.
+ */
+ public static final int UNSEQ_TOKEN = 21;
+
+ /**
+ * An expected per-message token was not received. This is a fatal
+ * error code that may occur during context establishment. It is not
+ * used to indicate supplementary status values. The MessageProp object
+ * is used for that purpose.
+ */
+ public static final int GAP_TOKEN = 22;
+
+ private final int major;
+ private int minor;
+ private String minorString;
+
+ private ResourceBundle messages;
+
+ // Constructors.
+ // -------------------------------------------------------------------------
+
+ /**
+ * Create a new GSS exception with the given major code.
+ *
+ * @param major The major GSS error code.
+ */
+ public GSSException(int major)
+ {
+ this(major, 0, null);
+ }
+
+ /**
+ * Create a new GSS exception with the given major and minor codes, and a
+ * minor explanation string.
+ *
+ * @param major The major GSS error code.
+ * @param minor The minor application-specific error code.
+ * @param minorString An explanation of the minor error code.
+ */
+ public GSSException(int major, int minor, String minorString)
+ {
+ this.major = major;
+ this.minor = minor;
+ this.minorString = minorString;
+ try
+ {
+ messages = PropertyResourceBundle.getBundle("org/ietf/jgss/MessagesBundle");
+ }
+ catch (Exception e)
+ {
+ messages = null;
+ }
+ }
+
+ // Instance methods.
+ // -------------------------------------------------------------------------
+
+ /**
+ * Returns the major code representing the GSS error code that caused
+ * this exception to be thrown.
+ *
+ * @return The major error code.
+ */
+ public int getMajor()
+ {
+ return major;
+ }
+
+ /**
+ * Returns the mechanism error code that caused this exception. The
+ * minor code is set by the underlying mechanism. Value of 0 indicates
+ * that mechanism error code is not set.
+ *
+ * @return The minor error code, or 0 if not set.
+ */
+ public int getMinor()
+ {
+ return minor;
+ }
+
+ /**
+ * Returns a string explaining the GSS major error code causing this
+ * exception to be thrown.
+ *
+ * @return The major error string.
+ */
+ public String getMajorString()
+ {
+ switch (major)
+ {
+ case BAD_MECH:
+ return getMsg("GSSException.BAD_MECH",
+ "An unsupported mechanism was requested.");
+ case BAD_NAME:
+ return getMsg("GSSException.BAD_NAME",
+ "An invalid name was supplied.");
+ case BAD_NAMETYPE:
+ return getMsg("GSSException.BAD_NAMETYPE",
+ "A supplied name was of an unsupported type.");
+ case BAD_BINDINGS:
+ return getMsg("GSSException.BAD_BINDINGS",
+ "Incorrect channel bindings were supplied.");
+ case BAD_STATUS:
+ return getMsg("GSSException.BAD_STATUS",
+ "An invalid status code was supplied.");
+ case BAD_MIC:
+ return getMsg("GSSException.BAD_MIC",
+ "A token had an invalid MIC.");
+ case NO_CRED:
+ return getMsg("GSSException.NO_CRED",
+ "No credentials were supplied, or the credentials were "+
+ "unavailable or inaccessible.");
+ case NO_CONTEXT:
+ return getMsg("GSSException.NO_CONTEXT",
+ "Invalid context has been supplied.");
+ case DEFECTIVE_TOKEN:
+ return getMsg("GSSException.DEFECTIVE_TOKEN",
+ "A supplied token was invalid.");
+ case DEFECTIVE_CREDENTIAL:
+ return getMsg("GSSException.DEFECTIVE_CREDENTIAL",
+ "A supplied credential was invalid.");
+ case CREDENTIALS_EXPIRED:
+ return getMsg("GSSException.CREDENTIALS_EXPIRED",
+ "The referenced credentials have expired.");
+ case CONTEXT_EXPIRED:
+ return getMsg("GSSException.CONTEXT_EXPIRED",
+ "The context has expired.");
+ case FAILURE:
+ return getMsg("GSSException.FAILURE",
+ "Miscellaneous failure.");
+ case BAD_QOP:
+ return getMsg("GSSException.BAD_QOP",
+ "The quality-of-protection requested could not be provided.");
+ case UNAUTHORIZED:
+ return getMsg("GSSException.UNAUTHORIZED",
+ "The operation is forbidden by local security policy.");
+ case UNAVAILABLE:
+ return getMsg("GSSException.UNAVAILABLE",
+ "The operation or option is unavailable.");
+ case DUPLICATE_ELEMENT:
+ return getMsg("GSSException.DUPLICATE_ELEMENT",
+ "The requested credential element already exists.");
+ case NAME_NOT_MN:
+ return getMsg("GSSException.NAME_NOT_MN",
+ "The provided name was not a mechanism name.");
+ case OLD_TOKEN:
+ return getMsg("GSSException.OLD_TOKEN",
+ "The token's validity period has expired.");
+ case DUPLICATE_TOKEN:
+ return getMsg("GSSException.DUPLICATE_TOKEN",
+ "The token was a duplicate of an earlier version.");
+ case UNSEQ_TOKEN:
+ return getMsg("GSSException.UNSEQ_TOKEN",
+ "A later token has already been processed.");
+ case GAP_TOKEN:
+ return getMsg("GSSException.GAP_TOKEN",
+ "An expected per-message token was not received.");
+ default: return "Unknown or invalid error code.";
+ }
+ }
+
+ /**
+ * Returns a string explaining the mechanism specific error code.
+ * <code>null</code> will be returned when no mechanism error code has
+ * been set.
+ *
+ * @return The minor error string, or <code>null</code>.
+ */
+ public String getMinorString()
+ {
+ return minorString;
+ }
+
+ /**
+ * Used internally by the GSS-API implementation and the underlying
+ * mechanisms to set the minor code and its textual representation.
+ *
+ * @param minorCode The mechanism specific error code.
+ * @param message A textual explanation of the mechanism error code.
+ */
+ public void setMinor(int minorCode, String message)
+ {
+ this.minor = minorCode;
+ this.minorString = message;
+ }
+
+ /**
+ * Returns a textual representation of both the major and minor status
+ * codes.
+ *
+ * @return The textual representation.
+ */
+ public String toString()
+ {
+ return GSSException.class.getName() + ": " + getMessage();
+ }
+
+ /**
+ * Returns a detailed message of this exception. Overrides {@link
+ * Throwable#getMessage()}. It is customary in Java to use this method to
+ * obtain exception information.
+ *
+ * @return The detail message.
+ */
+ public String getMessage()
+ {
+ if (minor == 0)
+ return getMajorString();
+ else
+ return getMajorString() + " (" + minorString + ")";
+ }
+
+ // Own methods.
+ // -------------------------------------------------------------------------
+
+ private String getMsg(String key, String defaultText)
+ {
+ if (messages != null)
+ {
+ try
+ {
+ return messages.getString(key);
+ }
+ catch (Exception e)
+ {
+ }
+ }
+ return defaultText;
+ }
+}
diff --git a/libjava/classpath/org/ietf/jgss/GSSManager.java b/libjava/classpath/org/ietf/jgss/GSSManager.java
new file mode 100644
index 00000000000..3c735a2fdb5
--- /dev/null
+++ b/libjava/classpath/org/ietf/jgss/GSSManager.java
@@ -0,0 +1,501 @@
+/* GSSManager.java -- manager class for the GSS-API.
+ Copyright (C) 2004 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.
+
+ The documentation comments of this class are derived from the text
+ of RFC 2853: Generic Security Service API Version 2: Java Bindings.
+ That document is covered under the following license notice:
+
+Copyright (C) The Internet Society (2000). All Rights Reserved.
+
+This document and translations of it may be copied and furnished to
+others, and derivative works that comment on or otherwise explain it
+or assist in its implementation may be prepared, copied, published and
+distributed, in whole or in part, without restriction of any kind,
+provided that the above copyright notice and this paragraph are
+included on all such copies and derivative works. However, this
+document itself may not be modified in any way, such as by removing
+the copyright notice or references to the Internet Society or other
+Internet organizations, except as needed for the purpose of developing
+Internet standards in which case the procedures for copyrights defined
+in the Internet Standards process must be followed, or as required to
+translate it into languages other than English.
+
+The limited permissions granted above are perpetual and will not be
+revoked by the Internet Society or its successors or assigns.
+
+This document and the information contained herein is provided on an
+"AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING
+TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT
+NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN
+WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF
+MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. */
+
+
+package org.ietf.jgss;
+
+import java.security.Provider;
+import java.security.Security;
+
+/**
+ * <p>The GSSManager class is an abstract class that serves as a factory
+ * for three GSS interfaces: {@link GSSName}, {@link GSSCredential}, and
+ * {@link GSSContext}. It also provides methods for applications to determine
+ * what mechanisms are available from the GSS implementation and what
+ * nametypes these mechanisms support. An instance of the default GSSManager
+ * subclass may be obtained through the static method {@link #getInstance()},
+ * but applications are free to instantiate other subclasses of GSSManager.</p>
+ *
+ * <p>All but one method in this class are declared abstract. This means
+ * that subclasses have to provide the complete implementation for those
+ * methods. The only exception to this is the static method {@link
+ * #getInstance()} which will have platform specific code to return an
+ * instance of the default subclass.</p>
+ *
+ * <p>Platform providers of GSS are required not to add any constructors to
+ * this class, private, public, or protected. This will ensure that all
+ * subclasses invoke only the default constructor provided to the base
+ * class by the compiler.</p>
+ *
+ * <p>A subclass extending the GSSManager abstract class may be implemented
+ * as a modular provider based layer that utilizes some well known
+ * service provider specification. The GSSManager API provides the
+ * application with methods to set provider preferences on such an
+ * implementation. These methods also allow the implementation to throw
+ * a well-defined exception in case provider based configuration is not
+ * supported. Applications that expect to be portable should be aware of
+ * this and recover cleanly by catching the exception.</p>
+ *
+ * <p>It is envisioned that there will be three most common ways in which
+ * providers will be used:</p>
+ *
+ * <ol>
+ * <li>The application does not care about what provider is used (the
+ * default case).</li>
+ *
+ * <li>The application wants a particular provider to be used
+ * preferentially, either for a particular mechanism or all the
+ * time, irrespective of mechanism.</li>
+ *
+ * <li>The application wants to use the locally configured providers
+ * as far as possible but if support is missing for one or more
+ * mechanisms then it wants to fall back on its own provider.</li>
+ * </ol>
+ *
+ * <p>The GSSManager class has two methods that enable these modes of
+ * usage: {@link #addProviderAtFront(java.security.Provider,org.ietf.jgss.Oid)}
+ * and {@link #addProviderAtEnd(java.security.Provider,org.ietf.jgss.Oid)}.
+ * These methods have the effect of creating an ordered list of
+ * (<i>provider</i>, <i>oid</i>) pairs where each pair indicates a preference
+ * of provider for a given oid.</p>
+ *
+ * <p>The use of these methods does not require any knowledge of whatever
+ * service provider specification the GSSManager subclass follows. It is
+ * hoped that these methods will serve the needs of most applications.
+ * Additional methods may be added to an extended GSSManager that could
+ * be part of a service provider specification that is standardized
+ * later.</p>
+ *
+ * <h3>Example Code</h3>
+ *
+ * <pre>
+GSSManager mgr = GSSManager.getInstance();
+
+// What mechs are available to us?
+Oid[] supportedMechs = mgr.getMechs();
+
+// Set a preference for the provider to be used when support is needed
+// for the mechanisms "1.2.840.113554.1.2.2" and "1.3.6.1.5.5.1.1".
+
+Oid krb = new Oid("1.2.840.113554.1.2.2");
+Oid spkm1 = new Oid("1.3.6.1.5.5.1.1");
+
+Provider p = (Provider) (new com.foo.security.Provider());
+
+mgr.addProviderAtFront(p, krb);
+mgr.addProviderAtFront(p, spkm1);
+
+// What name types does this spkm implementation support?
+Oid[] nameTypes = mgr.getNamesForMech(spkm1);
+</pre>
+ */
+public abstract class GSSManager
+{
+
+ // Constructor.
+ // -------------------------------------------------------------------------
+
+ public GSSManager()
+ {
+ }
+
+ // Class method.
+ // -------------------------------------------------------------------------
+
+ /**
+ * Returns the default GSSManager implementation.
+ *
+ * @return The default GSSManager implementation.
+ */
+ public static synchronized GSSManager getInstance()
+ {
+ String impl = Security.getProperty("org.ietf.jgss.GSSManager");
+ if (impl == null)
+ impl = "gnu.crypto.gssapi.GSSManagerImpl";
+ try
+ {
+ ClassLoader loader = GSSManager.class.getClassLoader();
+ if (loader == null)
+ loader = ClassLoader.getSystemClassLoader();
+ Class c = loader.loadClass(impl);
+ return (GSSManager) c.newInstance();
+ }
+ catch (Exception x)
+ {
+ throw new RuntimeException(x.toString());
+ }
+ }
+
+ // Abstract methods.
+ // -------------------------------------------------------------------------
+
+ /**
+ * <p>This method is used to indicate to the GSSManager that the
+ * application would like a particular provider to be used if no other
+ * provider can be found that supports the given mechanism. When a value
+ * of null is used instead of an Oid for the mechanism, the GSSManager
+ * must use the indicated provider for any mechanism.</p>
+ *
+ * <p>Calling this method repeatedly preserves the older settings but
+ * raises them above newer ones in preference thus forming an ordered
+ * list of providers and Oid pairs that grows at the bottom. Thus the
+ * older provider settings will be utilized first before this one is.</p>
+ *
+ * <p>If there are any previously existing preferences that conflict with
+ * the preference being set here, then the GSSManager should ignore this
+ * request.</p>
+ *
+ * <p>If the GSSManager implementation does not support an SPI with a
+ * pluggable provider architecture it should throw a GSSException with
+ * the status code {@link GSSException#UNAVAILABLE} to indicate that the
+ * operation is unavailable.</p>
+ *
+ * @param p The provider instance that should be used whenever
+ * support is needed for <i>mech</i>.
+ * @param mech The mechanism for which the provider is being set.
+ * @throws GSSException If this service is unavailable.
+ */
+ public abstract void addProviderAtEnd(Provider p, Oid mech)
+ throws GSSException;
+
+ /**
+ * <p>This method is used to indicate to the GSSManager that the
+ * application would like a particular provider to be used ahead of all
+ * others when support is desired for the given mechanism. When a value
+ * of null is used instead of an Oid for the mechanism, the GSSManager
+ * must use the indicated provider ahead of all others no matter what
+ * the mechanism is. Only when the indicated provider does not support
+ * the needed mechanism should the GSSManager move on to a different
+ * provider.</p>
+ *
+ * <p>Calling this method repeatedly preserves the older settings but
+ * lowers them in preference thus forming an ordered list of provider
+ * and Oid pairs that grows at the top.</p>
+ *
+ * <p>Calling addProviderAtFront with a null Oid will remove all previous
+ * preferences that were set for this provider in the GSSManager
+ * instance. Calling addProviderAtFront with a non-null Oid will remove
+ * any previous preference that was set using this mechanism and this
+ * provider together.</p>
+ *
+ * <p>If the GSSManager implementation does not support an SPI with a
+ * pluggable provider architecture it should throw a GSSException with
+ * the status code {@link GSSException#UNAVAILABLE} to indicate that the
+ * operation is unavailable.</p>
+ *
+ * @param p The provider instance that should be used whenever
+ * support is needed for <i>mech</i>.
+ * @param mech The mechanism for which the provider is being set.
+ * @throws GSSException If this service is unavailable.
+ */
+ public abstract void addProviderAtFront(Provider p, Oid mech)
+ throws GSSException;
+
+ /**
+ * Factory method for creating a previously exported context. The
+ * context properties will be determined from the input token and can't
+ * be modified through the set methods.
+ *
+ * @param interProcessToken The token previously emitted from the
+ * export method.
+ * @return The context.
+ * @throws GSSException If this operation fails.
+ */
+ public abstract GSSContext createContext(byte[] interProcessToken)
+ throws GSSException;
+
+ /**
+ * Factory method for creating a context on the acceptor' side. The
+ * context's properties will be determined from the input token supplied
+ * to the accept method.
+ *
+ * @param myCred Credentials for the acceptor. Use <code>null</code> to
+ * act as a default acceptor principal.
+ * @return The context.
+ * @throws GSSException If this operation fails.
+ */
+ public abstract GSSContext createContext(GSSCredential myCred)
+ throws GSSException;
+
+ /**
+ * Factory method for creating a context on the initiator's side.
+ * Context flags may be modified through the mutator methods prior to
+ * calling {@link
+ * GSSContext#initSecContext(java.io.InputStream,java.io.OutputStream)}.
+ *
+ * @param peer Name of the target peer.
+ * @param mech Oid of the desired mechanism. Use <code>null</code>
+ * to request default mechanism.
+ * @param myCred Credentials of the initiator. Use <code>null</code>
+ * default initiator principal.
+ * @param lifetime The request lifetime, in seconds, for the context.
+ * Use {@link GSSContext#INDEFINITE_LIFETIME} and
+ * {@link GSSContext#DEFAULT_LIFETIME} to request
+ * indefinite or default context lifetime.
+ * @return The context.
+ * @throws GSSException If this operation fails.
+ */
+ public abstract GSSContext createContext(GSSName peer, Oid mech,
+ GSSCredential myCred, int lifetime)
+ throws GSSException;
+
+ /**
+ * Factory method for acquiring default credentials. This will cause
+ * the GSS-API to use system specific defaults for the set of
+ * mechanisms, name, and a DEFAULT lifetime.
+ *
+ * @param usage The intended usage for this credential object. The
+ * value of this parameter must be one of:
+ * {@link GSSCredential#ACCEPT_AND_INITIATE},
+ * {@link GSSCredential#ACCEPT_ONLY},
+ * {@link GSSCredential#INITIATE_ONLY}.
+ * @return The credential.
+ * @throws GSSException If this operation fails.
+ */
+ public abstract GSSCredential createCredential(int usage) throws GSSException;
+
+ /**
+ * Factory method for acquiring a single mechanism credential.
+ *
+ * @param aName Name of the principal for whom this credential is to
+ * be acquired. Use <code>null</code> to specify the
+ * default principal.
+ * @param lifetime The number of seconds that credentials should remain
+ * valid. Use {@link GSSCredential#INDEFINITE_LIFETIME}
+ * to request that the credentials have the maximum
+ * permitted lifetime. Use {@link
+ * GSSCredential#DEFAULT_LIFETIME} to request default
+ * credential lifetime.
+ * @param mech The oid of the desired mechanism. Use <code>null</code>
+ * to request the default mechanism(s).
+ * @param usage The intended usage for this credential object. The
+ * value of this parameter must be one of:
+ * {@link GSSCredential#ACCEPT_AND_INITIATE},
+ * {@link GSSCredential#ACCEPT_ONLY},
+ * {@link GSSCredential#INITIATE_ONLY}.
+ * @return The credential.
+ * @throws GSSException If this operation fails.
+ */
+ public abstract GSSCredential createCredential(GSSName aName, int lifetime,
+ Oid mech, int usage)
+ throws GSSException;
+
+ /**
+ * Factory method for acquiring credentials over a set of mechanisms.
+ * Acquires credentials for each of the mechanisms specified in the
+ * array called mechs. To determine the list of mechanisms' for which
+ * the acquisition of credentials succeeded, the caller should use the
+ * {@link GSSCredential#getMechs()} method.
+ *
+ * @param aName Name of the principal for whom this credential is to
+ * be acquired. Use <code>null</code> to specify the
+ * default principal.
+ * @param lifetime The number of seconds that credentials should remain
+ * valid. Use {@link GSSCredential#INDEFINITE_LIFETIME}
+ * to request that the credentials have the maximum
+ * permitted lifetime. Use {@link
+ * GSSCredential#DEFAULT_LIFETIME} to request default
+ * credential lifetime.
+ * @param mechs The array of mechanisms over which the credential is
+ * to be acquired. Use <code>null</code> for requesting
+ * a system specific default set of mechanisms.
+ * @param usage The intended usage for this credential object. The
+ * value of this parameter must be one of:
+ * {@link GSSCredential#ACCEPT_AND_INITIATE},
+ * {@link GSSCredential#ACCEPT_ONLY},
+ * {@link GSSCredential#INITIATE_ONLY}.
+ * @return The credential.
+ * @throws GSSException If this operation fails.
+ */
+ public abstract GSSCredential createCredential(GSSName aName, int lifetime,
+ Oid[] mechs, int usage)
+ throws GSSException;
+
+ /**
+ * Factory method to convert a contiguous byte array containing a name
+ * from the specified namespace to a {@link GSSName} object. In general,
+ * the {@link GSSName} object created will not be an MN; two examples that
+ * are exceptions to this are when the namespace type parameter indicates
+ * {@link GSSName#NT_EXPORT_NAME} or when the GSS-API implementation is not
+ * multi-mechanism.
+ *
+ * @param name The byte array containing the name to create.
+ * @param nameType The Oid specifying the namespace of the name supplied
+ * in the byte array. Note that nameType serves to
+ * describe and qualify the interpretation of the input
+ * name byte array, it does not necessarily imply a type
+ * for the output GSSName implementation. "null" value
+ * can be used to specify that a mechanism specific
+ * default syntax should be assumed by each mechanism
+ * that examines the byte array.
+ * @return The name.
+ * @throws GSSException If this operation fails.
+ */
+ public abstract GSSName createName(byte[] name, Oid nameType)
+ throws GSSException;
+
+ /**
+ * Factory method to convert a contiguous byte array containing a name
+ * from the specified namespace to a GSSName object that is an MN. In
+ * other words, this method is a utility that does the equivalent of two
+ * steps: {@link #createName(byte[],org.ietf.jgss.Oid)} and then also
+ * {@link GSSName#canonicalize(org.ietf.jgss.Oid)}.
+ *
+ * @param name The byte array representing the name to create.
+ * @param nameType The Oid specifying the namespace of the name supplied
+ * in the byte array. Note that nameType serves to
+ * describe and qualify the interpretation of the input
+ * name byte array, it does not necessarily imply a type
+ * for the output GSSName implementation. "null" value
+ * can be used to specify that a mechanism specific
+ * default syntax should be assumed by each mechanism
+ * that examines the byte array.
+ * @param mech Oid specifying the mechanism for which this name
+ * should be created.
+ * @return The name.
+ * @throws GSSException If this operation fails.
+ */
+ public abstract GSSName createName(byte[] name, Oid nameType, Oid mech)
+ throws GSSException;
+
+ /**
+ * Factory method to convert a contiguous string name from the specified
+ * namespace to a {@link GSSName} object. In general, the {@link GSSName}
+ * object created will not be an MN; two examples that are exceptions to
+ * this are when the namespace type parameter indicates {@link
+ * GSSName#NT_EXPORT_NAME} or when the GSS-API implementation is not
+ * multi-mechanism.
+ *
+ * @param nameStr The string representing a printable form of the name
+ * to create.
+ * @param nameType The Oid specifying the namespace of the printable name
+ * supplied. Note that nameType serves to describe and
+ * qualify the interpretation of the input nameStr, it
+ * does not necessarily imply a type for the output
+ * GSSName implementation. "null" value can be used to
+ * specify that a mechanism specific default printable
+ * syntax should be assumed by each mechanism that
+ * examines nameStr.
+ * @return The name.
+ * @throws GSSException If this operation fails.
+ */
+ public abstract GSSName createName(String nameStr, Oid nameType)
+ throws GSSException;
+
+ /**
+ * Factory method to convert a contiguous string name from the specified
+ * namespace to an GSSName object that is a mechanism name (MN). In
+ * other words, this method is a utility that does the equivalent of two
+ * steps: the {@link #createName(java.lang.String,org.ietf.jgss.Oid)}
+ * and then also {@link GSSName#canonicalize(org.ietf.jgss.Oid)}.
+ *
+ * @param nameStr The string representing a printable form of the name
+ * to create.
+ * @param nameType The Oid specifying the namespace of the printable name
+ * supplied. Note that nameType serves to describe and
+ * qualify the interpretation of the input nameStr, it
+ * does not necessarily imply a type for the output
+ * GSSName implementation. "null" value can be used to
+ * specify that a mechanism specific default printable
+ * syntax should be assumed when the mechanism examines
+ * nameStr.
+ * @param mech Oid specifying the mechanism for which this name
+ * should be created.
+ * @return The name.
+ * @throws GSSException If this operation fails.
+ */
+ public abstract GSSName createName(String nameStr, Oid nameType, Oid mech)
+ throws GSSException;
+
+ /**
+ * Returns an array of {@link Oid} objects indicating mechanisms available
+ * to GSS-API callers. A <code>null</code> value is returned when no
+ * mechanism are available (an example of this would be when mechanism are
+ * dynamically configured, and currently no mechanisms are installed).
+ *
+ * @return The array of available mechanisms, or <code>null</code>.
+ */
+ public abstract Oid[] getMechs();
+
+ /**
+ * Returns an array of {@link Oid} objects corresponding to the mechanisms
+ * that support the specific name type. <code>null</code> is returned when
+ * no mechanisms are found to support the specified name type.
+ *
+ * @param name The Oid object for the name type.
+ * @return The array of mechanisms, or <code>null</code>.
+ */
+ public abstract Oid[] getMechsForName(Oid name);
+
+ /**
+ * Returns name type Oid's supported by the specified mechanism.
+ *
+ * @param mechanism The Oid object for the mechanism to query.
+ * @return The name type Oid's supported by the mechanism.
+ * @throws GSSException If this operation fails.
+ */
+ public abstract Oid[] getNamesForMech(Oid mechanism) throws GSSException;
+}
diff --git a/libjava/classpath/org/ietf/jgss/GSSName.java b/libjava/classpath/org/ietf/jgss/GSSName.java
new file mode 100644
index 00000000000..5550697b5f0
--- /dev/null
+++ b/libjava/classpath/org/ietf/jgss/GSSName.java
@@ -0,0 +1,269 @@
+/* GSSName.java -- a name interface for GSS.
+ Copyright (C) 2004 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.
+
+ The documentation comments of this class are derived from the text
+ of RFC 2853: Generic Security Service API Version 2: Java Bindings.
+ That document is covered under the following license notice:
+
+Copyright (C) The Internet Society (2000). All Rights Reserved.
+
+This document and translations of it may be copied and furnished to
+others, and derivative works that comment on or otherwise explain it
+or assist in its implementation may be prepared, copied, published and
+distributed, in whole or in part, without restriction of any kind,
+provided that the above copyright notice and this paragraph are
+included on all such copies and derivative works. However, this
+document itself may not be modified in any way, such as by removing
+the copyright notice or references to the Internet Society or other
+Internet organizations, except as needed for the purpose of developing
+Internet standards in which case the procedures for copyrights defined
+in the Internet Standards process must be followed, or as required to
+translate it into languages other than English.
+
+The limited permissions granted above are perpetual and will not be
+revoked by the Internet Society or its successors or assigns.
+
+This document and the information contained herein is provided on an
+"AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING
+TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT
+NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN
+WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF
+MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. */
+
+
+package org.ietf.jgss;
+
+/**
+ * <p>This interface encapsulates a single GSS-API principal entity.
+ * Different name formats and their definitions are identified with
+ * universal Object Identifiers (Oids). The format of the names can be
+ * derived based on the unique oid of its namespace type.</p>
+ *
+ * <h3>Example Code</h3>
+ *
+ * <pre>
+GSSManager mgr = GSSManager.getInstance();
+
+// create a host based service name
+GSSName name = mgr.createName("service@host",
+ GSSName.NT_HOSTBASED_SERVICE);
+
+Oid krb5 = new Oid("1.2.840.113554.1.2.2");
+
+GSSName mechName = name.canonicalize(krb5);
+
+// the above two steps are equivalent to the following
+GSSName mechName = mgr.createName("service@host",
+ GSSName.NT_HOSTBASED_SERVICE, krb5);
+
+// perform name comparison
+if (name.equals(mechName))
+ print("Names are equal.");
+
+// obtain textual representation of name and its printable
+// name type
+print(mechName.toString() +
+ mechName.getStringNameType().toString());
+
+// export and re-import the name
+byte [] exportName = mechName.export();
+
+// create a new name object from the exported buffer
+GSSName newName = mgr.createName(exportName,
+ GSSName.NT_EXPORT_NAME);
+</pre>
+ */
+public interface GSSName
+{
+
+ // Constants.
+ // -------------------------------------------------------------------------
+
+ /**
+ * <p>Name type for representing an anonymous entity. It represents the
+ * following value: <code>{ 1(iso), 3(org), 6(dod), 1(internet), 5(security),
+ * 6(nametypes), 3(gss-anonymous-name) }</code>.</p>
+ */
+ Oid NT_ANONYMOUS = new Oid(new int[] { 1, 3, 6, 1, 5, 6, 3 });
+
+ /**
+ * <p>Name type used to indicate an exported name produced by the export
+ * method. It represents the following value: <code>{ 1(iso), 3(org), 6(dod),
+ * 1(internet), 5(security), 6(nametypes), 4(gss-api-exported-name)
+ * }</code>.</p>
+ */
+ Oid NT_EXPORT_NAME = new Oid(new int[] { 1, 3, 6, 1, 5, 6, 4 });
+
+ /**
+ * <p>Oid indicating a host-based service name form. It is used to
+ * represent services associated with host computers. This name form is
+ * constructed using two elements, "service" and "hostname", as follows:</p>
+ *
+ * <blockquote><code>service@hostname</code></blockquote>
+ *
+ * <p>Values for the "service" element are registered with the IANA. It
+ * represents the following value: <code>{ 1(iso), 3(org), 6(dod),
+ * 1(internet), 5(security), 6(nametypes), 2(gss-host-based-services)
+ * }</code>.</p>
+ */
+ Oid NT_HOSTBASED_SERVICE = new Oid(new int[] { 1, 3, 6, 1, 5, 6, 2 });
+
+ /**
+ * <p>Name type to indicate a numeric user identifier corresponding to a
+ * user on a local system. (e.g. Uid). It represents the following
+ * value: <code>{ iso(1) member-body(2) United States(840) mit(113554)
+ * infosys(1) gssapi(2) generic(1) machine_uid_name(2) }</code>.</p>
+ */
+ Oid NT_MACHINE_UID_NAME = new Oid(new int[] { 1, 2, 840, 113554, 1, 2, 1, 2 });
+
+ /**
+ * <p>Name type to indicate a string of digits representing the numeric
+ * user identifier of a user on a local system. It represents the
+ * following value: <code>{ iso(1) member-body(2) United States(840)
+ * mit(113554) infosys(1) gssapi(2) generic(1) string_uid_name(3)
+ * }</code>.</p>
+ */
+ Oid NT_STRING_UID_NAME = new Oid(new int[] { 1, 2, 840, 113554, 1, 2, 1, 3 });
+
+ /**
+ * <p>Name type to indicate a named user on a local system. It represents
+ * the following value: <code>{ iso(1) member-body(2) United States(840)
+ * mit(113554) infosys(1) gssapi(2) generic(1) user_name(1) }</code>.</p>
+ */
+ Oid NT_USER_NAME = new Oid(new int[] { 1, 2, 840, 113554, 1, 2, 1, 1 });
+
+ // Instance methods.
+ // -------------------------------------------------------------------------
+
+ /**
+ * Compares two GSSName objects to determine whether they refer to the
+ * same entity. This method may throw a {@link GSSException} when the
+ * names cannot be compared. If either of the names represents an
+ * anonymous entity, the method will return <code>false</code>.
+ *
+ * @param another GSSName object to compare with.
+ * @return True if this name equals the other, and if neither name
+ * represents an anonymous entity.
+ * @throws GSSException If the names cannot be compared.
+ */
+ boolean equals(GSSName another) throws GSSException;
+
+ /**
+ * A variation of the {@link #equals(org.ietf.jgss.GSSName)} method that
+ * is provided to override the {@link Object#equals(java.lang.Object)}
+ * method that the implementing class will inherit. The behavior is
+ * exactly the same as that in the other equals method except that no
+ * {@link GSSException} is thrown; instead, <code>false</code> will be
+ * returned in the situation where an error occurs. (Note that the Java
+ * language specification requires that two objects that are equal
+ * according to the {@link Object#equals(java.lang.Object)} method must
+ * return the same integer when the {@link hashCode()} method is called
+ * on them.
+ *
+ * @param another GSSName object to compare with.
+ * @return True if this name equals the other, if neither name
+ * represents an anonymous entity, or if an error occurs.
+ */
+ boolean equals(Object another);
+
+ /**
+ * Creates a mechanism name (MN) from an arbitrary internal name. This
+ * is equivalent to using the factory methods {@link
+ * GSSManager#createName(java.lang.String,org.ietf.jgss.Oid,org.ietf.jgss.Oid)}
+ * or {@link
+ * GSSManager#createName(byte[],org.ietf.jgss.Oid,org.ietf.jgss.Oid)}.
+ *
+ * @param mech The oid for the mechanism for which the canonical form
+ * of the name is requested.
+ * @return The mechanism name.
+ * @throws GSSException If this operation fails.
+ */
+ GSSName canonicalize(Oid mech) throws GSSException;
+
+ /**
+ * Returns a canonical contiguous byte representation of a mechanism
+ * name (MN), suitable for direct, byte by byte comparison by
+ * authorization functions. If the name is not an MN, implementations
+ * may throw a {@link GSSException} with the {@link GSSException#NAME_NOT_MN}
+ * status code. If an implementation chooses not to throw an exception,
+ * it should use some system specific default mechanism to canonicalize
+ * the name and then export it. The format of the header of the output
+ * buffer is specified in <a
+ * href="http://www.ietf.org/rfc/rfc2743.txt">RFC 2743</a>.
+ *
+ * @return The exported name.
+ * @throws GSSException If the name is not an MN and the implementation
+ * throws an exception for this case.
+ */
+ byte[] export() throws GSSException;
+
+ /**
+ * Returns a textual representation of the GSSName object. To retrieve
+ * the printed name format, which determines the syntax of the returned
+ * string, the {@link #getStringNameType()} method can be used.
+ *
+ * @return The textual representation of the GSSName object.
+ */
+ String toString();
+
+ /**
+ * Returns the oid representing the type of name returned through the
+ * {@link #toString()} method. Using this oid, the syntax of the printable
+ * name can be determined.
+ *
+ * @return The name type.
+ * @throws GSSException If this operation fails.
+ */
+ Oid getStringNameType() throws GSSException;
+
+ /**
+ * Tests if this name object represents an anonymous entity. Returns
+ * <code>true</code> if this is an anonymous name.
+ *
+ * @return True if this name represents an anonymous entity.
+ */
+ boolean isAnonymous();
+
+ /**
+ * Tests if this name object contains only one mechanism element and is
+ * thus a mechanism name as defined by <a
+ * href="http://www.ietf.org/rfc/rfc2743.txt">RFC 2743</a>.
+ *
+ * @return True if this name is a mechanism name.
+ */
+ boolean isMN();
+}
diff --git a/libjava/classpath/org/ietf/jgss/MessageProp.java b/libjava/classpath/org/ietf/jgss/MessageProp.java
new file mode 100644
index 00000000000..5c79455acdf
--- /dev/null
+++ b/libjava/classpath/org/ietf/jgss/MessageProp.java
@@ -0,0 +1,273 @@
+/* MessageProp.java -- GSS-API message property.
+ Copyright (C) 2004 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.
+
+ The documentation comments of this class are derived from the text
+ of RFC 2853: Generic Security Service API Version 2: Java Bindings.
+ That document is covered under the following license notice:
+
+Copyright (C) The Internet Society (2000). All Rights Reserved.
+
+This document and translations of it may be copied and furnished to
+others, and derivative works that comment on or otherwise explain it
+or assist in its implementation may be prepared, copied, published and
+distributed, in whole or in part, without restriction of any kind,
+provided that the above copyright notice and this paragraph are
+included on all such copies and derivative works. However, this
+document itself may not be modified in any way, such as by removing
+the copyright notice or references to the Internet Society or other
+Internet organizations, except as needed for the purpose of developing
+Internet standards in which case the procedures for copyrights defined
+in the Internet Standards process must be followed, or as required to
+translate it into languages other than English.
+
+The limited permissions granted above are perpetual and will not be
+revoked by the Internet Society or its successors or assigns.
+
+This document and the information contained herein is provided on an
+"AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING
+TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT
+NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN
+WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF
+MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. */
+
+
+package org.ietf.jgss;
+
+/**
+ * <p>This is a utility class used within the per-message {@link
+ * GSSContext} methods to convey per-message properties.</p>
+ *
+ * <p>When used with the GSSContext interface's {@link
+ * GSSContext#wrap(byte[],int,int,org.ietf.jgss.MessageProp)} and {@link
+ * GSSContext#getMIC(byte[],int,int,org.ietf.jgss.MessageProp)} methods, an
+ * instance of this class is used to indicate the desired QOP and to
+ * request if confidentiality services are to be applied to caller
+ * supplied data (wrap only). To request default QOP, the value of 0
+ * should be used for QOP.</p>
+ *
+ * <p>When used with the {@link
+ * GSSContext#unwrap(byte[],int,int,org.ietf.jgss.MessageProp)} and {@link
+ * GSSContext#verifyMIC(byte[],int,int,byte[],int,int,org.ietf.jgss.MessageProp)}
+ * methods of the GSSContext interface, an instance of this class will be
+ * used to indicate the applied QOP and confidentiality services over the
+ * supplied message. In the case of verifyMIC, the confidentiality state
+ * will always be "false". Upon return from these methods, this object will
+ * also contain any supplementary status values applicable to the processed
+ * token. The supplementary status values can indicate old tokens, out
+ * of sequence tokens, gap tokens or duplicate tokens.</p>
+ */
+public class MessageProp
+{
+
+ // Fields.
+ // -------------------------------------------------------------------------
+
+ private int qopVal;
+ private boolean privState;
+ private boolean duplicate;
+ private boolean old;
+ private boolean unseq;
+ private boolean gap;
+ private int minorStatus;
+ private String minorString;
+
+ // Constructors.
+ // -------------------------------------------------------------------------
+
+ /**
+ * <p>Constructor which sets QOP to 0 indicating that the default QOP is
+ * requested.</p>
+ *
+ * @param privState The desired privacy state. "true" for privacy and
+ * "false" for integrity only.
+ */
+ public MessageProp(boolean privState)
+ {
+ this(0, privState);
+ }
+
+ /**
+ * <p>Constructor which sets the values for the qop and privacy state.</p>
+ *
+ * @param qop The desired QOP. Use 0 to request a default QOP.
+ * @param privState The desired privacy state. "true" for privacy and
+ * "false" for integrity only.
+ */
+ public MessageProp(int qop, boolean privState)
+ {
+ this.qopVal = qop;
+ this.privState = privState;
+ }
+
+ // Instance methods.
+ // -------------------------------------------------------------------------
+
+ /**
+ * Retrieves the QOP value.
+ *
+ * @return The QOP value.
+ */
+ public int getQOP()
+ {
+ return qopVal;
+ }
+
+ /**
+ * Retrieves the privacy state.
+ *
+ * @return The privacy state.
+ */
+ public boolean getPrivacy()
+ {
+ return privState;
+ }
+
+ /**
+ * Retrieves the minor status that the underlying mechanism might have
+ * set.
+ *
+ * @return The minor status.
+ */
+ public int getMinorStatus()
+ {
+ return minorStatus;
+ }
+
+ /**
+ * Returns a string explaining the mechanism specific error code.
+ * <code>null</code> will be returned when no mechanism error code has
+ * been set.
+ *
+ * @return The minor status string.
+ */
+ public String getMinorString()
+ {
+ return minorString;
+ }
+
+ /**
+ * Sets the QOP value.
+ *
+ * @param qopVal The QOP value to be set. Use 0 to request a default
+ * QOP value.
+ */
+ public void setQOP(int qopVal)
+ {
+ this.qopVal = qopVal;
+ }
+
+ /**
+ * Sets the privacy state.
+ *
+ * @param privState The privacy state to set.
+ */
+ public void setPrivacy(boolean privState)
+ {
+ this.privState = privState;
+ }
+
+ /**
+ * Returns "true" if this is a duplicate of an earlier token.
+ *
+ * @return True if this is a duplicate of an earlier token.
+ */
+ public boolean isDuplicateToken()
+ {
+ return duplicate;
+ }
+
+ /**
+ * Returns "true" if the token's validity period has expired.
+ *
+ * @return True if the token's validity period has expired.
+ */
+ public boolean isOldToken()
+ {
+ return old;
+ }
+
+ /**
+ * Returns "true" if a later token has already been processed.
+ *
+ * @return True if a later token has already been processed.
+ */
+ public boolean isUnseqToken()
+ {
+ return unseq;
+ }
+
+ /**
+ * Returns "true" if an expected per-message token was not received.
+ *
+ * @return True if an expected per-message token was not received.
+ */
+ public boolean isGapToken()
+ {
+ return gap;
+ }
+
+ /**
+ * This method sets the state for the supplementary information flags
+ * and the minor status in MessageProp. It is not used by the
+ * application but by the GSS implementation to return this information
+ * to the caller of a per-message context method.
+ *
+ * @param duplicate True if the token was a duplicate of an earlier
+ * token, false otherwise.
+ * @param old True if the token's validity period has expired,
+ * false otherwise.
+ * @param unseq True if a later token has already been processed,
+ * false otherwise.
+ * @param gap True if one or more predecessor tokens have not yet
+ * been successfully processed, false otherwise.
+ * @param minorStatus The integer minor status code that the underlying
+ * mechanism wants to set.
+ * @param minorString The textual representation of the minorStatus
+ * value.
+ */
+ public void setSupplementaryStates(boolean duplicate, boolean old,
+ boolean unseq, boolean gap,
+ int minorStatus, String minorString)
+ {
+ this.duplicate = duplicate;
+ this.old = old;
+ this.unseq = unseq;
+ this.gap = gap;
+ this.minorStatus = minorStatus;
+ this.minorString = minorString;
+ }
+}
diff --git a/libjava/classpath/org/ietf/jgss/Oid.java b/libjava/classpath/org/ietf/jgss/Oid.java
new file mode 100644
index 00000000000..769745611b2
--- /dev/null
+++ b/libjava/classpath/org/ietf/jgss/Oid.java
@@ -0,0 +1,385 @@
+/* Oid.java -- Object identifier class.
+ Copyright (C) 2004 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.
+
+ The documentation comments of this class are derived from the text
+ of RFC 2853: Generic Security Service API Version 2: Java Bindings.
+ That document is covered under the following license notice:
+
+Copyright (C) The Internet Society (2000). All Rights Reserved.
+
+This document and translations of it may be copied and furnished to
+others, and derivative works that comment on or otherwise explain it
+or assist in its implementation may be prepared, copied, published and
+distributed, in whole or in part, without restriction of any kind,
+provided that the above copyright notice and this paragraph are
+included on all such copies and derivative works. However, this
+document itself may not be modified in any way, such as by removing
+the copyright notice or references to the Internet Society or other
+Internet organizations, except as needed for the purpose of developing
+Internet standards in which case the procedures for copyrights defined
+in the Internet Standards process must be followed, or as required to
+translate it into languages other than English.
+
+The limited permissions granted above are perpetual and will not be
+revoked by the Internet Society or its successors or assigns.
+
+This document and the information contained herein is provided on an
+"AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING
+TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT
+NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN
+WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF
+MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. */
+
+
+package org.ietf.jgss;
+
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.DataInputStream;
+import java.io.InputStream;
+import java.io.IOException;
+import java.io.OutputStream;
+
+import java.math.BigInteger;
+
+import java.util.Arrays;
+import java.util.StringTokenizer;
+
+/**
+ * <p>This class represents Universal Object Identifiers (Oids) and their
+ * associated operations.</p>
+ *
+ * <p>Oids are hierarchically globally-interpretable identifiers used
+ * within the GSS-API framework to identify mechanisms and name formats.</p>
+ *
+ * <p>The structure and encoding of Oids is defined in ISOIEC-8824 and
+ * ISOIEC-8825. For example the Oid representation of Kerberos V5
+ * mechanism is "1.2.840.113554.1.2.2".</p>
+ *
+ * <p>The {@link GSSName} name class contains <code>public static Oid</code>
+ * objects representing the standard name types defined in GSS-API.</p>
+ */
+public class Oid
+{
+
+ // Constants and fields.
+ // -------------------------------------------------------------------------
+
+ private static final int OBJECT_IDENTIFIER = 0x06;
+ private static final int RELATIVE_OID = 0x0d;
+
+ private final int[] components;
+ private byte[] derOid;
+ private String strOid;
+ private boolean relative;
+
+ // Constructors.
+ // -------------------------------------------------------------------------
+
+ /**
+ * Creates an Oid object from a string representation of its integer
+ * components (e.g. "1.2.840.113554.1.2.2").
+ *
+ * @param strOid The string representation for the oid.
+ * @throws GSSException If the argument is badly formed.
+ */
+ public Oid(String strOid) throws GSSException
+ {
+ if (strOid == null)
+ throw new NullPointerException();
+ this.strOid = strOid;
+ try
+ {
+ StringTokenizer tok = new StringTokenizer(strOid, ".");
+ components = new int[tok.countTokens()];
+ int i = 0;
+ while (tok.hasMoreTokens() && i < components.length)
+ {
+ components[i++] = Integer.parseInt(tok.nextToken());
+ }
+ }
+ catch (Exception x)
+ {
+ throw new GSSException(GSSException.FAILURE);
+ }
+ relative = false;
+ }
+
+ /**
+ * Creates an Oid object from its DER encoding. This refers to the full
+ * encoding including tag and length. The structure and encoding of
+ * Oids is defined in ISOIEC-8824 and ISOIEC-8825. This method is
+ * identical in functionality to its byte array counterpart.
+ *
+ * @param derOid Stream containing the DER encoded oid.
+ * @throws GSSException If the DER stream is badly formed, or if the
+ * input stream throws an exception.
+ */
+ public Oid(InputStream derOid) throws GSSException
+ {
+ DataInputStream in = new DataInputStream(derOid);
+ try
+ {
+ int tag = in.read() & 0x1F;
+ if (tag != OBJECT_IDENTIFIER && tag != RELATIVE_OID)
+ throw new IOException();
+ int len = in.read();
+ if ((len & ~0x7F) != 0)
+ {
+ byte[] buf = new byte[len & 0x7F];
+ in.readFully(buf);
+ len = new BigInteger(1, buf).intValue();
+ }
+ if (len < 0)
+ throw new IOException();
+ byte[] enc = new byte[len];
+ in.readFully(enc);
+ int[] comp = new int[len + 1];
+ int count = 0;
+ int i = 0;
+ relative = tag == RELATIVE_OID;
+ if (!relative && i < len)
+ {
+ int j = (enc[i] & 0xFF);
+ comp[count++] = j / 40;
+ comp[count++] = j % 40;
+ i++;
+ }
+ while (i < len)
+ {
+ int j = 0;
+ do
+ {
+ j = enc[i++] & 0xFF;
+ comp[count] <<= 7;
+ comp[count] |= j & 0x7F;
+ if (i >= len && (j & 0x80) != 0)
+ throw new IOException();
+ }
+ while ((j & 0x80) != 0);
+ count++;
+ }
+ if (count == len)
+ this.components = comp;
+ else
+ {
+ this.components = new int[count];
+ System.arraycopy(comp, 0, components, 0, count);
+ }
+ }
+ catch (IOException ioe)
+ {
+ throw new GSSException(GSSException.FAILURE);
+ }
+ }
+
+ /**
+ * Creates an Oid object from its DER encoding. This refers to the full
+ * encoding including tag and length. The structure and encoding of
+ * Oids is defined in ISOIEC-8824 and ISOIEC-8825. This method is
+ * identical in functionality to its streaming counterpart.
+ *
+ * @param derOid Byte array storing a DER encoded oid.
+ * @throws GSSException If the DER bytes are badly formed.
+ */
+ public Oid(byte[] derOid) throws GSSException
+ {
+ this(new ByteArrayInputStream(derOid));
+ this.derOid = (byte[]) derOid.clone();
+ }
+
+ Oid(int[] components)
+ {
+ this.components = components;
+ relative = false;
+ }
+
+ // Instance methods.
+ // -------------------------------------------------------------------------
+
+ /**
+ * Returns a string representation of the oid's integer components in
+ * dot separated notation (e.g. "1.2.840.113554.1.2.2").
+ *
+ * @return The string representation of this oid.
+ */
+ public String toString()
+ {
+ if (strOid == null)
+ {
+ StringBuffer buf = new StringBuffer();
+ for (int i = 0; i < components.length; i++)
+ {
+ buf.append(components[i]);
+ if (i < components.length - 1)
+ buf.append('.');
+ }
+ strOid = buf.toString();
+ }
+ return strOid;
+ }
+
+ /**
+ * Returns the full ASN.1 DER encoding for this oid object, which
+ * includes the tag and length.
+ *
+ * @return The ASN.1 DER encoding for this oid.
+ * @throws GSSException If encoding fails.
+ */
+ public byte[] getDER() throws GSSException
+ {
+ if (derOid == null)
+ {
+ ByteArrayOutputStream out = new ByteArrayOutputStream(256);
+ try
+ {
+ int i = 0;
+ if (!relative)
+ {
+ int b = components[i++] * 40 + (components.length > 1
+ ? components[i++] : 0);
+ encodeSubId(out, b);
+ }
+ for ( ; i < components.length; i++)
+ encodeSubId(out, components[i]);
+ byte[] oid = out.toByteArray();
+ out.reset();
+ if (relative)
+ out.write(RELATIVE_OID);
+ else
+ out.write(OBJECT_IDENTIFIER);
+ if (oid.length < 128)
+ out.write(oid.length);
+ else if (oid.length < 256)
+ {
+ out.write(0x81);
+ out.write(oid.length);
+ }
+ else if (oid.length < 65536)
+ {
+ out.write(0x82);
+ out.write((oid.length >>> 8) & 0xFF);
+ out.write(oid.length & 0xFF);
+ }
+ else if (oid.length < 16777216)
+ {
+ out.write(0x83);
+ out.write((oid.length >>> 16) & 0xFF);
+ out.write((oid.length >>> 8) & 0xFF);
+ out.write(oid.length & 0xFF);
+ }
+ else
+ {
+ out.write(0x84);
+ out.write((oid.length >>> 24) & 0xFF);
+ out.write((oid.length >>> 16) & 0xFF);
+ out.write((oid.length >>> 8) & 0xFF);
+ out.write(oid.length & 0xFF);
+ }
+ out.write(oid);
+ }
+ catch (IOException ioe)
+ {
+ throw new GSSException(GSSException.FAILURE);
+ }
+ derOid = out.toByteArray();
+ }
+ return (byte[]) derOid.clone();
+ }
+
+ /**
+ * A utility method to test if an Oid object is contained within the
+ * supplied Oid object array.
+ *
+ * @param oids An array of oids to search.
+ * @return True if this oid is contained in the given array.
+ */
+ public boolean containedIn(Oid[] oids)
+ {
+ for (int i = 0; i < oids.length; i++)
+ {
+ if (equals(oids[i]))
+ return true;
+ }
+ return false;
+ }
+
+ public boolean equals(Object o)
+ {
+ if (!(o instanceof Oid))
+ return false;
+ Oid that = (Oid) o;
+ return Arrays.equals(components, that.components);
+ }
+
+ public int hashCode()
+ {
+ int code = 0;
+ for (int i = 0; i < components.length; i++)
+ code += components[i];
+ return code;
+ }
+
+ // Own methods.
+ // -------------------------------------------------------------------------
+
+ private static void encodeSubId(OutputStream out, int id) throws IOException
+ {
+ if (id < 128)
+ {
+ out.write(id);
+ }
+ else if (id < 16384)
+ {
+ out.write((id >>> 7) | 0x80);
+ out.write(id & 0x7F);
+ }
+ else if (id < 2097152)
+ {
+ out.write((id >>> 14) | 0x80);
+ out.write(((id >>> 7) | 0x80) & 0xFF);
+ out.write(id & 0x7F);
+ }
+ else if (id < 268435456)
+ {
+ out.write( (id >>> 21) | 0x80);
+ out.write(((id >>> 14) | 0x80) & 0xFF);
+ out.write(((id >>> 7) | 0x80) & 0xFF);
+ out.write(id & 0x7F);
+ }
+ }
+}
diff --git a/libjava/classpath/org/omg/CORBA/ARG_IN.java b/libjava/classpath/org/omg/CORBA/ARG_IN.java
new file mode 100644
index 00000000000..582a3cf4c07
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/ARG_IN.java
@@ -0,0 +1,55 @@
+/* ARG_IN.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;
+
+/**
+ * This simple interface defines just one constant, normally used
+ * to mark the parameter as an "input parameter".
+ *
+ * @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
+ *
+ * @see NamedValue
+ */
+public interface ARG_IN
+{
+ /**
+ * The flag, specifying that the parameter is used to pass and not to
+ * return the data.
+ */
+ int value = 1;
+}
diff --git a/libjava/classpath/org/omg/CORBA/ARG_INOUT.java b/libjava/classpath/org/omg/CORBA/ARG_INOUT.java
new file mode 100644
index 00000000000..bcdc17a6910
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/ARG_INOUT.java
@@ -0,0 +1,57 @@
+/* ARG_IN.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;
+
+/**
+ * This simple interface defines just one constant, normally used
+ * to mark that the the parameter is used both to pass and to
+ * return some value. It is a similar conception like passing a
+ * parameter "by reference" in C or Pascal.
+ *
+ * @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
+ *
+ * @see NamedValue
+ */
+public interface ARG_INOUT
+{
+ /**
+ * The constant, specifying that the parameter is used both
+ * to pass and to return the data.
+ */
+ int value = 3;
+}
diff --git a/libjava/classpath/org/omg/CORBA/ARG_OUT.java b/libjava/classpath/org/omg/CORBA/ARG_OUT.java
new file mode 100644
index 00000000000..1ccf243c28f
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/ARG_OUT.java
@@ -0,0 +1,55 @@
+/* ARG_IN.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;
+
+/**
+ * This simple interface defines just one constant, normally used
+ * to mark the parameter as an "output parameter".
+ *
+ * @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
+ *
+ * @see NamedValue
+ */
+public interface ARG_OUT
+{
+ /**
+ * The flag, indicating that the parameter is used to return, and
+ * not to pass the data.
+ */
+ int value = 2;
+}
diff --git a/libjava/classpath/org/omg/CORBA/Any.java b/libjava/classpath/org/omg/CORBA/Any.java
new file mode 100644
index 00000000000..d8c892d218f
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/Any.java
@@ -0,0 +1,454 @@
+/* Any.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;
+
+import java.io.Serializable;
+
+import org.omg.CORBA.portable.IDLEntity;
+
+/**
+ * A container that can store a value of either user defined or
+ * primitive IDL type.
+ *
+ * @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
+ */
+public abstract class Any
+ implements Serializable, IDLEntity
+{
+ /**
+ * Using v 1.4 serialVersionUID for interoperability.
+ */
+ private static final long serialVersionUID = 1217179597823814463L;
+
+ /**
+ * Creates an input stream from that this Any object's value can be
+ * read (unmarshalled).
+ */
+ public abstract org.omg.CORBA.portable.InputStream create_input_stream();
+
+ /**
+ * Creates an output stream into which this <code>Any</code> object's
+ * value can be written (marshalled).
+ *
+ * @return the newly created output stream.
+ */
+ public abstract org.omg.CORBA.portable.OutputStream create_output_stream();
+
+ /**
+ * Compare this <code>Any</code> with another <code>Any</code>.
+ *
+ * @param other the other instance to compare with.
+ *
+ * @return true if both values and value typecodes are equal,
+ * false otherwise.
+ */
+ public abstract boolean equal(Any other);
+
+ /**
+ * Extract the CORBA <code>Object</code> from this <code>Any</code>
+ * @throws BAD_OPERATION if this instance contains value other
+ * than <code>Object</code> or the value has not been set.
+ */
+ public abstract org.omg.CORBA.Object extract_Object()
+ throws BAD_OPERATION;
+
+ /**
+ * Extract the CORBA <code>Principal</code> from this <code>Any</code>
+ *
+ * @throws NO_IMPLEMENT, always.
+ *
+ * @deprecated by CORBA 2.2.
+ */
+ public Principal extract_Principal()
+ {
+ throw new NO_IMPLEMENT();
+ }
+
+ /**
+ * Extract an arbitrary {@link org.omg.CORBA.portable.Streamable } from
+ * this <code>Any</code>.
+ *
+ * @throws BAD_INV_ORDER if the caller has invoked operations in the
+ * wrong order.
+ *
+ * @throws NO_IMPLEMENT, always (override to get functionality).
+ */
+ public org.omg.CORBA.portable.Streamable extract_Streamable()
+ throws org.omg.CORBA.BAD_INV_ORDER
+ {
+ throw new NO_IMPLEMENT();
+ }
+
+ /**
+ * Extract the TypeCode from this <code>Any</code> value field.
+ *
+ * @throws BAD_OPERATION if this instance contains value other
+ * than <code>TypeCode</code> or the value has not been set.
+ */
+ public abstract TypeCode extract_TypeCode()
+ throws BAD_OPERATION;
+
+ /**
+ * Extract the CORBA <code>Value</code> from this <code>Any</code>
+ * @throws BAD_OPERATION if this instance contains value other
+ * than <code>Value</code> or the value has not been set.
+ */
+ public abstract java.io.Serializable extract_Value()
+ throws BAD_OPERATION;
+
+ /**
+ * Extract another <code>Any</code> from this <code>Any</code>.
+ *
+ * @throws BAD_OPERATION if this instance contains value other
+ * than <code>any</code> or the value has not been set.
+ */
+ public abstract Any extract_any()
+ throws BAD_OPERATION;
+
+ /**
+ * Extract the CORBA <code>boolean</code> from this <code>Any</code>.
+ *
+ * @throws BAD_OPERATION if this instance contains value other
+ * than <code>boolean</code> or the value has not been set.
+ */
+ public abstract boolean extract_boolean()
+ throws BAD_OPERATION;
+
+ /**
+ * Extract the CORBA <code>char</code> from this <code>Any</code>.
+ *
+ * @throws BAD_OPERATION if this instance contains value other
+ * than <code>char</code> or the value has not been set.
+ */
+ public abstract char extract_char()
+ throws BAD_OPERATION;
+
+ /**
+ * Extract the CORBA <code>double</code> from this <code>Any</code>.
+ *
+ * @throws BAD_OPERATION if this instance contains value other
+ * than <code>double</code> or the value has not been set.
+ */
+ public abstract double extract_double()
+ throws BAD_OPERATION;
+
+ /**
+ * Extract the CORBA <code>fixed</code> from this <code>Any</code>.
+ *
+ * @throws BAD_OPERATION if this instance contains value other
+ * than <code>fixed</code> or the value has not been set.
+ *
+ * @throws NO_IMPLEMENT, always (override to get functionality).
+ */
+ public java.math.BigDecimal extract_fixed()
+ throws BAD_OPERATION
+ {
+ throw new NO_IMPLEMENT();
+ }
+
+ /**
+ * Extract the CORBA <code>float</code> from this <code>Any</code>.
+ *
+ * @throws BAD_OPERATION if this instance contains value other
+ * than <code>float</code> or the value has not been set.
+ */
+ public abstract float extract_float()
+ throws BAD_OPERATION;
+
+ /**
+ * Extract the CORBA <code>long</code> from this <code>Any</code>.
+ *
+ * @throws BAD_OPERATION if this instance contains value other
+ * than <code>long</code> or the value has not been set.
+ */
+ public abstract int extract_long()
+ throws BAD_OPERATION;
+
+ /**
+ * Extract the CORBA <code>long long</code> from this <code>Any</code>.
+ *
+ * @throws BAD_OPERATION if this instance contains value other
+ * than <code>longlong</code> or the value has not been set.
+ */
+ public abstract long extract_longlong()
+ throws BAD_OPERATION;
+
+ /**
+ * Extract the CORBA <code>octet</code> from this <code>Any</code>.
+ *
+ * @throws BAD_OPERATION if this instance contains value other
+ * than <code>octet</code> or the value has not been set.
+ */
+ public abstract byte extract_octet()
+ throws BAD_OPERATION;
+
+ /**
+ * Extract the CORBA <code>short</code> from this <code>Any</code>.
+ *
+ * @throws BAD_OPERATION if this instance contains value other
+ * than <code>short</code> or the value has not been set.
+ */
+ public abstract short extract_short()
+ throws BAD_OPERATION;
+
+ /**
+ * Extract the CORBA <code>string</code> from this <code>Any</code>.
+ *
+ * @throws BAD_OPERATION if this instance contains value other
+ * than <code>string</code> or the value has not been set.
+ */
+ public abstract String extract_string()
+ throws BAD_OPERATION;
+
+ /**
+ * Extract the CORBA unsigned <code>long</code> from this <code>Any</code>
+ * @throws BAD_OPERATION if this instance contains value other
+ * than unsigned <code>long</code> or the value has not been set.
+ */
+ public abstract int extract_ulong()
+ throws BAD_OPERATION;
+
+ /**
+ * Extract the CORBA unsigned <code>long long</code> from this
+ * <code>Any</code>.
+ *
+ * @throws BAD_OPERATION if this instance contains value other
+ * than unsigned <code>long long</code> or the value has not been set.
+ */
+ public abstract long extract_ulonglong()
+ throws BAD_OPERATION;
+
+ /**
+ * Extract the CORBA unsigned <code>short</code> from this <code>Any</code>
+ * @throws BAD_OPERATION if this instance contains value other
+ * than unsigned <code>short</code> or the value has not been set.
+ */
+ public abstract short extract_ushort()
+ throws BAD_OPERATION;
+
+ /**
+ * Extract the CORBA <code>wchar</code> from this <code>Any</code>
+ * @throws BAD_OPERATION if this instance contains value other
+ * than <code>wchar</code> or the value has not been set.
+ */
+ public abstract char extract_wchar()
+ throws BAD_OPERATION;
+
+ /**
+ * Extract the CORBA <code>wstring</code> from this <code>Any</code>
+ * @throws BAD_OPERATION if this instance contains value other
+ * than <code>wstring</code> or the value has not been set.
+ */
+ public abstract String extract_wstring()
+ throws BAD_OPERATION;
+
+ /**
+ * Insert the CORBA <code>Object</code> into this <code>Any</code>
+ */
+ public abstract void insert_Object(org.omg.CORBA.Object x, TypeCode typecode);
+
+ /**
+ * Insert the CORBA <code>Object</code> into this <code>Any</code>
+ */
+ public abstract void insert_Object(org.omg.CORBA.Object x);
+
+ /**
+ * Insert the CORBA <code>Principal</code> into this <code>Any</code>.
+ * @deprecated by CORBA 2.2.
+ */
+ public void insert_Principal(Principal x)
+ {
+ throw new NO_IMPLEMENT();
+ }
+
+ /**
+ * Insert the CORBA <code>Streamable</code> into this <code>Any</code>
+ */
+ public void insert_Streamable(org.omg.CORBA.portable.Streamable x)
+ {
+ throw new NO_IMPLEMENT();
+ }
+
+ /**
+ * Insert the CORBA <code>TypeCode</code> into this <code>Any</code>
+ * value field.
+ */
+ public abstract void insert_TypeCode(TypeCode typecode);
+
+ /**
+ * Insert the CORBA <code>Value</code> into this <code>Any</code>
+ */
+ public abstract void insert_Value(Serializable x, TypeCode typecode);
+
+ /**
+ * Insert the CORBA <code>Value</code> into this <code>Any</code>
+ */
+ public abstract void insert_Value(Serializable x);
+
+ /**
+ * Insert the CORBA <code>any</code> into this <code>Any</code>
+ */
+ public abstract void insert_any(Any x);
+
+ /**
+ * Insert the CORBA <code>boolean</code> into this <code>Any</code>
+ */
+ public abstract void insert_boolean(boolean x);
+
+ /**
+ * Insert the CORBA <code>char</code> into this <code>Any</code>
+ */
+ public abstract void insert_char(char x);
+
+ /**
+ * Insert the CORBA <code>double</code> into this <code>Any</code>
+ */
+ public abstract void insert_double(double x);
+
+ /**
+ * Insert the CORBA <code>fixed</code> into this <code>Any</code>
+ */
+ public void insert_fixed(java.math.BigDecimal x, TypeCode typecode)
+ {
+ throw new NO_IMPLEMENT();
+ }
+
+ /**
+ * Insert the CORBA <code>fixed</code> into this <code>Any</code>
+ */
+ public void insert_fixed(java.math.BigDecimal x)
+ {
+ throw new NO_IMPLEMENT();
+ }
+
+ /**
+ * Insert the CORBA <code>float</code> into this <code>Any</code>
+ */
+ public abstract void insert_float(float x);
+
+ /**
+ * Insert the CORBA <code>long</code> into this <code>Any</code>
+ */
+ public abstract void insert_long(int x);
+
+ /**
+ * Insert the CORBA <code>longlong</code> into this <code>Any</code>
+ */
+ public abstract void insert_longlong(long x);
+
+ /**
+ * Insert the CORBA <code>octet</code> into this <code>Any</code>
+ */
+ public abstract void insert_octet(byte x);
+
+ /**
+ * Insert the CORBA <code>short</code> into this <code>Any</code>
+ */
+ public abstract void insert_short(short x);
+
+ /**
+ * Insert the CORBA <code>string</code> into this <code>Any</code>
+ */
+ public abstract void insert_string(String x);
+
+ /**
+ * Insert the CORBA <code>ulong</code> into this <code>Any</code>
+ */
+ public abstract void insert_ulong(int x);
+
+ /**
+ * Insert the CORBA <code>ulonglong</code> into this <code>Any</code>
+ */
+ public abstract void insert_ulonglong(long x);
+
+ /**
+ * Insert the CORBA <code>ushort</code> into this <code>Any</code>
+ */
+ public abstract void insert_ushort(short x);
+
+ /**
+ * Insert the CORBA <code>wchar</code> into this <code>Any</code>
+ */
+ public abstract void insert_wchar(char x);
+
+ /**
+ * Insert the CORBA <code>wstring</code> into this <code>Any</code>
+ */
+ public abstract void insert_wstring(String x);
+
+ /**
+ * Read the value into this <code>Any</code> from the given input stream.
+ *
+ * @param input a CORBA stream to read from.
+ * @param type a TypeCode of the object being read.
+ *
+ * @throws org.omg.CORBA.MARSHAL if the given TypeCode does not match
+ * the TypeCode of the object, found in the stream.
+ */
+ public abstract void read_value(org.omg.CORBA.portable.InputStream input,
+ TypeCode type
+ )
+ throws MARSHAL;
+
+ /**
+ * Set the type of the object, stored in this <code>Any</code>, to the
+ * given TypeCode. Clear the value.
+ *
+ * @param valueTypeCode the type of the object that is expected to be stored
+ * in this <code>any</code>.
+ */
+ public abstract void type(TypeCode valueTypeCode);
+
+ /**
+ * Returns the TypeCode of the object, stored in this <code>Any</code>
+ * @return the TypeCode
+ */
+ public abstract TypeCode type();
+
+ /**
+ * Writes out the value (without the typecode of the value), stored in
+ * this <code>Any</code>.
+ *
+ * @param output the CORBA stream to write into.
+ *
+ * @throws NullPointerException if the value of this <code>Any</code>
+ * has not been set.
+ */
+ public abstract void write_value(org.omg.CORBA.portable.OutputStream output);
+}
diff --git a/libjava/classpath/org/omg/CORBA/AnyHolder.java b/libjava/classpath/org/omg/CORBA/AnyHolder.java
new file mode 100644
index 00000000000..0055fdd7482
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/AnyHolder.java
@@ -0,0 +1,119 @@
+/* AnyHolder.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;
+
+import gnu.CORBA.primitiveTypeCode;
+
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+import org.omg.CORBA.portable.Streamable;
+
+/**
+ * A holder for storing an instance of {@link Any}.
+ *
+ * @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
+ */
+public final class AnyHolder
+ implements Streamable
+{
+ /**
+ * The default type code for this holder.
+ */
+ private static final TypeCode t_any = new primitiveTypeCode(TCKind.tk_any);
+
+ /**
+ * The instance of {@link Any} (not the "any value"), held by this holder.
+ */
+ public Any value;
+
+ /**
+ * Constructs an instance of AnyHolder,
+ * initializing {@link #value} to <code>null</code>.
+ */
+ public AnyHolder()
+ {
+ }
+
+ /**
+ * Constructs an instance of AnyHolder,
+ * initializing {@link #value} to the passed parameter.
+ *
+ * @param initial_value a value that will be assigned to the
+ * {@link #value} field.
+ */
+ public AnyHolder(Any initial_value)
+ {
+ value = initial_value;
+ }
+
+ /**
+ * Fill in the {@link value } field by reading the required data
+ * from the given stream. For {@link Any}, the functionality
+ * is delegated to
+ * {@link org.omg.CORBA.portable.InputStream#read_any}.
+ *
+ * @param input the input stream to read from.
+ */
+ public void _read(InputStream input)
+ {
+ value = input.read_any();
+ }
+
+ /**
+ * Returns the TypeCode, corresponding the CORBA type that is stored
+ * using this holder.
+ */
+ public TypeCode _type()
+ {
+ return t_any;
+ }
+
+ /**
+ * Write the {@link value } field to the given stream.
+ * For {@link Any} the functionality
+ * is delegated to
+ * {@link org.omg.CORBA.portable.OutputStream#write_any(Any) }.
+ *
+ * @param output the output stream to write into.
+ */
+ public void _write(OutputStream output)
+ {
+ output.write_any(value);
+ }
+}
diff --git a/libjava/classpath/org/omg/CORBA/AnySeqHelper.java b/libjava/classpath/org/omg/CORBA/AnySeqHelper.java
new file mode 100644
index 00000000000..5c45bb3d83b
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/AnySeqHelper.java
@@ -0,0 +1,151 @@
+/* AnySeqHelper.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;
+
+import gnu.CORBA.primitiveArrayTypeCode;
+
+import org.omg.CORBA.TypeCodePackage.BadKind;
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+
+/**
+ * Provides static helper methods for working with
+ * the array of the type {@link Any} (not with the "any array").
+ *
+ * @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
+ */
+public abstract class AnySeqHelper
+{
+ /**
+ * Extract the array of {@link Any}'s from the
+ * given {@link Any}. This implementation expects the
+ * {@link Any} to hold the instance of {@link AnySeqHolder}
+ * that is returned by {@link Any#extract_Streamable() }.
+ *
+ * @param a an Any to extract the array from.
+ *
+ * @return the extracted array.
+ *
+ * @throws ClassCastException if the Any contains something other than the
+ * the {@link AnySeqHolder}.
+ */
+ public static Any[] extract(Any a)
+ {
+ AnySeqHolder h = (AnySeqHolder) a.extract_Streamable();
+ return h.value;
+ }
+
+ /**
+ * Returns the agreed Id, delegating functionality to
+ * the {@link #type()}.id().
+ */
+ public static String id()
+ {
+ try
+ {
+ return type().id();
+ }
+ catch (BadKind ex)
+ {
+ // Should never happen under correct work.
+ throw new Error("Please report this bug.", ex);
+ }
+ }
+
+ /**
+ * Insert into the given {@link Any}[] into the
+ * given {@link Any}. This implementation first creates
+ * a {@link AnySeqHolder} and then calls
+ * {@link Any#insert_Streamable(Streamable)}.
+ *
+ * @param into the target Any.
+ * @param that the array to insert.
+ */
+ public static void insert(Any into, Any[] that)
+ {
+ AnySeqHolder holder = new AnySeqHolder(that);
+ into.insert_Streamable(holder);
+ }
+
+ /**
+ * Reads the {@link Any}[] from the CORBA input stream.
+ * This implementation first creates an instance of
+ * {@link AnySeqHolder} and then delegates functionality
+ * to its <code>_read()</code> method.
+ *
+ * @param input the CORBA (not java.io) stream to read from.
+ * @return the value from the stream.
+ */
+ public static Any[] read(InputStream input)
+ {
+ Any[] value = new Any[ input.read_long() ];
+ for (int i = 0; i < value.length; i++)
+ {
+ value [ i ] = input.read_any();
+ }
+ return value;
+ }
+
+ /**
+ * Creates and returns a new instance of the TypeCode,
+ * corresponding the array of {@link Any}'s.
+ * The length of the sequence is left with the initial
+ * value 0.
+ */
+ public static TypeCode type()
+ {
+ return new primitiveArrayTypeCode(TCKind.tk_any);
+ }
+
+ /**
+ * Writes the array of {@link Any}'s into the given stream.
+ *
+ * @param output the CORBA (not java.io) output stream to write.
+ * @param value the value that must be written.
+ */
+ public static void write(OutputStream output, Any[] value)
+ {
+ output.write_long(value.length);
+
+ for (int i = 0; i < value.length; i++)
+ {
+ output.write_any(value [ i ]);
+ }
+ }
+}
diff --git a/libjava/classpath/org/omg/CORBA/AnySeqHolder.java b/libjava/classpath/org/omg/CORBA/AnySeqHolder.java
new file mode 100644
index 00000000000..905e05c8b03
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/AnySeqHolder.java
@@ -0,0 +1,128 @@
+/* AnySeqHolder.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;
+
+import gnu.CORBA.primitiveArrayTypeCode;
+
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+import org.omg.CORBA.portable.Streamable;
+
+/**
+ * A sequence holder for CORBA <code>AnySeq</code> that is mapped into
+ * java <code>Any[]</code>.
+ *
+ * @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
+ */
+public final class AnySeqHolder
+ implements Streamable
+{
+ /**
+ * The <code>Any[]</code> (CORBA <code>AnySeq</code>) value,
+ * held by this AnySeqHolder.
+ */
+ public Any[] value;
+
+ /**
+ * The type code for this holder. Each holder has a different instance.
+ */
+ private final primitiveArrayTypeCode typecode =
+ new primitiveArrayTypeCode(TCKind.tk_any);
+
+ /**
+ * Constructs an instance of AnySeqHolder,
+ * initializing {@link #value} to <code>null</code>.
+ */
+ public AnySeqHolder()
+ {
+ }
+
+ /**
+ * Constructs an instance of AnySeqHolder,
+ * initializing {@link #value} to the given array
+ */
+ public AnySeqHolder(Any [] a_value)
+ {
+ value = a_value;
+ }
+
+ /**
+ * Fill in the {@link value } field by reading the required data
+ * from the given stream. This method first reads the array size
+ * (as CORBA <code>long</code>and then all Any's.
+ *
+ * @param input the input stream to read from.
+ */
+ public void _read(InputStream input)
+ {
+ value = new Any[ input.read_long() ];
+ for (int i = 0; i < value.length; i++)
+ {
+ value [ i ] = input.read_any();
+ }
+ typecode.setLength(value.length);
+ }
+
+ /**
+ * Returns the TypeCode, corresponding the CORBA type that is stored
+ * using this holder.
+ */
+ public TypeCode _type()
+ {
+ return typecode;
+ }
+
+ /**
+ * Write the {@link value } field to the given stream.
+ * This method first writes the array size
+ * (as CORBA <code>long</code> and then all Any's.
+ *
+ * @param output the output stream to write into.
+ */
+ public void _write(OutputStream output)
+ {
+ output.write_long(value.length);
+
+ for (int i = 0; i < value.length; i++)
+ {
+ output.write_any(value [ i ]);
+ }
+ }
+
+}
diff --git a/libjava/classpath/org/omg/CORBA/BAD_CONTEXT.java b/libjava/classpath/org/omg/CORBA/BAD_CONTEXT.java
new file mode 100644
index 00000000000..139262d6428
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/BAD_CONTEXT.java
@@ -0,0 +1,97 @@
+/* BAD_CONTEXT.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;
+
+import java.io.Serializable;
+
+/**
+ * Means that the operation is invoked by a client but the passed
+ * context has no values required by this operation.
+ *
+ * @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
+ */
+public class BAD_CONTEXT
+ extends SystemException
+ implements Serializable
+{
+ /**
+ * Use serialVersionUID for interoperability.
+ */
+ private static final long serialVersionUID = -5025677944847478264L;
+
+ /**
+ * Creates a BAD_CONTEXT with the default minor code of 0,
+ * completion state COMPLETED_NO and the given explaining message.
+ * @param reasom the explaining message.
+ */
+ public BAD_CONTEXT(String message)
+ {
+ super(message, 0, CompletionStatus.COMPLETED_NO);
+ }
+
+ /**
+ * Creates BAD_CONTEXT with the default minor code of 0 and a
+ * completion state COMPLETED_NO.
+ */
+ public BAD_CONTEXT()
+ {
+ super("", 0, CompletionStatus.COMPLETED_NO);
+ }
+
+ /** Creates a BAD_CONTEXT exception with the specified minor
+ * code and completion status.
+ * @param minor additional error code.
+ * @param completed the method completion status.
+ */
+ public BAD_CONTEXT(int minor, CompletionStatus completed)
+ {
+ super("", minor, completed);
+ }
+
+ /**
+ * Created BAD_CONTEXT exception, providing full information.
+ * @param reason explaining message.
+ * @param minor additional error code (the "minor").
+ * @param completed the method completion status.
+ */
+ public BAD_CONTEXT(String reason, int minor, CompletionStatus completed)
+ {
+ super(reason, minor, completed);
+ }
+}
diff --git a/libjava/classpath/org/omg/CORBA/BAD_INV_ORDER.java b/libjava/classpath/org/omg/CORBA/BAD_INV_ORDER.java
new file mode 100644
index 00000000000..0f585cd91aa
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/BAD_INV_ORDER.java
@@ -0,0 +1,96 @@
+/* BAD_INV_ORDER.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;
+
+import java.io.Serializable;
+
+/**
+ * Means that the caller has invoked operations in the wrong order.
+ *
+ * @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
+ */
+public class BAD_INV_ORDER
+ extends SystemException
+ implements Serializable
+{
+ /**
+ * Use serialVersionUID for interoperability.
+ */
+ private static final long serialVersionUID = 7273325995832240406L;
+
+ /**
+ * Creates a BAD_INV_ORDER with the default minor code of 0,
+ * completion state COMPLETED_NO and the given explaining message.
+ * @param reasom the explaining message.
+ */
+ public BAD_INV_ORDER(String message)
+ {
+ super(message, 0, CompletionStatus.COMPLETED_NO);
+ }
+
+ /**
+ * Creates BAD_INV_ORDER with the default minor code of 0 and a
+ * completion state COMPLETED_NO.
+ */
+ public BAD_INV_ORDER()
+ {
+ super("", 0, CompletionStatus.COMPLETED_NO);
+ }
+
+ /** Creates a BAD_INV_ORDER exception with the specified minor
+ * code and completion status.
+ * @param minor additional error code.
+ * @param completed the method completion status.
+ */
+ public BAD_INV_ORDER(int minor, CompletionStatus completed)
+ {
+ super("", minor, completed);
+ }
+
+ /**
+ * Created BAD_INV_ORDER exception, providing full information.
+ * @param reason explaining message.
+ * @param minor additional error code (the "minor").
+ * @param completed the method completion status.
+ */
+ public BAD_INV_ORDER(String reason, int minor, CompletionStatus completed)
+ {
+ super(reason, minor, completed);
+ }
+}
diff --git a/libjava/classpath/org/omg/CORBA/BAD_OPERATION.java b/libjava/classpath/org/omg/CORBA/BAD_OPERATION.java
new file mode 100755
index 00000000000..26b3406658f
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/BAD_OPERATION.java
@@ -0,0 +1,97 @@
+/* BAD_OPERATION.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;
+
+import java.io.Serializable;
+
+/**
+ * Means that the object exists but does not support the operation that
+ * was invoked on it.
+ *
+ * @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
+ */
+public class BAD_OPERATION
+ extends SystemException
+ implements Serializable
+{
+ /**
+ * Use serialVersionUID for interoperability.
+ */
+ private static final long serialVersionUID = 1654621651720499682L;
+
+ /**
+ * Creates a BAD_OPERATION with the default minor code of 0,
+ * completion state COMPLETED_NO and the given explaining message.
+ * @param reasom the explaining message.
+ */
+ public BAD_OPERATION(String message)
+ {
+ super(message, 0, CompletionStatus.COMPLETED_NO);
+ }
+
+ /**
+ * Creates BAD_OPERATION with the default minor code of 0 and a
+ * completion state COMPLETED_NO.
+ */
+ public BAD_OPERATION()
+ {
+ super("", 0, CompletionStatus.COMPLETED_NO);
+ }
+
+ /** Creates a BAD_OPERATION exception with the specified minor
+ * code and completion status.
+ * @param minor additional error code.
+ * @param completed the method completion status.
+ */
+ public BAD_OPERATION(int minor, CompletionStatus completed)
+ {
+ super("", minor, completed);
+ }
+
+ /**
+ * Created BAD_OPERATION exception, providing full information.
+ * @param reason explaining message.
+ * @param minor additional error code (the "minor").
+ * @param completed the method completion status.
+ */
+ public BAD_OPERATION(String reason, int minor, CompletionStatus completed)
+ {
+ super(reason, minor, completed);
+ }
+}
diff --git a/libjava/classpath/org/omg/CORBA/BAD_PARAM.java b/libjava/classpath/org/omg/CORBA/BAD_PARAM.java
new file mode 100644
index 00000000000..848f43b43d9
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/BAD_PARAM.java
@@ -0,0 +1,96 @@
+/* BAD_PARAM.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;
+
+import java.io.Serializable;
+
+/**
+ * The exception thrown when a parameter passed to a call is considered
+ * illegal.
+ * @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
+ */
+public class BAD_PARAM
+ extends SystemException
+ implements Serializable
+{
+ /**
+ * Creates BAD_PARAM with the default minor code of 0,
+ * completion state COMPLETED_NO and the given explaining message.
+ * @param reasom the explaining message.
+ */
+ public BAD_PARAM(String message)
+ {
+ super(message, 0, CompletionStatus.COMPLETED_NO);
+ }
+
+ /**
+ * Use serialVersionUID for interoperability.
+ */
+ private static final long serialVersionUID = 1917109334939470379L;
+
+ /**
+ * Creates BAD_PARAM with the default minor code of 0 and a
+ * completion state COMPLETED_NO.
+ */
+ public BAD_PARAM()
+ {
+ super("", 0, CompletionStatus.COMPLETED_NO);
+ }
+
+ /** Creates a BAD_PARAM exception with the specified minor
+ * code and completion status.
+ * @param minor additional error code.
+ * @param completed the method completion status.
+ */
+ public BAD_PARAM(int minor, CompletionStatus completed)
+ {
+ super("", minor, completed);
+ }
+
+ /**
+ * Created BAD_PARAM exception, providing full information.
+ * @param reason explaining message.
+ * @param minor additional error code (the "minor").
+ * @param completed the method completion status.
+ */
+ public BAD_PARAM(String reason, int minor, CompletionStatus completed)
+ {
+ super(reason, minor, completed);
+ }
+}
diff --git a/libjava/classpath/org/omg/CORBA/BAD_POLICY.java b/libjava/classpath/org/omg/CORBA/BAD_POLICY.java
new file mode 100644
index 00000000000..98998587c13
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/BAD_POLICY.java
@@ -0,0 +1,55 @@
+/* BAD_POLICY.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;
+
+/**
+ * Holds a single constant, specifying, that
+ * the requested {@link Policy} is not valid. One of the PolicyErrorCodes,
+ * others being {@link UNSUPPORTED_POLICY},
+ * {@link UNSUPPORTED_POLICY_VALUE},
+ * {@link BAD_POLICY_TYPE}, {@link BAD_POLICY_VALUE}.
+ *
+ * @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
+ */
+public interface BAD_POLICY
+{
+ /**
+ * States that the requested {@link Policy} is not valid.
+ */
+ short value = 0;
+}
diff --git a/libjava/classpath/org/omg/CORBA/BAD_POLICY_TYPE.java b/libjava/classpath/org/omg/CORBA/BAD_POLICY_TYPE.java
new file mode 100644
index 00000000000..fa3f01ee16d
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/BAD_POLICY_TYPE.java
@@ -0,0 +1,55 @@
+/* BAD_POLICY_TYPE.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;
+
+/**
+ * Holds a single constant, specifying, that
+ * the requested {@link Policy} type is not valid. One of the
+ * PolicyErrorCodes, others being {@link UNSUPPORTED_POLICY},
+ * {@link UNSUPPORTED_POLICY_VALUE}, {@link BAD_POLICY},
+ * {@link BAD_POLICY_VALUE}.
+ *
+ * @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
+ */
+public interface BAD_POLICY_TYPE
+{
+ /**
+ * States that the requested {@link Policy} type is not valid.
+ */
+ short value = 2;
+}
diff --git a/libjava/classpath/org/omg/CORBA/BAD_POLICY_VALUE.java b/libjava/classpath/org/omg/CORBA/BAD_POLICY_VALUE.java
new file mode 100644
index 00000000000..b0153a8a7fd
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/BAD_POLICY_VALUE.java
@@ -0,0 +1,55 @@
+/* BAD_POLICY_VALUE.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;
+
+/**
+ * Holds a single constant, specifying, that
+ * the requested {@link Policy} value is not valid. One of the
+ * PolicyErrorCodes, others being {@link UNSUPPORTED_POLICY},
+ * {@link BAD_POLICY}, {@link BAD_POLICY_TYPE},
+ * {@link BAD_POLICY_VALUE}.
+ *
+ * @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
+ */
+public interface BAD_POLICY_VALUE
+{
+ /**
+ * States that the requested {@link Policy} value is not valid.
+ */
+ short value = 3;
+}
diff --git a/libjava/classpath/org/omg/CORBA/BAD_TYPECODE.java b/libjava/classpath/org/omg/CORBA/BAD_TYPECODE.java
new file mode 100644
index 00000000000..96ad21ef9e5
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/BAD_TYPECODE.java
@@ -0,0 +1,97 @@
+/* BAD_TYPECODE.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;
+
+import java.io.Serializable;
+
+/**
+ * Means that the some TypeCode has been realized to be invalid
+ * (for example, has an invalid TCKind value).
+ *
+ * @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
+ */
+public class BAD_TYPECODE
+ extends SystemException
+ implements Serializable
+{
+ /**
+ * Use serialVersionUID for interoperability.
+ */
+ private static final long serialVersionUID = 6193364410915696901L;
+
+ /**
+ * Creates a BAD_TYPECODE with the default minor code of 0,
+ * completion state COMPLETED_NO and the given explaining message.
+ * @param reasom the explaining message.
+ */
+ public BAD_TYPECODE(String message)
+ {
+ super(message, 0, CompletionStatus.COMPLETED_NO);
+ }
+
+ /**
+ * Creates BAD_TYPECODE with the default minor code of 0 and a
+ * completion state COMPLETED_NO.
+ */
+ public BAD_TYPECODE()
+ {
+ super("", 0, CompletionStatus.COMPLETED_NO);
+ }
+
+ /** Creates a BAD_TYPECODE exception with the specified minor
+ * code and completion status.
+ * @param minor additional error code.
+ * @param completed the method completion status.
+ */
+ public BAD_TYPECODE(int minor, CompletionStatus completed)
+ {
+ super("", minor, completed);
+ }
+
+ /**
+ * Created BAD_TYPECODE exception, providing full information.
+ * @param reason explaining message.
+ * @param minor additional error code (the "minor").
+ * @param completed the method completion status.
+ */
+ public BAD_TYPECODE(String reason, int minor, CompletionStatus completed)
+ {
+ super(reason, minor, completed);
+ }
+}
diff --git a/libjava/classpath/org/omg/CORBA/BooleanHolder.java b/libjava/classpath/org/omg/CORBA/BooleanHolder.java
new file mode 100644
index 00000000000..eddc62933a9
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/BooleanHolder.java
@@ -0,0 +1,127 @@
+/* BooleanHolder.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;
+
+import gnu.CORBA.primitiveTypeCode;
+
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+import org.omg.CORBA.portable.Streamable;
+
+/**
+ * A holder for CORBA <code>boolean</code> that is mapped into
+ * java <code>boolean</code>.
+ *
+ * The holders have several application areas. The end user usually
+ * sees them implementing CORBA methods where the primitive type
+ * is passed by reference. While CORBA (or, for example, C) supports
+ * this, the java does not and a wrapper class is required.
+ *
+ * @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
+ */
+public final class BooleanHolder
+ implements Streamable
+{
+ /**
+ * The default type code for this holder.
+ */
+ private static final TypeCode t_boolean =
+ new primitiveTypeCode(TCKind.tk_boolean);
+
+ /**
+ * The <code>boolean</code> (CORBA <code>boolean</code>) value,
+ * held by this BooleanHolder.
+ */
+ public boolean value;
+
+ /**
+ * Constructs an instance of BooleanHolder,
+ * initializing {@link #value} to <code>false</code>.
+ */
+ public BooleanHolder()
+ {
+ }
+
+ /**
+ * Constructs an instance of BooleanHolder,
+ * initializing {@link #value} to the given <code>boolean</code>.
+ *
+ * @param initial_value a value that will be assigned to the
+ * {@link #value} field.
+ */
+ public BooleanHolder(boolean initial_value)
+ {
+ value = initial_value;
+ }
+
+ /**
+ * Fill in the {@link value } field by reading the required data
+ * from the given stream. For <code>boolean</code>, the functionality
+ * is delegated to
+ * {@link org.omg.CORBA.portable.InputStream#read_boolean}.
+ *
+ * @param input the input stream to read from.
+ */
+ public void _read(InputStream input)
+ {
+ value = input.read_boolean();
+ }
+
+ /**
+ * Returns the TypeCode, corresponding the CORBA type that is stored
+ * using this holder.
+ */
+ public TypeCode _type()
+ {
+ return t_boolean;
+ }
+
+ /**
+ * Write the {@link value } field to the given stream.
+ * For <code>boolean</code>, the functionality
+ * is delegated to
+ * {@link org.omg.CORBA.portable.OutputStream#write_boolean(boolean) }.
+ *
+ * @param output the output stream to write into.
+ */
+ public void _write(OutputStream output)
+ {
+ output.write_boolean(value);
+ }
+}
diff --git a/libjava/classpath/org/omg/CORBA/BooleanSeqHelper.java b/libjava/classpath/org/omg/CORBA/BooleanSeqHelper.java
new file mode 100644
index 00000000000..d1fde8b7726
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/BooleanSeqHelper.java
@@ -0,0 +1,142 @@
+/* BooleanSeqHelper.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;
+
+import gnu.CORBA.primitiveArrayTypeCode;
+
+import org.omg.CORBA.TypeCodePackage.BadKind;
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+
+/**
+ * Provides static helper methods for working with
+ * CORBA sequence of <code>boolean</code>
+ * (<code>BooleanSeq</code>).
+ *
+ * @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
+ */
+public abstract class BooleanSeqHelper
+{
+ /**
+ * Extract the <code>boolean[]</code> from the
+ * given {@link Any}. This implementation expects the
+ * {@link Any} to hold the instance of {@link BooleanSeqHolder}
+ * that is returned by {@link Any#extract_Streamable() }.
+ *
+ * @param a an Any to extract the array from.
+ *
+ * @return the extracted array.
+ *
+ * @throws ClassCastException if the Any contains something other than the
+ * the {@link BooleanSeqHolder}.
+ */
+ public static boolean[] extract(Any a)
+ {
+ BooleanSeqHolder h = (BooleanSeqHolder) a.extract_Streamable();
+ return h.value;
+ }
+
+ /**
+ * Returns the agreed Id, delegating functionality to
+ * the {@link #type()}.id().
+ */
+ public static String id()
+ {
+ try
+ {
+ return type().id();
+ }
+ catch (BadKind ex)
+ {
+ // Should never happen under correct work.
+ throw new Error("Please report this bug.", ex);
+ }
+ }
+
+ /**
+ * Insert into the given <code>boolean[]</code> into the
+ * given {@link Any}. This implementation first creates
+ * a {@link BooleanSeqHolder} and then calls
+ * {@link Any#insert_Streamable(Streamable)}.
+ *
+ * @param into the target Any.
+ * @param that the array to insert.
+ */
+ public static void insert(Any into, boolean[] that)
+ {
+ BooleanSeqHolder holder = new BooleanSeqHolder(that);
+ into.insert_Streamable(holder);
+ }
+
+ /**
+ * Reads the <code>boolean[]</code> from the CORBA input stream.
+ *
+ * @param input the CORBA (not java.io) stream to read from.
+ * @return the value from the stream.
+ */
+ public static boolean[] read(InputStream input)
+ {
+ boolean [] value = new boolean[ input.read_long() ];
+ input.read_boolean_array(value, 0, value.length);
+ return value;
+ }
+
+ /**
+ * Creates and returns a new instance of the TypeCode,
+ * corresponding the CORBA <code>BooleanSeq</code>.
+ * The length of the sequence is left with the initial
+ * value 0.
+ */
+ public static TypeCode type()
+ {
+ return new primitiveArrayTypeCode(TCKind.tk_boolean);
+ }
+
+ /**
+ * Writes the <code>boolean[]</code> into the given stream.
+ *
+ * @param output the CORBA (not java.io) output stream to write.
+ * @param value the value that must be written.
+ */
+ public static void write(OutputStream output, boolean[] value)
+ {
+ output.write_long(value.length);
+ output.write_boolean_array(value, 0, value.length);
+ }
+}
diff --git a/libjava/classpath/org/omg/CORBA/BooleanSeqHolder.java b/libjava/classpath/org/omg/CORBA/BooleanSeqHolder.java
new file mode 100644
index 00000000000..ac8224f92e6
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/BooleanSeqHolder.java
@@ -0,0 +1,126 @@
+/* BooleanSeqHolder.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;
+
+import gnu.CORBA.primitiveArrayTypeCode;
+
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+import org.omg.CORBA.portable.Streamable;
+
+/**
+ * A sequence holder for CORBA <code>BooleanSeq</code> that is mapped into
+ * java <code>boolean[]</code>.
+ *
+ * @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
+ */
+public final class BooleanSeqHolder
+ implements Streamable
+{
+ /**
+ * The <code>boolean[]</code> (CORBA <code>BooleanSeq</code>) value,
+ * held by this BooleanSeqHolder.
+ */
+ public boolean[] value;
+
+ /**
+ * The type code for this holder. Each holder has a different instance.
+ */
+ private final primitiveArrayTypeCode typecode =
+ new primitiveArrayTypeCode(TCKind.tk_boolean);
+
+ /**
+ * Constructs an instance of BooleanSeqHolder,
+ * initializing {@link #value} to <code>null</code>.
+ */
+ public BooleanSeqHolder()
+ {
+ }
+
+ /**
+ * Constructs an instance of BooleanSeqHolder,
+ * initializing {@link #value} to the given <code>boolean[]</code>.
+ *
+ * @param initial_value a value that will be assigned to the
+ * {@link #value} field.
+ */
+ public BooleanSeqHolder(boolean[] initial_value)
+ {
+ value = initial_value;
+ typecode.setLength(value.length);
+ }
+
+ /**
+ * Fill in the {@link value } field by reading the required data
+ * from the given stream. This method first reads the array size
+ * (as CORBA <code>long</code>) and then calls the
+ * {@link org.omg.CORBA.portable.InputStream#read_boolean_array }.
+ *
+ * @param input the input stream to read from.
+ */
+ public void _read(InputStream input)
+ {
+ value = new boolean[ input.read_long() ];
+ input.read_boolean_array(value, 0, value.length);
+ typecode.setLength(value.length);
+ }
+
+ /**
+ * Returns the TypeCode, corresponding the CORBA type that is stored
+ * using this holder.
+ */
+ public TypeCode _type()
+ {
+ return typecode;
+ }
+
+ /**
+ * Write the {@link value } field to the given stream.
+ * This method first writes the array size
+ * (as CORBA <code>long</code>) and then calls the
+ * {@link org.omg.CORBA.portable.OutputStream#write_boolean_array }.
+ *
+ * @param output the output stream to write into.
+ */
+ public void _write(OutputStream output)
+ {
+ output.write_long(value.length);
+ output.write_boolean_array(value, 0, value.length);
+ }
+}
diff --git a/libjava/classpath/org/omg/CORBA/Bounds.java b/libjava/classpath/org/omg/CORBA/Bounds.java
new file mode 100644
index 00000000000..f5a546480f6
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/Bounds.java
@@ -0,0 +1,71 @@
+/* Bounds.java -- Exception thrown due to out-of-bounds parameter
+ 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;
+
+/**
+ * Thrown when a parameter is outside the bounds for a particular
+ * object a method is trying to access.
+ *
+ * @author Andrew John Hughes (gnu_andrew@member.fsf.org)
+ */
+public final class Bounds
+ extends UserException
+{
+
+ /**
+ * Constructs a default <code>Bounds</code> exception, with
+ * no detail message.
+ */
+ public Bounds()
+ {
+ super();
+ }
+
+ /**
+ * Constructs a <code>Bounds</code> exception using the specified
+ * message as the reason for throwing it.
+ *
+ * @param reason the reason the exception was thrown.
+ */
+ public Bounds(String reason)
+ {
+ super(reason);
+ }
+
+}
diff --git a/libjava/classpath/org/omg/CORBA/ByteHolder.java b/libjava/classpath/org/omg/CORBA/ByteHolder.java
new file mode 100644
index 00000000000..0cfd8f03cba
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/ByteHolder.java
@@ -0,0 +1,127 @@
+/* ByteHolder.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;
+
+import gnu.CORBA.primitiveTypeCode;
+
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+import org.omg.CORBA.portable.Streamable;
+
+/**
+ * A holder for CORBA <code>octet</code> that is mapped into
+ * java <code>byte</code>.
+ *
+ * The holders have several application areas. The end user usually
+ * sees them implementing CORBA methods where the primitive type
+ * is passed by reference. While CORBA (or, for example, C) supports
+ * this, the java does not and a wrapper class is required.
+ *
+ * @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
+ */
+public final class ByteHolder
+ implements Streamable
+{
+ /**
+ * The default type code for this holder.
+ */
+ private static final TypeCode t_octet =
+ new primitiveTypeCode(TCKind.tk_octet);
+
+ /**
+ * The <code>byte</code> (CORBA <code>octet</code>) value,
+ * held by this ByteHolder.
+ */
+ public byte value;
+
+ /**
+ * Constructs an instance of ByteHolder,
+ * initializing {@link #value} to <code>0x0 </code>.
+ */
+ public ByteHolder()
+ {
+ }
+
+ /**
+ * Constructs an instance of ByteHolder,
+ * initializing {@link #value} to the given <code>byte</code>.
+ *
+ * @param initial_value a value that will be assigned to the
+ * {@link #value} field.
+ */
+ public ByteHolder(byte initial_value)
+ {
+ value = initial_value;
+ }
+
+ /**
+ * Fill in the {@link value } field by reading the required data
+ * from the given stream. For <code>octet</code>, the functionality
+ * is delegated to
+ * {@link org.omg.CORBA.portable.InputStream#read_octet}.
+ *
+ * @param input the input stream to read from.
+ */
+ public void _read(InputStream input)
+ {
+ value = input.read_octet();
+ }
+
+ /**
+ * Returns the TypeCode, corresponding the CORBA type that is stored
+ * using this holder.
+ */
+ public TypeCode _type()
+ {
+ return t_octet;
+ }
+
+ /**
+ * Write the {@link value } field to the given stream.
+ * For <code>octet</code>, the functionality
+ * is delegated to
+ * {@link org.omg.CORBA.portable.OutputStream#write_octet(byte) }.
+ *
+ * @param output the output stream to write into.
+ */
+ public void _write(OutputStream output)
+ {
+ output.write_octet(value);
+ }
+}
diff --git a/libjava/classpath/org/omg/CORBA/COMM_FAILURE.java b/libjava/classpath/org/omg/CORBA/COMM_FAILURE.java
new file mode 100644
index 00000000000..3c50441326f
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/COMM_FAILURE.java
@@ -0,0 +1,97 @@
+/* COMM_FAILURE.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;
+
+import java.io.Serializable;
+
+/**
+ * Means that the communication has been lost while an operation
+ * was in progress
+ *
+ * @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
+ */
+public class COMM_FAILURE
+ extends SystemException
+ implements Serializable
+{
+ /**
+ * Use serialVersionUID for interoperability.
+ */
+ private static final long serialVersionUID = 294856734784364267L;
+
+ /**
+ * Creates a COMM_FAILURE with the default minor code of 0,
+ * completion state COMPLETED_NO and the given explaining message.
+ * @param reasom the explaining message.
+ */
+ public COMM_FAILURE(String message)
+ {
+ super(message, 0, CompletionStatus.COMPLETED_NO);
+ }
+
+ /**
+ * Creates COMM_FAILURE with the default minor code of 0 and a
+ * completion state COMPLETED_NO.
+ */
+ public COMM_FAILURE()
+ {
+ super("", 0, CompletionStatus.COMPLETED_NO);
+ }
+
+ /** Creates a COMM_FAILURE exception with the specified minor
+ * code and completion status.
+ * @param minor additional error code.
+ * @param completed the method completion status.
+ */
+ public COMM_FAILURE(int minor, CompletionStatus completed)
+ {
+ super("", minor, completed);
+ }
+
+ /**
+ * Created COMM_FAILURE exception, providing full information.
+ * @param reason explaining message.
+ * @param minor additional error code (the "minor").
+ * @param completed the method completion status.
+ */
+ public COMM_FAILURE(String reason, int minor, CompletionStatus completed)
+ {
+ super(reason, minor, completed);
+ }
+}
diff --git a/libjava/classpath/org/omg/CORBA/CTX_RESTRICT_SCOPE.java b/libjava/classpath/org/omg/CORBA/CTX_RESTRICT_SCOPE.java
new file mode 100644
index 00000000000..12b9747fccf
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/CTX_RESTRICT_SCOPE.java
@@ -0,0 +1,54 @@
+/* CTX_RESTRICT_SCOPE.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;
+
+/**
+ * This simple interface defines just one constant, normally used
+ * to restrict the property search in the {@link Context} by
+ * the current context.
+ *
+ * @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
+ */
+public interface CTX_RESTRICT_SCOPE
+{
+ /**
+ * The flag, specifying that the search
+ * is limited to the current context.
+ */
+ int value = 15;
+}
diff --git a/libjava/classpath/org/omg/CORBA/CharHolder.java b/libjava/classpath/org/omg/CORBA/CharHolder.java
new file mode 100644
index 00000000000..67eb2ee8741
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/CharHolder.java
@@ -0,0 +1,126 @@
+/* CharHolder.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;
+
+import gnu.CORBA.primitiveTypeCode;
+
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+import org.omg.CORBA.portable.Streamable;
+
+/**
+ * A holder for CORBA <code>char</code> that is mapped into
+ * java <code>char</code>.
+ *
+ * The holders have several application areas. The end user usually
+ * sees them implementing CORBA methods where the primitive type
+ * is passed by reference. While CORBA (or, for example, C) supports
+ * this, the java does not and a wrapper class is required.
+ *
+ * @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
+ */
+public final class CharHolder
+ implements Streamable
+{
+ /**
+ * The default type code for this holder.
+ */
+ private static final TypeCode t_char = new primitiveTypeCode(TCKind.tk_char);
+
+ /**
+ * The <code>char</code> (CORBA <code>char</code>) value,
+ * held by this CharHolder.
+ */
+ public char value;
+
+ /**
+ * Constructs an instance of CharHolder,
+ * initializing {@link #value} to <code>0 </code>.
+ */
+ public CharHolder()
+ {
+ }
+
+ /**
+ * Constructs an instance of CharHolder,
+ * initializing {@link #value} to the given <code>char</code>.
+ *
+ * @param initial_value a value that will be assigned to the
+ * {@link #value} field.
+ */
+ public CharHolder(char initial_value)
+ {
+ value = initial_value;
+ }
+
+ /**
+ * Fill in the {@link value } field by reading the required data
+ * from the given stream. For <code>char</code>, the functionality
+ * is delegated to
+ * {@link org.omg.CORBA.portable.InputStream#read_char}.
+ *
+ * @param input the input stream to read from.
+ */
+ public void _read(InputStream input)
+ {
+ value = input.read_char();
+ }
+
+ /**
+ * Returns the TypeCode, corresponding the CORBA type that is stored
+ * using this holder.
+ */
+ public TypeCode _type()
+ {
+ return t_char;
+ }
+
+ /**
+ * Write the {@link value } field to the given stream.
+ * For <code>char</code>, the functionality
+ * is delegated to
+ * {@link org.omg.CORBA.portable.OutputStream#write_char(char) }.
+ *
+ * @param output the output stream to write into.
+ */
+ public void _write(OutputStream output)
+ {
+ output.write_char(value);
+ }
+}
diff --git a/libjava/classpath/org/omg/CORBA/CharSeqHelper.java b/libjava/classpath/org/omg/CORBA/CharSeqHelper.java
new file mode 100644
index 00000000000..b91306c2c3e
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/CharSeqHelper.java
@@ -0,0 +1,142 @@
+/* CharSeqHelper.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;
+
+import gnu.CORBA.primitiveArrayTypeCode;
+
+import org.omg.CORBA.TypeCodePackage.BadKind;
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+
+/**
+ * Provides static helper methods for working with
+ * CORBA sequence of <code>char</code>
+ * (<code>CharSeq</code>).
+ *
+ * @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
+ */
+public abstract class CharSeqHelper
+{
+ /**
+ * Extract the <code>char[]</code> from the
+ * given {@link Any}. This implementation expects the
+ * {@link Any} to hold the instance of {@link CharSeqHolder}
+ * that is returned by {@link Any#extract_Streamable() }.
+ *
+ * @param a an Any to extract the array from.
+ *
+ * @return the extracted array.
+ *
+ * @throws ClassCastException if the Any contains something other than the
+ * the {@link CharSeqHolder}.
+ */
+ public static char[] extract(Any a)
+ {
+ CharSeqHolder h = (CharSeqHolder) a.extract_Streamable();
+ return h.value;
+ }
+
+ /**
+ * Returns the agreed Id, delegating functionality to
+ * the {@link #type()}.id().
+ */
+ public static String id()
+ {
+ try
+ {
+ return type().id();
+ }
+ catch (BadKind ex)
+ {
+ // Should never happen under correct work.
+ throw new Error("Please report this bug.", ex);
+ }
+ }
+
+ /**
+ * Insert into the given <code>char[]</code> into the
+ * given {@link Any}. This implementation first creates
+ * a {@link CharSeqHolder} and then calls
+ * {@link Any#insert_Streamable(Streamable)}.
+ *
+ * @param into the target Any.
+ * @param that the array to insert.
+ */
+ public static void insert(Any into, char[] that)
+ {
+ CharSeqHolder holder = new CharSeqHolder(that);
+ into.insert_Streamable(holder);
+ }
+
+ /**
+ * Reads the <code>char[]</code> from the CORBA input stream.
+ *
+ * @param input the CORBA (not java.io) stream to read from.
+ * @return the value from the stream.
+ */
+ public static char[] read(InputStream input)
+ {
+ char [] value = new char[ input.read_long() ];
+ input.read_char_array(value, 0, value.length);
+ return value;
+ }
+
+ /**
+ * Creates and returns a new instance of the TypeCode,
+ * corresponding the CORBA <code>CharSeq</code>.
+ * The length of the sequence is left with the initial
+ * value 0.
+ */
+ public static TypeCode type()
+ {
+ return new primitiveArrayTypeCode(TCKind.tk_char);
+ }
+
+ /**
+ * Writes the <code>char[]</code> into the given stream.
+ *
+ * @param output the CORBA (not java.io) output stream to write.
+ * @param value the value that must be written.
+ */
+ public static void write(OutputStream output, char[] value)
+ {
+ output.write_long(value.length);
+ output.write_char_array(value, 0, value.length);
+ }
+}
diff --git a/libjava/classpath/org/omg/CORBA/CharSeqHolder.java b/libjava/classpath/org/omg/CORBA/CharSeqHolder.java
new file mode 100644
index 00000000000..dc7d0a84050
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/CharSeqHolder.java
@@ -0,0 +1,126 @@
+/* CharSeqHolder.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;
+
+import gnu.CORBA.primitiveArrayTypeCode;
+
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+import org.omg.CORBA.portable.Streamable;
+
+/**
+ * A sequence holder for CORBA <code>CharSeq</code> that is mapped into
+ * java <code>char[]</code>.
+ *
+ * @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
+ */
+public final class CharSeqHolder
+ implements Streamable
+{
+ /**
+ * The <code>char[]</code> (CORBA <code>CharSeq</code>) value,
+ * held by this CharSeqHolder.
+ */
+ public char[] value;
+
+ /**
+ * The type code for this holder. Each holder has a different instance.
+ */
+ private final primitiveArrayTypeCode typecode =
+ new primitiveArrayTypeCode(TCKind.tk_char);
+
+ /**
+ * Constructs an instance of CharSeqHolder,
+ * initializing {@link #value} to <code>null</code>.
+ */
+ public CharSeqHolder()
+ {
+ }
+
+ /**
+ * Constructs an instance of CharSeqHolder,
+ * initializing {@link #value} to the given <code>char[]</code>.
+ *
+ * @param initial_value a value that will be assigned to the
+ * {@link #value} field.
+ */
+ public CharSeqHolder(char[] initial_value)
+ {
+ value = initial_value;
+ typecode.setLength(value.length);
+ }
+
+ /**
+ * Fill in the {@link value } field by reading the required data
+ * from the given stream. This method first reads the array size
+ * (as CORBA <code>long</code>) and then calls the
+ * {@link org.omg.CORBA.portable.InputStream#read_char_array }.
+ *
+ * @param input the input stream to read from.
+ */
+ public void _read(InputStream input)
+ {
+ value = new char[ input.read_long() ];
+ input.read_char_array(value, 0, value.length);
+ typecode.setLength(value.length);
+ }
+
+ /**
+ * Returns the TypeCode, corresponding the CORBA type that is stored
+ * using this holder.
+ */
+ public TypeCode _type()
+ {
+ return typecode;
+ }
+
+ /**
+ * Write the {@link value } field to the given stream.
+ * This method first writes the array size
+ * (as CORBA <code>long</code>) and then calls the
+ * {@link org.omg.CORBA.portable.OutputStream#write_char_array }.
+ *
+ * @param output the output stream to write into.
+ */
+ public void _write(OutputStream output)
+ {
+ output.write_long(value.length);
+ output.write_char_array(value, 0, value.length);
+ }
+}
diff --git a/libjava/classpath/org/omg/CORBA/CompletionStatus.java b/libjava/classpath/org/omg/CORBA/CompletionStatus.java
new file mode 100644
index 00000000000..f9f3704430a
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/CompletionStatus.java
@@ -0,0 +1,158 @@
+/* CompletionStatus.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;
+
+import java.io.Serializable;
+
+import org.omg.CORBA.portable.IDLEntity;
+
+/**
+ * Defines the method completion status, usually for the time moment,
+ * when the exception has been thrown.
+ * @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
+ */
+public class CompletionStatus
+ implements Serializable, IDLEntity
+{
+ /**
+ * Use serialVersionUID for interoperability.
+ * Using the version 1.4 UID.
+ */
+ private static final long serialVersionUID = -9047319660881406859L;
+
+ /**
+ * The method was completed when the exception was thrown.
+ */
+ public static final int _COMPLETED_YES = 0;
+
+ /**
+ * The method was running when the exception was thrown.
+ */
+ public static final int _COMPLETED_NO = 1;
+
+ /**
+ * The method was either running or complete (no exact information availabe)
+ * when the exception was thrown.
+ */
+ public static final int _COMPLETED_MAYBE = 2;
+
+ /**
+ * An instance of CompletionStatus, initialized to {@link #COMPLETED_YES }
+ */
+ public static final CompletionStatus COMPLETED_YES =
+ new CompletionStatus(_COMPLETED_YES);
+
+ /**
+ * An instance of CompletionStatus, initialized to {@link #COMPLETED_NO }
+ */
+ public static final CompletionStatus COMPLETED_NO =
+ new CompletionStatus(_COMPLETED_NO);
+
+ /**
+ * An instance of CompletionStatus, initialized to {@link #COMPLETED_MAYBE }
+ */
+ public static final CompletionStatus COMPLETED_MAYBE =
+ new CompletionStatus(_COMPLETED_MAYBE);
+
+ /**
+ * The private array of all states. As long as the states form the uniform
+ * sequence, from_int can find the needed value directly indexing this array.
+ */
+ private static final CompletionStatus[] states =
+ new CompletionStatus[] { COMPLETED_YES, COMPLETED_NO, COMPLETED_MAYBE };
+ private final int _value;
+
+ /**
+ * No other instances can be created.
+ */
+ private CompletionStatus(int a_value)
+ {
+ _value = a_value;
+ }
+
+ /**
+ * Returns the CompletionStatus, matching the given integer constant
+ * @param completion one of COMPLETED_YES, COMPLETED_NO or COMPLEED_MAYBE.
+ * @return one of COMPLETED_YES, COMPLETED_NO or COMPLEED_MAYBE.
+ * @throws BAD_PARAM if the parameter is not one of these three valid values.
+ */
+ public static CompletionStatus from_int(int completion)
+ {
+ try
+ {
+ return states [ completion ];
+ }
+ catch (ArrayIndexOutOfBoundsException ex)
+ {
+ throw new BAD_OPERATION("Invalid completion status " + completion);
+ }
+ }
+
+ /**
+ * Returns a short string representation.
+ * @return a string, defining the completion status.
+ */
+ public String toString()
+ {
+ switch (value())
+ {
+ case _COMPLETED_YES :
+ return "completed";
+
+ case _COMPLETED_NO :
+ return "not completed";
+
+ case _COMPLETED_MAYBE :
+ return "maybe completed";
+
+ default :
+ return "invalid completion status instance";
+ }
+ }
+
+ /**
+ * Returns the value, representing the completion
+ * status of this object.
+ * @return one of COMPLETED_MAYBE, COMPLETED_YES or COMPLETED_NO
+ */
+ public int value()
+ {
+ return _value;
+ }
+}
diff --git a/libjava/classpath/org/omg/CORBA/CompletionStatusHelper.java b/libjava/classpath/org/omg/CORBA/CompletionStatusHelper.java
new file mode 100644
index 00000000000..f6285744852
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/CompletionStatusHelper.java
@@ -0,0 +1,140 @@
+/* CompletionStatusHelper.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;
+
+import gnu.CORBA.Restricted_ORB;
+
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+
+/**
+ * Provides static helper methods for working with
+ * {@link CompletionStatus}.
+ *
+ * @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
+ */
+public abstract class CompletionStatusHelper
+{
+ /**
+ * The cached typecode value, computed once.
+ */
+ private static TypeCode typeCode;
+
+ /**
+ * Extract the {@link CompletionStatus} from the
+ * given {@link Any}. This implementation expects
+ * the integer (Corba long) value, stating the completion
+ * status.
+ *
+ * @param a an Any to extract the completion status from.
+ *
+ * @return completion status
+ */
+ public static CompletionStatus extract(Any a)
+ {
+ return CompletionStatus.from_int(a.extract_long());
+ }
+
+ /**
+ * Returns the agreed Id.
+ * @return <code>IDL:omg.org/CORBA/CompletionStatus:1.0</code>, always.
+ */
+ public static String id()
+ {
+ return "IDL:omg.org/CORBA/CompletionStatus:1.0";
+ }
+
+ /**
+ * Insert into the given {@link CompletionStatus} into the
+ * given {@link Any}. This implementation inserts it as an
+ * integer (CORBA long).
+ *
+ * @param into the target Any.
+ * @param that the {@link CompletionStatus} to insert.
+ */
+ public static void insert(Any into, CompletionStatus that)
+ {
+ into.insert_long(that.value());
+ }
+
+ /**
+ * Reads the {@link CompletionStatus} from the CORBA input stream.
+ * This implementation reads an an integer (CORBA long).
+ *
+ * @param input the CORBA (not java.io) stream to read from.
+ * @return the value from the stream.
+ */
+ public static CompletionStatus read(InputStream input)
+ {
+ return CompletionStatus.from_int(input.read_long());
+ }
+
+ /**
+ * Writes the {@link CompletionStatus} into the given stream.
+ * This implementation writes an int (CORBA long), corresponding
+ * the status of completion.
+ *
+ * @param output the CORBA (not java.io) output stream to write.
+ * @param status the value that must be written.
+ */
+ public static void write(OutputStream output, CompletionStatus status)
+ {
+ output.write_long(status.value());
+ }
+
+ /**
+ * Get the parameter mode typecode (enumeration, named "CompletionStatus").
+ * The typecode states that the enumeration can obtain one of
+ * the following values: COMPLETED_YES ,COMPLETED_NO or COMPLETED_MAYBE .
+ */
+ public static TypeCode type()
+ {
+ if (typeCode == null)
+ {
+ String[] members =
+ new String[] { "COMPLETED_YES", "COMPLETED_NO", "COMPLETED_MAYBE" };
+
+ typeCode =
+ Restricted_ORB.Singleton.create_enum_tc(id(), "CompletionStatus",
+ members
+ );
+ }
+ return typeCode;
+ }
+} \ No newline at end of file
diff --git a/libjava/classpath/org/omg/CORBA/Context.java b/libjava/classpath/org/omg/CORBA/Context.java
new file mode 100644
index 00000000000..e3f7363f4cf
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/Context.java
@@ -0,0 +1,122 @@
+/* Context.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;
+
+
+/**
+ *
+ * This class holds the list of the named properties. It is normally
+ * used to represent information about various circumstances of the
+ * invocation. A Context if first created by
+ * {@link org.omg.CORBA.ORB#get_default_context() } and then invoking
+ * {@link create_child(String)} of the default context.
+ *
+ * The contexts are named.
+ *
+ * @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
+ *
+ */
+public abstract class Context
+{
+ public Context()
+ {
+ }
+
+ /**
+ * Get the context name.
+ * @return the name of this context.
+ */
+ public abstract String context_name();
+
+ /**
+ * Create a child of this Context, giving it a name.
+ * @param name a name of the child context.
+ *
+ * @return the newly created context.
+ */
+ public abstract Context create_child(String child);
+
+ /**
+ * Delete one or several (identically named) given properties.
+ *
+ * @param property the name of the property to delete, may
+ * end by wildchar character '*'. The search scope is always
+ * limited to the current context.
+ */
+ public abstract void delete_values(String property);
+
+ /**
+ * Search the values.
+ *
+ * @param start_scope the context at which to initiate the search.
+ * @param flags the search operation flags.
+ * The flag {@link CTX_RESTRICT_SCOPE} means
+ * that search is restricted to the start_scope.
+ * @param pattern the property being searched, can be
+ * either name or name with the optional trailing wildchar character
+ * '*'.
+ * @return the list of the found properties.
+ */
+ public abstract NVList get_values(String start_scope, int flags,
+ String pattern
+ );
+
+ /**
+ * Get the parent of this context.
+ * @return the parent of this context.
+ */
+ public abstract Context parent();
+
+ /**
+ * Set a property.
+ * @param name the property name.
+ * @param value the property value (the {@link Any} must hold string).
+ */
+ public abstract void set_one_value(String name, Any value);
+
+ /**
+ * Set multiple properties.
+ *
+ * @param values a list of properties, the {@link Any}'s
+ * in the list components must hold strings.
+ */
+ public abstract void set_values(NVList values);
+
+
+}
diff --git a/libjava/classpath/org/omg/CORBA/ContextList.java b/libjava/classpath/org/omg/CORBA/ContextList.java
new file mode 100644
index 00000000000..d6b8800c9ed
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/ContextList.java
@@ -0,0 +1,85 @@
+/* ContextList.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;
+
+
+/**
+ * Stores a modifiable list of String objects representing the property names.
+ * The property values are normally stored in the {@link Context }.
+ *
+ * The context list is created by invoking {@link ORB#create_context_list()}.
+ *
+ * @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
+ */
+public abstract class ContextList
+{
+ /**
+ * Add a name object
+ * @param name a name to add.
+ */
+ public abstract void add(String name);
+
+ /**
+ * Return the number of stored names
+ *
+ * @return a number of names.
+ */
+ public abstract int count();
+
+ /**
+ * Return the name at the given index.
+ *
+ * @param at the index
+ * @return the name at the given index
+ *
+ * @throws Bounds if the index is out of bounds.
+ */
+ public abstract String item(int at)
+ throws Bounds;
+
+ /**
+ * Remove the name at the given index.
+ *
+ * @param at the index
+ *
+ * @throws Bounds if the index is out of bounds.
+ */
+ public abstract void remove(int at)
+ throws Bounds;
+}
diff --git a/libjava/classpath/org/omg/CORBA/Current.java b/libjava/classpath/org/omg/CORBA/Current.java
new file mode 100644
index 00000000000..f6f89a16f7b
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/Current.java
@@ -0,0 +1,59 @@
+/* Current.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.CORBA;
+
+import org.omg.CORBA.portable.IDLEntity;
+
+/**
+ * <p>
+ * The interfaces, derived from this class, define the objects, providing
+ * information, associated with a particular thread of execution. The examples
+ * of such data could be the security information, transaction identifiers
+ * and so on.
+ * </p><p>
+ * The various aspects of this information are provided by subinterfaces,
+ * derived from the Current. There are no operations defined for
+ * the "general" Current itself.
+ * </p>
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public interface Current
+ extends org.omg.CORBA.Object, IDLEntity, CurrentOperations
+{
+} \ No newline at end of file
diff --git a/libjava/classpath/org/omg/CORBA/CurrentHelper.java b/libjava/classpath/org/omg/CORBA/CurrentHelper.java
new file mode 100644
index 00000000000..51bd65fc143
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/CurrentHelper.java
@@ -0,0 +1,180 @@
+/* CurrentHelper.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;
+
+import org.omg.CORBA.Any;
+import org.omg.CORBA.BAD_OPERATION;
+import org.omg.CORBA.ORB;
+import org.omg.CORBA.StructMember;
+import org.omg.CORBA.TCKind;
+import org.omg.CORBA.TypeCode;
+import org.omg.CORBA.portable.Delegate;
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.ObjectImpl;
+import org.omg.CORBA.portable.OutputStream;
+
+/**
+* The helper operations for the CORBA object {@link Current}.
+*
+* @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+*/
+public abstract class CurrentHelper
+{
+ /**
+ * The Current stub (proxy), used on the client side.
+ * The {@link Current} methods should contain the code for remote
+ * invocaton. As there are no methods defined, this class is only
+ * used for the formal support of the
+ * {@link #narrow(org.omg.CORBA.Object)}.
+ */
+ private static class _CurrentStub
+ extends ObjectImpl
+ implements Current
+ {
+ /**
+ * Create the naming context stub with the given delegate.
+ */
+ public _CurrentStub(Delegate delegate)
+ {
+ _set_delegate(delegate);
+ }
+
+ /**
+ * Return the array of repository ids for this object.
+ */
+ public String[] _ids()
+ {
+ return new String[] { id() };
+ }
+ }
+
+ /**
+ * The cached {@link Current} typecode, computed once.
+ */
+ private static TypeCode typeCode;
+
+ /**
+ * Get the type code of the {@link Current}.
+ */
+ public static TypeCode type()
+ {
+ if (typeCode == null)
+ typeCode = ORB.init().create_interface_tc(id(), "Current");
+ return typeCode;
+ }
+
+ /**
+ * Insert the Current into the given Any.
+ *
+ * @param any the Any to insert into.
+ * @param that the Current to insert.
+ */
+ public static void insert(Any any, Current that)
+ {
+ any.insert_Object(that);
+ }
+
+ /**
+ * Extract the Current from given Any.
+ *
+ * @throws BAD_OPERATION if the passed Any does not contain Current.
+ */
+ public static Current extract(Any any)
+ {
+ return narrow(any.extract_Object());
+ }
+
+ /**
+ * Get the Current repository id.
+ *
+ * @return "IDL:omg.org/CORBA/Current:1.0", always.
+ */
+ public static String id()
+ {
+ return "IDL:omg.org/CORBA/Current:1.0";
+ }
+
+ /**
+ * Cast the passed object into the Current. If the
+ * object has a different java type, create an instance
+ * of the _CurrentStub, using the same delegate, as for
+ * the passed parameter. Hence, unlike java type cast,
+ * this method may return a different object, than has been passed.
+ *
+ * @param obj the object to narrow.
+ * @return narrowed instance.
+ *
+ * @throws BAD_PARAM if the passed object is not a Current.
+ */
+ public static Current narrow(org.omg.CORBA.Object obj)
+ {
+ if (obj == null)
+ return null;
+ else if (obj instanceof Current)
+ return (Current) obj;
+ else if (!obj._is_a(id()))
+ throw new BAD_PARAM("Not a Current");
+ else
+ {
+ Delegate delegate = ((ObjectImpl) obj)._get_delegate();
+ return new _CurrentStub(delegate);
+ }
+ }
+
+ /**
+ * Read the Current from the CDR intput stream (IOR profile expected).
+ *
+ * @param input a org.omg.CORBA.portable stream to read from.
+ */
+ public static Current read(InputStream input)
+ {
+ return narrow(input.read_Object());
+ }
+
+ /**
+ * Write the Current to the CDR output stream (as IOR profile).
+ *
+ * @param output a org.omg.CORBA.portable stream stream to write into.
+ * @param value a value to write.
+ */
+ public static void write(OutputStream output, Current value)
+ {
+ output.write_Object(value);
+ }
+} \ No newline at end of file
diff --git a/libjava/classpath/org/omg/CORBA/CurrentHolder.java b/libjava/classpath/org/omg/CORBA/CurrentHolder.java
new file mode 100644
index 00000000000..83e5365d6a3
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/CurrentHolder.java
@@ -0,0 +1,103 @@
+/* CurrentHolder.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;
+
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+import org.omg.CORBA.portable.Streamable;
+
+/**
+* A holder for the object {@link Current}.
+*
+* @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+*/
+public class CurrentHolder
+ implements Streamable
+{
+ /**
+ * The stored Current value.
+ */
+ public Current value;
+
+ /**
+ * Create the unitialised instance, leaving the value field
+ * with default <code>null</code> value.
+ */
+ public CurrentHolder()
+ {
+ }
+
+ /**
+ * Create the initialised instance.
+ * @param initialValue the value that will be assigned to
+ * the <code>value</code> field.
+ */
+ public CurrentHolder(Current initialValue)
+ {
+ value = initialValue;
+ }
+
+ /**
+ * Fill in the {@link value} by data from the CDR stream.
+ *
+ * @param input the org.omg.CORBA.portable stream to read.
+ */
+ public void _read(InputStream input)
+ {
+ value = CurrentHelper.read(input);
+ }
+
+ /**
+ * Write the stored value into the CDR stream.
+ *
+ * @param output the org.omg.CORBA.portable stream to write.
+ */
+ public void _write(OutputStream output)
+ {
+ CurrentHelper.write(output, value);
+ }
+
+ /**
+ * Get the typecode of the Current.
+ */
+ public org.omg.CORBA.TypeCode _type()
+ {
+ return CurrentHelper.type();
+ }
+} \ No newline at end of file
diff --git a/libjava/classpath/org/omg/CORBA/CurrentOperations.java b/libjava/classpath/org/omg/CORBA/CurrentOperations.java
new file mode 100644
index 00000000000..a40db85c4e1
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/CurrentOperations.java
@@ -0,0 +1,57 @@
+/* CurrentOperations.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;
+
+
+/**
+ * <p>
+ * The interfaces, derived from this class, define operations that provide
+ * information, associated with a particular thread of execution.
+ * </p><p>
+ * There are no operations for the general "Current". Instead, the operations
+ * are defined for various subinterfaces that were derived from the
+ * Current.
+ * </p>
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ *
+ * @see Current
+ */
+public interface CurrentOperations
+{
+}
diff --git a/libjava/classpath/org/omg/CORBA/CustomMarshal.java b/libjava/classpath/org/omg/CORBA/CustomMarshal.java
new file mode 100644
index 00000000000..d0e47a9fc31
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/CustomMarshal.java
@@ -0,0 +1,68 @@
+/* CustomMarshal.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;
+
+
+/**
+ * This interface indicates that the object can provide its own methods
+ * for reading and writing its content. This interface is typically used
+ * by the CORBA implementation only. The user application should use the
+ * {@link CustomValue} that is a descendant of this interface.
+ *
+ * @see DataInputStream
+ * @see DataOutputStream
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public interface CustomMarshal
+{
+ /**
+ * Read (unmarshal) the content of this object from the given input stream.
+ *
+ * @param into_stream a stream to read from.
+ */
+ public void marshal(DataOutputStream into_stream);
+
+ /**
+ * Write (marshal) the content of this object to the given input stream.
+ *
+ * @param from_stream a stream to write into.
+ */
+ public void unmarshal(DataInputStream from_stream);
+} \ No newline at end of file
diff --git a/libjava/classpath/org/omg/CORBA/CustomValue.java b/libjava/classpath/org/omg/CORBA/CustomValue.java
new file mode 100644
index 00000000000..0e5809fd6ea
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/CustomValue.java
@@ -0,0 +1,60 @@
+/* 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;
+
+import org.omg.CORBA.portable.ValueBase;
+
+/**
+ * A Custom Value is a {@link ValueBase} implementing its own methods for
+ * reading and writing (unmarshaling and marshaling) the content. These methods
+ * are defined in superinterface {@link CustomMarshal}.
+ *
+ * Custom value types can never be safely truncated to the more general
+ * base type. They and always require an exact match for their RepositoryId
+ * in the receiving context.
+ *
+ * If the value base does not implement this interface, it normally implements
+ * {@link org.omg.CORBA.portable.StremableValue} instead.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public interface CustomValue
+ extends ValueBase, CustomMarshal
+{
+} \ No newline at end of file
diff --git a/libjava/classpath/org/omg/CORBA/DATA_CONVERSION.java b/libjava/classpath/org/omg/CORBA/DATA_CONVERSION.java
new file mode 100644
index 00000000000..3faacdcb2dd
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/DATA_CONVERSION.java
@@ -0,0 +1,97 @@
+/* DATA_CONVERSION.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;
+
+import java.io.Serializable;
+
+/**
+ * Means that the ORB cannot convert between the marshalled and
+ * native data representation.
+ *
+ * @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
+ */
+public class DATA_CONVERSION
+ extends SystemException
+ implements Serializable
+{
+ /**
+ * Use serialVersionUID for interoperability.
+ */
+ private static final long serialVersionUID = 1874869932271600956L;
+
+ /**
+ * Creates a DATA_CONVERSION with the default minor code of 0,
+ * completion state COMPLETED_NO and the given explaining message.
+ * @param reasom the explaining message.
+ */
+ public DATA_CONVERSION(String message)
+ {
+ super(message, 0, CompletionStatus.COMPLETED_NO);
+ }
+
+ /**
+ * Creates DATA_CONVERSION with the default minor code of 0 and a
+ * completion state COMPLETED_NO.
+ */
+ public DATA_CONVERSION()
+ {
+ super("", 0, CompletionStatus.COMPLETED_NO);
+ }
+
+ /** Creates a DATA_CONVERSION exception with the specified minor
+ * code and completion status.
+ * @param minor additional error code.
+ * @param completed the method completion status.
+ */
+ public DATA_CONVERSION(int minor, CompletionStatus completed)
+ {
+ super("", minor, completed);
+ }
+
+ /**
+ * Created DATA_CONVERSION exception, providing full information.
+ * @param reason explaining message.
+ * @param minor additional error code (the "minor").
+ * @param completed the method completion status.
+ */
+ public DATA_CONVERSION(String reason, int minor, CompletionStatus completed)
+ {
+ super(reason, minor, completed);
+ }
+}
diff --git a/libjava/classpath/org/omg/CORBA/DataInputStream.java b/libjava/classpath/org/omg/CORBA/DataInputStream.java
new file mode 100644
index 00000000000..bb9fa3df82a
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/DataInputStream.java
@@ -0,0 +1,276 @@
+/* DataInputStream.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;
+
+import org.omg.CORBA.portable.ValueBase;
+
+/**
+ * An interface for reading the custom value types. A value type, providing
+ * its own mechanism for reading the content, must implement
+ * the {@link CustomValue} that uses this interface.
+ *
+ * @see CustomValue
+ * @see CustomMarshal
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public interface DataInputStream
+ extends ValueBase
+{
+ /**
+ * Read {@link Any}.
+ * @return a value, extracted from the stream.
+ */
+ Any read_any();
+
+ /**
+ * Read boolean.
+ * @return a value, extracted from the stream.
+ */
+ boolean read_boolean();
+
+ /**
+ * Read narrow (usually 8 bit) char.
+ * @return a value, extracted from the stream.
+ */
+ char read_char();
+
+ /**
+ * Read wide (usually 16 bit) char.
+ * @return a value, extracted from the stream.
+ */
+ char read_wchar();
+
+ /**
+ * Read octet (byte).
+ * @return a value, extracted from the stream.
+ */
+ byte read_octet();
+
+ /**
+ * Read short (16 bit int).
+ * @return a value, extracted from the stream.
+ */
+ short read_short();
+
+ /**
+ * Read unsigned short.
+ * @return a value, extracted from the stream.
+ */
+ short read_ushort();
+
+ /**
+ * Read CORBA long (java int, 32 bits).
+ * @return a value, extracted from the stream.
+ */
+ int read_long();
+
+ /**
+ * Read CORBA unsigned long (java int).
+ * @return a value, extracted from the stream.
+ */
+ int read_ulong();
+
+ /**
+ * Read CORBA long long (java long, 64 bits).
+ * @return a value, extracted from the stream.
+ */
+ long read_longlong();
+
+ /**
+ * Read unsigned CORBA long long (java long, 64 bits).
+ * @return a value, extracted from the stream.
+ */
+ long read_ulonglong();
+
+ /**
+ * Read float.
+ * @return a value, extracted from the stream.
+ */
+ float read_float();
+
+ /**
+ * Read dobule.
+ * @return a value, extracted from the stream.
+ */
+ double read_double();
+
+ /**
+ * Read narrow string (usually 8 bits per character).
+ * @return a value, extracted from the stream.
+ */
+ String read_string();
+
+ /**
+ * Read wide string (usually 16 bits per character).
+ * @return a value, extracted from the stream.
+ */
+ String read_wstring();
+
+ /**
+ * Read CORBA object.
+ *
+ * @return a value, extracted from the stream. May be null
+ * if the null was previously written by {@link DataOutputStream#write_Object}.
+ */
+ org.omg.CORBA.Object read_Object();
+
+ /**
+ * Read abstract interface.
+ *
+ * @return a value, extracted from the stream. May be either CORBA Object or
+ * CORBA value type.
+ */
+ java.lang.Object read_Abstract();
+
+ /**
+ * Read the CORBA value type.
+ * @return a value, extracted from the stream.
+ */
+ java.io.Serializable read_Value();
+
+ /**
+ * Read typecode.
+ * @return a value, extracted from the stream.
+ */
+ TypeCode read_TypeCode();
+
+ /**
+ * Read array of Any's.
+ *
+ * The value, extracted from the stream, is returned in the
+ * .value field of the passed holder.
+ */
+ void read_any_array(AnySeqHolder seq, int offset, int length);
+
+ /**
+ * Read boolean array.
+ * The value, extracted from the stream, is returned in the
+ * .value field of the passed holder.
+ */
+ void read_boolean_array(BooleanSeqHolder seq, int offset, int length);
+
+ /**
+ * Read array of narrow (usually 8 bit) chars.
+ *
+ * The value, extracted from the stream, is returned in the
+ * .value field of the passed holder.
+ */
+ void read_char_array(CharSeqHolder seq, int offset, int length);
+
+ /**
+ * Read array of wide (usually 16 bit) chars.
+ *
+ * The value, extracted from the stream, is returned in the
+ * .value field of the passed holder.
+ */
+ void read_wchar_array(WCharSeqHolder seq, int offset, int length);
+
+ /**
+ * Read array of bytes.
+ *
+ * The value, extracted from the stream, is returned in the
+ * .value field of the passed holder.
+ */
+ void read_octet_array(OctetSeqHolder seq, int offset, int length);
+
+ /**
+ * Read array of shorts (16 bit ints).
+ *
+ * The value, extracted from the stream, is returned in the
+ * .value field of the passed holder.
+ */
+ void read_short_array(ShortSeqHolder seq, int offset, int length);
+
+ /**
+ * Read array of unsigned shorts (16 bit ints).
+ *
+ * The value, extracted from the stream, is returned in the
+ * .value field of the passed holder.
+ */
+ void read_ushort_array(UShortSeqHolder seq, int offset, int length);
+
+ /**
+ * Read array of CORBA longs (java ints).
+ *
+ * The value, extracted from the stream, is returned in the
+ * .value field of the passed holder.
+ */
+ void read_long_array(LongSeqHolder seq, int offset, int length);
+
+ /**
+ * Read array of CORBA unsigned longs (java ints).
+ *
+ * The value, extracted from the stream, is returned in the
+ * .value field of the passed holder.
+ */
+ void read_ulong_array(ULongSeqHolder seq, int offset, int length);
+
+ /**
+ * Read array of CORBA unsigned long longs (java longs).
+ *
+ * The value, extracted from the stream, is returned in the
+ * .value field of the passed holder.
+ */
+ void read_ulonglong_array(ULongLongSeqHolder seq, int offset, int length);
+
+ /**
+ * Read array of CORBA long longs (java longs).
+ *
+ * The value, extracted from the stream, is returned in the
+ * .value field of the passed holder.
+ */
+ void read_longlong_array(LongLongSeqHolder seq, int offset, int length);
+
+ /**
+ * Read array of floats.
+ *
+ * The value, extracted from the stream, is returned in the
+ * .value field of the passed holder.
+ */
+ void read_float_array(FloatSeqHolder seq, int offset, int length);
+
+ /**
+ * Read array of doubles.
+ *
+ * The value, extracted from the stream, is returned in the
+ * .value field of the passed holder.
+ */
+ void read_double_array(DoubleSeqHolder seq, int offset, int length);
+} \ No newline at end of file
diff --git a/libjava/classpath/org/omg/CORBA/DataOutputStream.java b/libjava/classpath/org/omg/CORBA/DataOutputStream.java
new file mode 100644
index 00000000000..5e0f021fe80
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/DataOutputStream.java
@@ -0,0 +1,281 @@
+/* DataOutputStream.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;
+
+import org.omg.CORBA.portable.ValueBase;
+
+/**
+ * An interface for writing the custom value types. A value type, providing
+ * its own mechanism for writing the content, must implement
+ * the {@link CustomValue} that uses this interface.
+ *
+ * @see CustomValue
+ * @see CustomMarshal
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public interface DataOutputStream
+ extends ValueBase
+{
+ /**
+ * Write {@link Any} to the output stream.
+ *
+ * @param value a value to write.
+ */
+ void write_any(Any value);
+
+ /**
+ * Write boolean to the output stream.
+ *
+ * @param value a value to write.
+ */
+ void write_boolean(boolean value);
+
+ /**
+ * Write narrow (usually 8 bit) char to the output stream.
+ *
+ * @param value a value to write.
+ */
+ void write_char(char value);
+
+ /**
+ * Write wide (usually 16 bit) char to the output stream.
+ *
+ * @param value a value to write.
+ */
+ void write_wchar(char value);
+
+ /**
+ * Write octet (byte) to the output stream.
+ *
+ * @param value a value to write.
+ */
+ void write_octet(byte value);
+
+ /**
+ * Write short (16 bit signed integer) to the output stream.
+ *
+ * @param value a value to write.
+ */
+ void write_short(short value);
+
+ /**
+ * Write unsigned short to the output stream.
+ *
+ * @param value a value to write.
+ */
+ void write_ushort(short value);
+
+ /**
+ * Write CORBA long (32 bits, java int) to the output stream.
+ *
+ * @param value a value to write.
+ */
+ void write_long(int value);
+
+ /**
+ * Write unsigned CORBA long (32 bits, java int) to the output stream.
+ *
+ * @param value a value to write.
+ */
+ void write_ulong(int value);
+
+ /**
+ * Write CORBA long long (64 bits, java long) to the output stream.
+ *
+ * @param value a value to write.
+ */
+ void write_longlong(long value);
+
+ /**
+ * Write unsigned CORBA long long (64 bits, java long) to the output stream.
+ *
+ * @param value a value to write.
+ */
+ void write_ulonglong(long value);
+
+ /**
+ * Write float to the output stream.
+ *
+ * @param value a value to write.
+ */
+ void write_float(float value);
+
+ /**
+ * Write double to the output stream.
+ *
+ * @param value a value to write.
+ */
+ void write_double(double value);
+
+ /**
+ * Write narrow (usually 8 bits per character) string to the output stream.
+ *
+ * @param value a value to write.
+ */
+ void write_string(String value);
+
+ /**
+ * Write wide (usually 16 bits per character) string to the output stream.
+ *
+ * @param value a value to write.
+ */
+ void write_wstring(String value);
+
+ /**
+ * Write CORBA object reference to the output stream.
+ *
+ * @param value a value to write, null should be supported.
+ */
+ void write_Object(org.omg.CORBA.Object value);
+
+ /**
+ * Write abstract interface to the output stream.
+ *
+ * @param value a value to write, can be either CORBA object or
+ * CORBA value type.
+ */
+ void write_Abstract(java.lang.Object value);
+
+ /**
+ * Write value type to the output stream.
+ *
+ * @param value a value to write.
+ */
+ void write_Value(java.io.Serializable value);
+
+ /**
+ * Write typecode to the output stream.
+ *
+ * @param value a value to write.
+ */
+ void write_TypeCode(TypeCode value);
+
+ /**
+ * Write array of Any's to the output stream.
+ *
+ * @param value a value to write.
+ */
+ void write_any_array(Any[] seq, int offset, int length);
+
+ /**
+ * Write array of boolean's to the output stream.
+ *
+ * @param value a value to write.
+ */
+ void write_boolean_array(boolean[] seq, int offset, int length);
+
+ /**
+ * Write array of narrow chars to the output stream.
+ *
+ * @param value a value to write.
+ */
+ void write_char_array(char[] seq, int offset, int length);
+
+ /**
+ * Write array of wide chars to the output stream.
+ *
+ * @param value a value to write.
+ */
+ void write_wchar_array(char[] seq, int offset, int length);
+
+ /**
+ * Write array of octets (bytes) to the output stream.
+ *
+ * @param value a value to write.
+ */
+ void write_octet_array(byte[] seq, int offset, int length);
+
+ /**
+ * Write array of shorts (16 bit integers) to the output stream.
+ *
+ * @param value a value to write.
+ */
+ void write_short_array(short[] seq, int offset, int length);
+
+ /**
+ * Write array of unsigned shorts (16 bit integers) to the output stream.
+ *
+ * @param value a value to write.
+ */
+ void write_ushort_array(short[] seq, int offset, int length);
+
+ /**
+ * Write array of CORBA longs (java ints) to the output stream.
+ *
+ * @param value a value to write.
+ */
+ void write_long_array(int[] seq, int offset, int length);
+
+ /**
+ * Write array of unsigned CORBA longs (java ints) to the output stream.
+ *
+ * @param value a value to write.
+ */
+ void write_ulong_array(int[] seq, int offset, int length);
+
+ /**
+ * Write array of unsigned CORBA long longs (java longs)
+ * to the output stream.
+ *
+ * @param value a value to write.
+ */
+ void write_ulonglong_array(long[] seq, int offset, int length);
+
+ /**
+ * Write arrayo fo CORBA long longs (java ints) to the output stream.
+ *
+ * @param value a value to write.
+ */
+ void write_longlong_array(long[] seq, int offset, int length);
+
+ /**
+ * Write array of floats to the output stream.
+ *
+ * @param value a value to write.
+ */
+ void write_float_array(float[] seq, int offset, int length);
+
+ /**
+ * Write array of doubles to the output stream.
+ *
+ * @param value a value to write.
+ */
+ void write_double_array(double[] seq, int offset, int length);
+} \ No newline at end of file
diff --git a/libjava/classpath/org/omg/CORBA/DefinitionKind.java b/libjava/classpath/org/omg/CORBA/DefinitionKind.java
new file mode 100644
index 00000000000..ac185bdacea
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/DefinitionKind.java
@@ -0,0 +1,425 @@
+/* DefinitionKind.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;
+
+import org.omg.CORBA.portable.IDLEntity;
+
+import java.io.Serializable;
+
+/**
+ * This class indicates the kind of the definition, stored in the interface
+ * repository.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public class DefinitionKind
+ implements IDLEntity, Serializable
+{
+ /**
+ * Use v1.4 serialVersionUID for interoperability.
+ */
+ private static final long serialVersionUID = -8601167576704143376L;
+
+ /**
+ * Indicates that the current definition defines has no definition kind.
+ */
+ public static final int _dk_none = 0;
+
+ /**
+ * This is a "wildcard '*'", used in cases where any definition kind
+ * is appropriate .
+ */
+ public static final int _dk_all = 1;
+
+ /**
+ * Indicates that the current definition defines an attribute.
+ */
+ public static final int _dk_Attribute = 2;
+
+ /**
+ * Indicates that the current definition defines a constant.
+ */
+ public static final int _dk_Constant = 3;
+
+ /**
+ * Indicates that the current definition defines an exception.
+ */
+ public static final int _dk_Exception = 4;
+
+ /**
+ * Indicates that the current definition defines an interface.
+ * The interface definition can contain constants, types,
+ * exceptions, operations, and attributes.
+ */
+ public static final int _dk_Interface = 5;
+
+ /**
+ * Indicates that the current definition defines a Module.
+ * The Module can contain constants, typedefs, exceptions and also
+ * interface, component, home, value or event type definitions.
+ * The module can also enclose other (nested) modules.
+ */
+ public static final int _dk_Module = 6;
+
+ /**
+ * Indicates that the current definition defines an operation, including
+ * the lists of parameters and exceptions raised by this operation.
+ */
+ public static final int _dk_Operation = 7;
+
+ /**
+ * Indicates that the current definition defines a named type that is not
+ * an interface nor a value definition. Generally, it also cannot be
+ * a definition of component, home and event, but these three kinds are
+ * not listed in this class.
+ */
+ public static final int _dk_Typedef = 8;
+
+ /**
+ * Indicates that the current definition defines an alias.
+ */
+ public static final int _dk_Alias = 9;
+
+ /**
+ * Indicates that the current definition defines a structure.
+ */
+ public static final int _dk_Struct = 10;
+
+ /**
+ * Indicates that the current definition defines a union.
+ */
+ public static final int _dk_Union = 11;
+
+ /**
+ * Indicates that the current definition defines an enumeration.
+ */
+ public static final int _dk_Enum = 12;
+
+ /**
+ * Indicates that the current definition defines a primitive type.
+ */
+ public static final int _dk_Primitive = 13;
+
+ /**
+ * Indicates that the current definition defines a string.
+ */
+ public static final int _dk_String = 14;
+
+ /**
+ * Indicates that the current definition defines a sequence.
+ */
+ public static final int _dk_Sequence = 15;
+
+ /**
+ * Indicates that the current definition defines an array.
+ */
+ public static final int _dk_Array = 16;
+
+ /**
+ * Indicates that the current definition defines an another interface
+ * repository.
+ */
+ public static final int _dk_Repository = 17;
+
+ /**
+ * Indicates that the current definition defines a wide (usually 16-bit
+ * per character) string.
+ */
+ public static final int _dk_Wstring = 18;
+
+ /**
+ * Indicates that the current definition defines a CORBA <code>fixed</code>.
+ */
+ public static final int _dk_Fixed = 19;
+
+ /**
+ * Indicates that the current definition defines a value.
+ */
+ public static final int _dk_Value = 20;
+
+ /**
+ * Indicates that the current definition defines a value box.
+ */
+ public static final int _dk_ValueBox = 21;
+
+ /**
+ * Indicates that the current definition defines value member.
+ */
+ public static final int _dk_ValueMember = 22;
+
+ /**
+ * Indicates that the current definition defines a Native.
+ */
+ public static final int _dk_Native = 23;
+
+ /**
+ * Indicates that the current definition defines an abstract interface.
+ */
+ public static final int _dk_AbstractInterface = 24;
+
+ /**
+ * Indicates that the current definition defines has no definition kind.
+ */
+ public static final DefinitionKind dk_none = new DefinitionKind(_dk_none);
+
+ /**
+ * This is a "wildcard '*'", used in cases where any definition kind
+ * is appropriate .
+ */
+ public static final DefinitionKind dk_all = new DefinitionKind(_dk_all);
+
+ /**
+ * Indicates that the current definition defines an attribute.
+ */
+ public static final DefinitionKind dk_Attribute = new DefinitionKind(_dk_Attribute);
+
+ /**
+ * Indicates that the current definition defines a constant.
+ */
+ public static final DefinitionKind dk_Constant = new DefinitionKind(_dk_Constant);
+
+ /**
+ * Indicates that the current definition defines an exception.
+ */
+ public static final DefinitionKind dk_Exception = new DefinitionKind(_dk_Exception);
+
+ /**
+ * Indicates that the current definition defines an interface.
+ * The interface definition can contain constants, types,
+ * exceptions, operations, and attributes.
+ */
+ public static final DefinitionKind dk_Interface = new DefinitionKind(_dk_Interface);
+
+ /**
+ * Indicates that the current definition defines a Module.
+ * The Module can contain constants, typedefs, exceptions and also
+ * interface, component, home, value or event type definitions.
+ * The module can also enclose other (nested) modules.
+ */
+ public static final DefinitionKind dk_Module = new DefinitionKind(_dk_Module);
+
+ /**
+ * Indicates that the current definition defines an operation, including
+ * the lists of parameters and exceptions raised by this operation.
+ */
+ public static final DefinitionKind dk_Operation = new DefinitionKind(_dk_Operation);
+
+ /**
+ * Indicates that the current definition defines a named type that is not
+ * an interface nor a value definition. Generally, it also cannot be
+ * a definition of component, home and event, but these three kinds are
+ * not listed in this class.
+ */
+ public static final DefinitionKind dk_Typedef = new DefinitionKind(_dk_Typedef);
+
+ /**
+ * Indicates that the current definition defines an alias.
+ */
+ public static final DefinitionKind dk_Alias = new DefinitionKind(_dk_Alias);
+
+ /**
+ * Indicates that the current definition defines a structure.
+ */
+ public static final DefinitionKind dk_Struct = new DefinitionKind(_dk_Struct);
+
+ /**
+ * Indicates that the current definition defines a union.
+ */
+ public static final DefinitionKind dk_Union = new DefinitionKind(_dk_Union);
+
+ /**
+ * Indicates that the current definition defines an enumeration.
+ */
+ public static final DefinitionKind dk_Enum = new DefinitionKind(_dk_Enum);
+
+ /**
+ * Indicates that the current definition defines a primitive type.
+ */
+ public static final DefinitionKind dk_Primitive = new DefinitionKind(_dk_Primitive);
+
+ /**
+ * Indicates that the current definition defines a string.
+ */
+ public static final DefinitionKind dk_String = new DefinitionKind(_dk_String);
+
+ /**
+ * Indicates that the current definition defines a sequence.
+ */
+ public static final DefinitionKind dk_Sequence = new DefinitionKind(_dk_Sequence);
+
+ /**
+ * Indicates that the current definition defines an array.
+ */
+ public static final DefinitionKind dk_Array = new DefinitionKind(_dk_Array);
+
+ /**
+ * Indicates that the current definition defines an another interface
+ * repository.
+ */
+ public static final DefinitionKind dk_Repository =
+ new DefinitionKind(_dk_Repository);
+
+ /**
+ * Indicates that the current definition defines a wide (usually 16-bit
+ * per character) string.
+ */
+ public static final DefinitionKind dk_Wstring = new DefinitionKind(_dk_Wstring);
+
+ /**
+ * Indicates that the current definition defines a CORBA <code>fixed</code>.
+ */
+ public static final DefinitionKind dk_Fixed = new DefinitionKind(_dk_Fixed);
+
+ /**
+ * Indicates that the current definition defines a value.
+ */
+ public static final DefinitionKind dk_Value = new DefinitionKind(_dk_Value);
+
+ /**
+ * Indicates that the current definition defines a value box.
+ */
+ public static final DefinitionKind dk_ValueBox = new DefinitionKind(_dk_ValueBox);
+
+ /**
+ * Indicates that the current definition defines value member.
+ */
+ public static final DefinitionKind dk_ValueMember =
+ new DefinitionKind(_dk_ValueMember);
+
+ /**
+ * Indicates that the current definition defines a Native.
+ */
+ public static final DefinitionKind dk_Native = new DefinitionKind(_dk_Native);
+
+ /**
+ * Indicates that the current definition defines .
+ */
+ public static final DefinitionKind dk_AbstractInterface =
+ new DefinitionKind(_dk_AbstractInterface);
+
+ /**
+ * The defintion code of the current instance of the definition kind.
+ */
+ private final int kind;
+
+ /**
+ * The table of the definition kinds
+ */
+ private static DefinitionKind[] table;
+
+ /**
+ * Creates a definition kind with the given integer definition kind code.
+ *
+ * @param a_kind a definition kind code, one of the _dk_.. constants,
+ * defined in this class.
+ */
+ protected DefinitionKind(int a_kind)
+ {
+ kind = a_kind;
+ }
+
+ /**
+ * Get the definition code of the current instance of the definition kind.
+ *
+ * @return one of the _dk_... constants, defined in this class.
+ */
+ public int value()
+ {
+ return kind;
+ }
+
+ /**
+ * Get the definition kind, corresponding the given integer code.
+ *
+ * @param a_kind the definition kind code, one of the _dk_... constants,
+ * defined in this class.
+ *
+ * @return the corresponding definition kind, one of the dk_... constants,
+ * defined in this class.
+ *
+ * @throws BAD_PARAM if the given integer does not match any definition
+ * kind.
+ */
+ public static DefinitionKind from_int(int a_kind)
+ {
+ if (table == null)
+ fill_table();
+ try
+ {
+ return table [ a_kind ];
+ }
+ catch (ArrayIndexOutOfBoundsException ex)
+ {
+ throw new BAD_PARAM("No def. kind " + a_kind);
+ }
+ }
+
+ /**
+ * Fill the conversion table on demand.
+ */
+ private static void fill_table()
+ {
+ table = new DefinitionKind[ 25 ];
+ table [ _dk_none ] = dk_none;
+ table [ _dk_all ] = dk_all;
+ table [ _dk_Attribute ] = dk_Attribute;
+ table [ _dk_Constant ] = dk_Constant;
+ table [ _dk_Exception ] = dk_Exception;
+ table [ _dk_Interface ] = dk_Interface;
+ table [ _dk_Module ] = dk_Module;
+ table [ _dk_Operation ] = dk_Operation;
+ table [ _dk_Typedef ] = dk_Typedef;
+ table [ _dk_Alias ] = dk_Alias;
+ table [ _dk_Struct ] = dk_Struct;
+ table [ _dk_Union ] = dk_Union;
+ table [ _dk_Enum ] = dk_Enum;
+ table [ _dk_Primitive ] = dk_Primitive;
+ table [ _dk_String ] = dk_String;
+ table [ _dk_Sequence ] = dk_Sequence;
+ table [ _dk_Array ] = dk_Array;
+ table [ _dk_Repository ] = dk_Repository;
+ table [ _dk_Wstring ] = dk_Wstring;
+ table [ _dk_Fixed ] = dk_Fixed;
+ table [ _dk_Value ] = dk_Value;
+ table [ _dk_ValueBox ] = dk_ValueBox;
+ table [ _dk_ValueMember ] = dk_ValueMember;
+ table [ _dk_Native ] = dk_Native;
+ table [ _dk_AbstractInterface ] = dk_AbstractInterface;
+ }
+} \ No newline at end of file
diff --git a/libjava/classpath/org/omg/CORBA/DefinitionKindHelper.java b/libjava/classpath/org/omg/CORBA/DefinitionKindHelper.java
new file mode 100644
index 00000000000..d9c7cc15a46
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/DefinitionKindHelper.java
@@ -0,0 +1,137 @@
+/* DefinitionKindHelper.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;
+
+import gnu.CORBA.DefinitionKindHolder;
+import gnu.CORBA.Restricted_ORB;
+import gnu.CORBA.gnuAny;
+import gnu.CORBA.primitiveTypeCode;
+
+import org.omg.CORBA.TypeCodePackage.BadKind;
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+
+/**
+ * A helper operations for the definition kind.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public abstract class DefinitionKindHelper
+{
+ /**
+ * The cached typecode value, computed only once.
+ */
+ private static TypeCode typeCode;
+
+ /**
+ * Insert the definition kind into the given Any.
+ */
+ public static void insert(Any a, DefinitionKind that)
+ {
+ a.insert_Streamable(new DefinitionKindHolder(that));
+ }
+
+ /**
+ * Extract the definition kind from the given Any.
+ */
+ public static DefinitionKind extract(Any a)
+ {
+ return ((DefinitionKindHolder) a.extract_Streamable()).value;
+ }
+
+ /**
+ * Get the definition kind typecode (enumeration, named "DefinitionKind").
+ * The member names are listed as defined by java 1.4 specification.
+ * The names, defined in OMG specification only (like dk_Home or
+ * dk_Event) are not listed.
+ */
+ public static TypeCode type()
+ {
+ if (typeCode == null)
+ {
+ String[] members =
+ new String[]
+ {
+ "dk_none", "dk_all", "dk_Attribute", "dk_Constant", "dk_Exception",
+ "dk_Interface", "dk_Module", "dk_Operation", "dk_Typedef",
+ "dk_Alias", "dk_Struct", "dk_Union", "dk_Enum", "dk_Primitive",
+ "dk_String", "dk_Sequence", "dk_Array", "dk_Repository",
+ "dk_Wstring", "dk_Fixed", "dk_Value", "dk_ValueBox",
+ "dk_ValueMember", "dk_Native"
+ };
+
+ typeCode =
+ Restricted_ORB.Singleton.create_enum_tc(id(), "DefinitionKind",
+ members
+ );
+ }
+ return typeCode;
+ }
+
+ /**
+ * Get the definition kind repository id.
+ *
+ * @return "IDL:omg.org/CORBA/DefinitionKind:1.0", always.
+ */
+ public static String id()
+ {
+ return "IDL:omg.org/CORBA/DefinitionKind:1.0";
+ }
+
+ /**
+ * Read the definitin kind (as int) from the CDR intput stream.
+ *
+ * @param istream a stream to read from.
+ */
+ public static DefinitionKind read(InputStream istream)
+ {
+ return DefinitionKind.from_int(istream.read_long());
+ }
+
+ /**
+ * Write the definition kind (as int) to the CDR output stream.
+ *
+ * @param ostream a stream to write into.
+ * @param value a value to write.
+ */
+ public static void write(OutputStream ostream, DefinitionKind value)
+ {
+ ostream.write_long(value.value());
+ }
+} \ No newline at end of file
diff --git a/libjava/classpath/org/omg/CORBA/DomainManager.java b/libjava/classpath/org/omg/CORBA/DomainManager.java
new file mode 100644
index 00000000000..a7a89fd1a1a
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/DomainManager.java
@@ -0,0 +1,57 @@
+/* DomainManager.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;
+
+import java.io.Serializable;
+
+import org.omg.CORBA.portable.IDLEntity;
+
+/**
+ * Establishes and navigates relationships to superior and subordinate domains,
+ * and also creates and access policies.
+ *
+ * The DomainManager has associated with it the policy objects for a
+ * particular domain.
+ *
+ * @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
+ */
+public interface DomainManager
+ extends IDLEntity, Object, Serializable, DomainManagerOperations
+{
+}
diff --git a/libjava/classpath/org/omg/CORBA/DomainManagerOperations.java b/libjava/classpath/org/omg/CORBA/DomainManagerOperations.java
new file mode 100644
index 00000000000..7dc0526a4db
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/DomainManagerOperations.java
@@ -0,0 +1,59 @@
+/* DomainManagerOperations.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;
+
+
+/**
+ * Provides the means to access the policies of the domain, with that
+ * the implementing {@link DomainManage} is associated.
+ *
+ * @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
+ */
+public interface DomainManagerOperations
+{
+ /**
+ * Get the policy of the specified type for the objects, belonging
+ * to this domain. The policy types are domain specific.
+ *
+ * @param policy_type the policy type
+ *
+ * @return the policy
+ */
+ Policy get_domain_policy(int policy_type);
+}
diff --git a/libjava/classpath/org/omg/CORBA/DoubleHolder.java b/libjava/classpath/org/omg/CORBA/DoubleHolder.java
new file mode 100644
index 00000000000..efee74b0faa
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/DoubleHolder.java
@@ -0,0 +1,127 @@
+/* DoubleHolder.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;
+
+import gnu.CORBA.primitiveTypeCode;
+
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+import org.omg.CORBA.portable.Streamable;
+
+/**
+ * A holder for CORBA <code>double</code> that is mapped into
+ * java <code>double</code>.
+ *
+ * The holders have several application areas. The end user usually
+ * sees them implementing CORBA methods where the primitive type
+ * is passed by reference. While CORBA (or, for example, C) supports
+ * this, the java does not and a wrapper class is required.
+ *
+ * @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
+ */
+public final class DoubleHolder
+ implements Streamable
+{
+ /**
+ * The default type code for this holder.
+ */
+ private static final TypeCode t_double =
+ new primitiveTypeCode(TCKind.tk_double);
+
+ /**
+ * The <code>double</code> (CORBA <code>double</code>) value,
+ * held by this DoubleHolder.
+ */
+ public double value;
+
+ /**
+ * Constructs an instance of DoubleHolder,
+ * initializing {@link #value} to <code>0.0</code>.
+ */
+ public DoubleHolder()
+ {
+ }
+
+ /**
+ * Constructs an instance of DoubleHolder,
+ * initializing {@link #value} to the given <code>double</code>.
+ *
+ * @param initial_value a value that will be assigned to the
+ * {@link #value} field.
+ */
+ public DoubleHolder(double initial_value)
+ {
+ value = initial_value;
+ }
+
+ /**
+ * Fill in the {@link value } field by reading the required data
+ * from the given stream. For <code>double</code>, the functionality
+ * is delegated to
+ * {@link org.omg.CORBA.portable.InputStream#read_double}.
+ *
+ * @param input the input stream to read from.
+ */
+ public void _read(InputStream input)
+ {
+ value = input.read_double();
+ }
+
+ /**
+ * Returns the TypeCode, corresponding the CORBA type that is stored
+ * using this holder.
+ */
+ public TypeCode _type()
+ {
+ return t_double;
+ }
+
+ /**
+ * Write the {@link value } field to the given stream.
+ * For <code>double</code>, the functionality
+ * is delegated to
+ * {@link org.omg.CORBA.portable.OutputStream#write_double(double) }.
+ *
+ * @param output the output stream to write into.
+ */
+ public void _write(OutputStream output)
+ {
+ output.write_double(value);
+ }
+}
diff --git a/libjava/classpath/org/omg/CORBA/DoubleSeqHelper.java b/libjava/classpath/org/omg/CORBA/DoubleSeqHelper.java
new file mode 100644
index 00000000000..d8dffbf4cdb
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/DoubleSeqHelper.java
@@ -0,0 +1,142 @@
+/* DoubleSeqHelper.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;
+
+import gnu.CORBA.primitiveArrayTypeCode;
+
+import org.omg.CORBA.TypeCodePackage.BadKind;
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+
+/**
+ * Provides static helper methods for working with
+ * CORBA sequence of <code>double</code>
+ * (<code>DoubleSeq</code>).
+ *
+ * @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
+ */
+public abstract class DoubleSeqHelper
+{
+ /**
+ * Extract the <code>double[]</code> from the
+ * given {@link Any}. This implementation expects the
+ * {@link Any} to hold the instance of {@link DoubleSeqHolder}
+ * that is returned by {@link Any#extract_Streamable() }.
+ *
+ * @param a an Any to extract the array from.
+ *
+ * @return the extracted array.
+ *
+ * @throws ClassCastException if the Any contains something other than the
+ * the {@link DoubleSeqHolder}.
+ */
+ public static double[] extract(Any a)
+ {
+ DoubleSeqHolder h = (DoubleSeqHolder) a.extract_Streamable();
+ return h.value;
+ }
+
+ /**
+ * Returns the agreed Id, delegating functionality to
+ * the {@link #type()}.id().
+ */
+ public static String id()
+ {
+ try
+ {
+ return type().id();
+ }
+ catch (BadKind ex)
+ {
+ // Should never happen under correct work.
+ throw new Error("Please report this bug.", ex);
+ }
+ }
+
+ /**
+ * Insert into the given <code>double[]</code> into the
+ * given {@link Any}. This implementation first creates
+ * a {@link DoubleSeqHolder} and then calls
+ * {@link Any#insert_Streamable(Streamable)}.
+ *
+ * @param into the target Any.
+ * @param that the array to insert.
+ */
+ public static void insert(Any into, double[] that)
+ {
+ DoubleSeqHolder holder = new DoubleSeqHolder(that);
+ into.insert_Streamable(holder);
+ }
+
+ /**
+ * Reads the <code>double[]</code> from the CORBA input stream.
+ *
+ * @param input the CORBA (not java.io) stream to read from.
+ * @return the value from the stream.
+ */
+ public static double[] read(InputStream input)
+ {
+ double[] value = new double[ input.read_long() ];
+ input.read_double_array(value, 0, value.length);
+ return value;
+ }
+
+ /**
+ * Creates and returns a new instance of the TypeCode,
+ * corresponding the CORBA <code>DoubleSeq</code>.
+ * The length of the sequence is left with the initial
+ * value 0.
+ */
+ public static TypeCode type()
+ {
+ return new primitiveArrayTypeCode(TCKind.tk_double);
+ }
+
+ /**
+ * Writes the <code>double[]</code> into the given stream.
+ *
+ * @param output the CORBA (not java.io) output stream to write.
+ * @param value the value that must be written.
+ */
+ public static void write(OutputStream output, double[] value)
+ {
+ output.write_long(value.length);
+ output.write_double_array(value, 0, value.length);
+ }
+}
diff --git a/libjava/classpath/org/omg/CORBA/DoubleSeqHolder.java b/libjava/classpath/org/omg/CORBA/DoubleSeqHolder.java
new file mode 100644
index 00000000000..a6828e1c137
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/DoubleSeqHolder.java
@@ -0,0 +1,126 @@
+/* DoubleSeqHolder.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;
+
+import gnu.CORBA.primitiveArrayTypeCode;
+
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+import org.omg.CORBA.portable.Streamable;
+
+/**
+ * A sequence holder for CORBA <code>DoubleSeq</code> that is mapped into
+ * java <code>double[]</code>.
+ *
+ * @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
+ */
+public final class DoubleSeqHolder
+ implements Streamable
+{
+ /**
+ * The <code>double[]</code> (CORBA <code>DoubleSeq</code>) value,
+ * held by this DoubleSeqHolder.
+ */
+ public double[] value;
+
+ /**
+ * The type code for this holder. Each holder has a different instance.
+ */
+ private final primitiveArrayTypeCode typecode =
+ new primitiveArrayTypeCode(TCKind.tk_double);
+
+ /**
+ * Constructs an instance of DoubleSeqHolder,
+ * initializing {@link #value} to <code>null</code>.
+ */
+ public DoubleSeqHolder()
+ {
+ }
+
+ /**
+ * Constructs an instance of DoubleSeqHolder,
+ * initializing {@link #value} to the given <code>double[]</code>.
+ *
+ * @param initial_value a value that will be assigned to the
+ * {@link #value} field.
+ */
+ public DoubleSeqHolder(double[] initial_value)
+ {
+ value = initial_value;
+ typecode.setLength(value.length);
+ }
+
+ /**
+ * Fill in the {@link value } field by reading the required data
+ * from the given stream. This method first reads the array size
+ * (as CORBA <code>long</code>) and then calls the
+ * {@link org.omg.CORBA.portable.InputStream#read_double_array }.
+ *
+ * @param input the input stream to read from.
+ */
+ public void _read(InputStream input)
+ {
+ value = new double[ input.read_long() ];
+ input.read_double_array(value, 0, value.length);
+ typecode.setLength(value.length);
+ }
+
+ /**
+ * Returns the TypeCode, corresponding the CORBA type that is stored
+ * using this holder.
+ */
+ public TypeCode _type()
+ {
+ return typecode;
+ }
+
+ /**
+ * Write the {@link value } field to the given stream.
+ * This method first writes the array size
+ * (as CORBA <code>long</code>) and then calls the
+ * {@link org.omg.CORBA.portable.OutputStream#write_double_array }.
+ *
+ * @param output the output stream to write into.
+ */
+ public void _write(OutputStream output)
+ {
+ output.write_long(value.length);
+ output.write_double_array(value, 0, value.length);
+ }
+}
diff --git a/libjava/classpath/org/omg/CORBA/DynAny.java b/libjava/classpath/org/omg/CORBA/DynAny.java
new file mode 100644
index 00000000000..42b93341971
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/DynAny.java
@@ -0,0 +1,505 @@
+/* DynAny.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;
+
+import org.omg.CORBA.DynAnyPackage.Invalid;
+import org.omg.CORBA.DynAnyPackage.InvalidValue;
+import org.omg.CORBA.DynAnyPackage.TypeMismatch;
+
+import java.io.Serializable;
+
+/**
+ * The DynAny interface provides possibility to access the components of
+ * the CORBA object, stored inside the {@link Any}. The {@link Any} itself
+ * allows to read, write and pass as parameter the stored value without
+ * knowning its exact data type. The DynAny and derived classes additionally
+ * allows to access the members of the sequence, structure, union and get the
+ * data about enumeration, value type and CORBA <code>fixed</code> without
+ * knowing the exact type at the run time. The returned members are also
+ * wrapped into DynAny objects, allowing them to be the nested structures.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public interface DynAny
+ extends org.omg.CORBA.Object
+{
+ /**
+ * Copy one DynAny into another.
+ *
+ * @param from the DynAny to copy from.
+ * @throws Invalid if the source DynAny is invalid.
+ */
+ void assign(DynAny from)
+ throws Invalid;
+
+ /**
+ * Clones this DynAny.
+ */
+ DynAny copy();
+
+ /**
+ * Returns the focused component of this DynAny. The DynAny has the internal
+ * pointer (reference) that can point to one of its components. The returned
+ * DynAny can be used to get or set the value of the focused component.
+ * If the DynAny holds a primitive type with no components, this
+ * implementation returns <code>this</code>.
+ */
+ DynAny current_component();
+
+ /**
+ * Destroys this DynAny, freeing the used resources. In java, resources
+ * are freed by the garbage collectors, so this method typically returns
+ * without action.
+ */
+ void destroy();
+
+ /**
+ * Makes a DynAny from the {@link Any}. The passed {@link Any} becomes the
+ * enclosed instance of this DynAny, allowing to change/traverse the
+ * {@link Any} fields by the {@link DynAny} methods.
+ */
+ void from_any(Any an_any)
+ throws Invalid;
+
+ /**
+ * Retrieves the {@link Any}, stored inside this DynAny.
+ *
+ * @throws TypeMismatch if the typecode of the accessed Any
+ * is not the same as the typecode of this DynAny.
+ */
+ Any get_any()
+ throws TypeMismatch;
+
+ /**
+ * Extract the boolean value that is expected to be
+ * stored in this DynAny.
+ *
+ * @throws TypeMismatch if this DynAny holds the value of the
+ * different type.
+ */
+ boolean get_boolean()
+ throws TypeMismatch;
+
+ /**
+ * Extract the char value that is expected to be
+ * stored in this DynAny.
+ *
+ * @throws TypeMismatch if this DynAny holds the value of the
+ * different type.
+ */
+ char get_char()
+ throws TypeMismatch;
+
+ /**
+ * Extract the <code>double</code> value that is expected to be
+ * stored in this DynAny.
+ *
+ * @throws TypeMismatch if this DynAny holds the value of the
+ * different type.
+ */
+ double get_double()
+ throws TypeMismatch;
+
+ /**
+ * Extract the <code>float</code> value that is expected to be
+ * stored in this DynAny.
+ *
+ * @throws TypeMismatch if this DynAny holds the value of the
+ * different type.
+ */
+ float get_float()
+ throws TypeMismatch;
+
+ /**
+ * Extract the int (CORBA long) value that is expected to be
+ * stored in this DynAny.
+ *
+ * @throws TypeMismatch if this DynAny holds the value of the
+ * different type.
+ */
+ int get_long()
+ throws TypeMismatch;
+
+ /**
+ * Extract the long (CORBA long long) value that is expected to be
+ * stored in this DynAny.
+ *
+ * @throws TypeMismatch if this DynAny holds the value of the
+ * different type.
+ */
+ long get_longlong()
+ throws TypeMismatch;
+
+ /**
+ * Extract the byte (CORBA octet) value that is expected to be
+ * stored in this DynAny.
+ *
+ * @throws TypeMismatch if this DynAny holds the value of the
+ * different type.
+ */
+ byte get_octet()
+ throws TypeMismatch;
+
+ /**
+ * Extract the CORBA object reference that is expected to be
+ * stored in this DynAny.
+ *
+ * @throws TypeMismatch if this DynAny holds the value of the
+ * different type.
+ */
+ Object get_reference()
+ throws TypeMismatch;
+
+ /**
+ * Extract the <code>short</code> value that is expected to be
+ * stored in this DynAny.
+ *
+ * @throws TypeMismatch if this DynAny holds the value of the
+ * different type.
+ */
+ short get_short()
+ throws TypeMismatch;
+
+ /**
+ * Extract the string value that is expected to be
+ * stored in this DynAny.
+ *
+ * @throws TypeMismatch if this DynAny holds the value of the
+ * different type.
+ */
+ String get_string()
+ throws TypeMismatch;
+
+ /**
+ * Extract the {@link TypeCode} value that is expected to be
+ * stored in this DynAny.
+ *
+ * @throws TypeMismatch if this DynAny holds the value of the
+ * different type.
+ */
+ TypeCode get_typecode()
+ throws TypeMismatch;
+
+ /**
+ * Extract the unsigned int (CORBA ulong) value that is expected to be
+ * stored in this DynAny.
+ *
+ * @throws TypeMismatch if this DynAny holds the value of the
+ * different type.
+ */
+ int get_ulong()
+ throws TypeMismatch;
+
+ /**
+ * Extract the unsingel long (CORBA unsigned long long )value that
+ * is expected to be stored in this DynAny.
+ *
+ * @throws TypeMismatch if this DynAny holds the value of the
+ * different type.
+ */
+ long get_ulonglong()
+ throws TypeMismatch;
+
+ /**
+ * Extract the unsigned short value that is expected to be
+ * stored in this DynAny.
+ *
+ * @throws TypeMismatch if this DynAny holds the value of the
+ * different type.
+ */
+ short get_ushort()
+ throws TypeMismatch;
+
+ /**
+ * Extract the value that is expected to be
+ * stored in this DynAny.
+ *
+ * @throws TypeMismatch if this DynAny holds the value of the
+ * different type.
+ */
+ Serializable get_val()
+ throws TypeMismatch;
+
+ /**
+ * Extract the wide (usually UTF-16) character value that is expected to be
+ * stored in this DynAny.
+ *
+ * @throws TypeMismatch if this DynAny holds the value of the
+ * different type.
+ */
+ char get_wchar()
+ throws TypeMismatch;
+
+ /**
+ * Extract the wide (usually UFT-16) string that is expected to be
+ * stored in this DynAny.
+ *
+ * @throws TypeMismatch if this DynAny holds the value of the
+ * different type.
+ */
+ String get_wstring()
+ throws TypeMismatch;
+
+ /**
+ * Insert the {@link Any} value into the enclosed
+ * {@link Any} inside this DynAny.
+ *
+ * @param a_x the value being inserted.
+ * @throws InvalidValue if the value type does not match the
+ * typecode of the enclosed {@link Any}.
+ */
+ void insert_any(Any an_any)
+ throws InvalidValue;
+
+ /**
+ * Insert the boolean value into the enclosed
+ * {@link Any} inside this DynAny
+ * @param a_x the value being inserted.
+ * @throws InvalidValue if the value type does not match the
+ * typecode of the enclosed {@link Any}.
+ */
+ void insert_boolean(boolean a_x)
+ throws InvalidValue;
+
+ /**
+ * Insert the char value into the enclosed
+ * {@link Any} inside this DynAny
+ * @param a_x the value being inserted.
+ * @throws InvalidValue if the value type does not match the
+ * typecode of the enclosed {@link Any}.
+ */
+ void insert_char(char a_x)
+ throws InvalidValue;
+
+ /**
+ * Insert the double value into the enclosed
+ * {@link Any} inside this DynAny
+ * @param a_x the value being inserted.
+ * @throws InvalidValue if the value type does not match the
+ * typecode of the enclosed {@link Any}.
+ */
+ void insert_double(double a_x)
+ throws InvalidValue;
+
+ /**
+ * Insert the float value into the enclosed
+ * {@link Any} inside this DynAny
+ * @param a_x the value being inserted.
+ * @throws InvalidValue if the value type does not match the
+ * typecode of the enclosed {@link Any}.
+ */
+ void insert_float(float a_x)
+ throws InvalidValue;
+
+ /**
+ * Insert the int (CORBA long) value into the enclosed
+ * {@link Any} inside this DynAny
+ * @param a_x the value being inserted.
+ * @throws InvalidValue if the value type does not match the
+ * typecode of the enclosed {@link Any}.
+ */
+ void insert_long(int a_x)
+ throws InvalidValue;
+
+ /**
+ * Insert the long (CORBA long long) value into the enclosed
+ * {@link Any} inside this DynAny
+ * @param a_x the value being inserted.
+ * @throws InvalidValue if the value type does not match the
+ * typecode of the enclosed {@link Any}.
+ */
+ void insert_longlong(long a_x)
+ throws InvalidValue;
+
+ /**
+ * Insert the byte (CORBA octet) value into the enclosed
+ * {@link Any} inside this DynAny
+ * @param a_x the value being inserted.
+ * @throws InvalidValue if the value type does not match the
+ * typecode of the enclosed {@link Any}.
+ */
+ void insert_octet(byte a_x)
+ throws InvalidValue;
+
+ /**
+ * Insert the object reference into the enclosed
+ * {@link Any} inside this DynAny
+ * @param a_x the value being inserted.
+ * @throws InvalidValue if the value type does not match the
+ * typecode of the enclosed {@link Any}.
+ */
+ void insert_reference(Object a_x)
+ throws InvalidValue;
+
+ /**
+ * Insert the <code>short</code> value into the enclosed
+ * {@link Any} inside this DynAny
+ * @param a_x the value being inserted.
+ * @throws InvalidValue if the value type does not match the
+ * typecode of the enclosed {@link Any}.
+ */
+ void insert_short(short a_x)
+ throws InvalidValue;
+
+ /**
+ * Insert the string value into the enclosed
+ * {@link Any} inside this DynAny
+ * @param a_x the value being inserted.
+ * @throws InvalidValue if the value type does not match the
+ * typecode of the enclosed {@link Any}.
+ */
+ void insert_string(String a_x)
+ throws InvalidValue;
+
+ /**
+ * Insert the {@link TypeCode} value into the enclosed
+ * {@link Any} inside this DynAny
+ * @param a_x the value being inserted.
+ * @throws InvalidValue if the value type does not match the
+ * typecode of the enclosed {@link Any}.
+ */
+ void insert_typecode(TypeCode a_x)
+ throws InvalidValue;
+
+ /**
+ * Insert the int (CORBA unsinged long) value into the enclosed
+ * {@link Any} inside this DynAny
+ * @param a_x the value being inserted.
+ * @throws InvalidValue if the value type does not match the
+ * typecode of the enclosed {@link Any}.
+ */
+ void insert_ulong(int a_x)
+ throws InvalidValue;
+
+ /**
+ * Insert the long (CORBA unsigned long long) value into the enclosed
+ * {@link Any} inside this DynAny
+ * @param a_x the value being inserted.
+ * @throws InvalidValue if the value type does not match the
+ * typecode of the enclosed {@link Any}.
+ */
+ void insert_ulonglong(long a_x)
+ throws InvalidValue;
+
+ /**
+ * Insert the short (CORBA unsigned short) value into the enclosed
+ * {@link Any} inside this DynAny
+ * @param a_x the value being inserted.
+ * @throws InvalidValue if the value type does not match the
+ * typecode of the enclosed {@link Any}.
+ */
+ void insert_ushort(short a_x)
+ throws InvalidValue;
+
+ /**
+ * Insert the value into the enclosed
+ * {@link Any} inside this DynAny
+ * @param a_x the value being inserted.
+ * @throws InvalidValue if the value type does not match the
+ * typecode of the enclosed {@link Any}.
+ */
+ void insert_val(Serializable a_x)
+ throws InvalidValue;
+
+ /**
+ * Insert the wide char (usually UTF-16) value into the enclosed
+ * {@link Any} inside this DynAny
+ * @param a_x the value being inserted.
+ * @throws InvalidValue if the value type does not match the
+ * typecode of the enclosed {@link Any}.
+ */
+ void insert_wchar(char a_x)
+ throws InvalidValue;
+
+ /**
+ * Insert the wide string (usually UTF-16) into the enclosed
+ * {@link Any} inside this DynAny
+ * @param a_x the value being inserted.
+ * @throws InvalidValue if the value type does not match the
+ * typecode of the enclosed {@link Any}.
+ */
+ void insert_wstring(String a_x)
+ throws InvalidValue;
+
+ /**
+ * Advances the internal pointer, described in the {@link current_component},
+ * one position forward.
+ *
+ * @return true if the pointer now points to the new component,
+ * false if there are no more components of this DynAny holds
+ * a basic type that is not divided into components.
+ */
+ boolean next();
+
+ /**
+ * Moves the internal pointer, described in the {@link current_component},
+ * to the first component.
+ */
+ void rewind();
+
+ /**
+ * Moves the internal pointer, described in the {@link current_component},
+ * to the given position.
+ *
+ * @param p the number of the internal component on that the internal
+ * pointer must be focused.
+ *
+ * @return true on success or false if there is no component with the
+ * given number. If the DynAny holds the basic type, this method returs
+ * false p values other than 0.
+ */
+ boolean seek(int p);
+
+ /**
+ * Returns the enclosed {@link Any}.
+ *
+ * @return the enclosed {@link Any}.
+ */
+ Any to_any()
+ throws Invalid;
+
+ /**
+ * Returns the typecode of the object, inserted into this
+ * DynAny.
+ *
+ * @return the typecode of the inserted {@link Any} or null typecode
+ * if no {@link Any has been yet inserted}.
+ */
+ TypeCode type();
+}
diff --git a/libjava/classpath/org/omg/CORBA/DynAnyPackage/Invalid.java b/libjava/classpath/org/omg/CORBA/DynAnyPackage/Invalid.java
new file mode 100644
index 00000000000..68c71863826
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/DynAnyPackage/Invalid.java
@@ -0,0 +1,77 @@
+/* Invalid.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.DynAnyPackage;
+
+import java.io.Serializable;
+
+import org.omg.CORBA.UserException;
+import org.omg.CORBA.portable.IDLEntity;
+
+/**
+ * This exception is thrown by dynamic any operations when a bad DynAny or Any is passed as a parameter.
+ *
+ * @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
+ */
+public class Invalid
+ extends UserException
+ implements Serializable, IDLEntity
+{
+ /**
+ * Use 1.4 version serialVersionUID for interoperability.
+ */
+ private static final long serialVersionUID = -8258194490767575588L;
+
+ /**
+ * Creates Invalid without explaining message.
+ */
+ public Invalid()
+ {
+ super();
+ }
+
+ /**
+ * Created Invalid exception, providing the explaining message.
+ *
+ * @param reason the reason of throwing the exception.
+ */
+ public Invalid(String reason)
+ {
+ super(reason);
+ }
+}
diff --git a/libjava/classpath/org/omg/CORBA/DynAnyPackage/InvalidSeq.java b/libjava/classpath/org/omg/CORBA/DynAnyPackage/InvalidSeq.java
new file mode 100644
index 00000000000..ca13329392c
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/DynAnyPackage/InvalidSeq.java
@@ -0,0 +1,77 @@
+/* InvalidSeq.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.DynAnyPackage;
+
+import java.io.Serializable;
+
+import org.omg.CORBA.UserException;
+import org.omg.CORBA.portable.IDLEntity;
+
+/**
+ * This exception is thrown by by dynamic any operations when a bad <code>sequence</code> is passed as a parameter.
+ *
+ * @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
+ */
+public class InvalidSeq
+ extends UserException
+ implements Serializable, IDLEntity
+{
+ /**
+ * Use 1.4 version serialVersionUID for interoperability.
+ */
+ private static final long serialVersionUID = -5678460771857763522L;
+
+ /**
+ * Creates InvalidSeq without explaining message.
+ */
+ public InvalidSeq()
+ {
+ super();
+ }
+
+ /**
+ * Created InvalidSeq exception, providing the explaining message.
+ *
+ * @param reason the reason of throwing the exception.
+ */
+ public InvalidSeq(String reason)
+ {
+ super(reason);
+ }
+}
diff --git a/libjava/classpath/org/omg/CORBA/DynAnyPackage/InvalidValue.java b/libjava/classpath/org/omg/CORBA/DynAnyPackage/InvalidValue.java
new file mode 100644
index 00000000000..bca6808c803
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/DynAnyPackage/InvalidValue.java
@@ -0,0 +1,77 @@
+/* InvalidValue.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.DynAnyPackage;
+
+import java.io.Serializable;
+
+import org.omg.CORBA.UserException;
+import org.omg.CORBA.portable.IDLEntity;
+
+/**
+ * This expception in response to insert the inapproriate value into dynamic Any, usually by the DynAny.insert_*(value) method group.
+ *
+ * @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
+ */
+public class InvalidValue
+ extends UserException
+ implements Serializable, IDLEntity
+{
+ /**
+ * Use 1.4 version serialVersionUID for interoperability.
+ */
+ private static final long serialVersionUID = -4741963043279146697L;
+
+ /**
+ * Creates InvalidValue without explaining message.
+ */
+ public InvalidValue()
+ {
+ super();
+ }
+
+ /**
+ * Created InvalidValue exception, providing the explaining message.
+ *
+ * @param reason the reason of throwing the exception.
+ */
+ public InvalidValue(String reason)
+ {
+ super(reason);
+ }
+}
diff --git a/libjava/classpath/org/omg/CORBA/DynAnyPackage/TypeMismatch.java b/libjava/classpath/org/omg/CORBA/DynAnyPackage/TypeMismatch.java
new file mode 100644
index 00000000000..0de38edebb5
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/DynAnyPackage/TypeMismatch.java
@@ -0,0 +1,77 @@
+/* TypeMismatch.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.DynAnyPackage;
+
+import java.io.Serializable;
+
+import org.omg.CORBA.UserException;
+import org.omg.CORBA.portable.IDLEntity;
+
+/**
+ * This exception is thrown by dynamic any accessor methods when type of the actual contents do not match what is trying to be accessed.
+ *
+ * @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
+ */
+public class TypeMismatch
+ extends UserException
+ implements Serializable, IDLEntity
+{
+ /**
+ * Use 1.4 version serialVersionUID for interoperability.
+ */
+ private static final long serialVersionUID = 2763424591181102501L;
+
+ /**
+ * Creates TypeMismatch without explaining message.
+ */
+ public TypeMismatch()
+ {
+ super();
+ }
+
+ /**
+ * Created TypeMismatch exception, providing the explaining message.
+ *
+ * @param reason the reason of throwing the exception.
+ */
+ public TypeMismatch(String reason)
+ {
+ super(reason);
+ }
+}
diff --git a/libjava/classpath/org/omg/CORBA/DynAnyPackage/package.html b/libjava/classpath/org/omg/CORBA/DynAnyPackage/package.html
new file mode 100644
index 00000000000..f8c476e6f03
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/DynAnyPackage/package.html
@@ -0,0 +1,46 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
+<!-- package.html - describes classes in javax.sql 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.TypeCodePackage</title></head>
+
+<body>
+<p>Provides a couple of exceptions, thrown by methods in the <code>TypeCode</code> class.</p>
+
+</body>
+</html>
diff --git a/libjava/classpath/org/omg/CORBA/DynArray.java b/libjava/classpath/org/omg/CORBA/DynArray.java
new file mode 100644
index 00000000000..4e831adb381
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/DynArray.java
@@ -0,0 +1,65 @@
+/* DynArray.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;
+
+import org.omg.CORBA.DynAnyPackage.InvalidSeq;
+
+
+/**
+ * Represents the {@link DynAny}, holding an array.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public interface DynArray
+ extends DynAny
+{
+ /**
+ * Get the elements of the enclosed array.
+ */
+ Any[] get_elements();
+
+ /**
+ * Set the elements from of the enclosed array of Anys.
+ *
+ * @throws InvalidSeq if the passed array contains the
+ * elements of the different type of if the array size mismatch.
+ */
+ void set_elements(Any[] an_array)
+ throws InvalidSeq;
+}
diff --git a/libjava/classpath/org/omg/CORBA/DynEnum.java b/libjava/classpath/org/omg/CORBA/DynEnum.java
new file mode 100644
index 00000000000..e17534d81e4
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/DynEnum.java
@@ -0,0 +1,84 @@
+/* DynEnum.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;
+
+
+/**
+ * Represents the dynamic enumeration, allowing to get/set the value by
+ * name or by position in the enumeration list. The CORBA enumeration
+ * can obtain one of the named values from the specified enumeration list.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public interface DynEnum
+ extends DynAny
+{
+ /**
+ * Get the value of this object.
+ * @return the currently set value, one of the allowed values
+ * for this enumeration.
+ */
+ String value_as_string();
+
+ /**
+ * Set the value of this object.
+ *
+ * @param member the value to set, must be one of the allowed values for
+ * this enumeration. Otherwise the {@link SystemException} may be thrown.
+ */
+ void value_as_string(String member);
+
+ /**
+ * Set the value of this object as the position inside the list of this
+ * enumeration.
+ *
+ * @param member the position of the enumeration value inside
+ * the enumeration list. Otherwise the {@link SystemException} may be thrown.
+ */
+ void value_as_ulong(int member);
+
+ /**
+ * Get the value of this object as the position inside the list of this
+ * enumeration.
+ *
+ * @return member the position of the currently set enumeration value inside
+ * the enumeration list.
+ */
+ int value_as_ulong();
+}
diff --git a/libjava/classpath/org/omg/CORBA/DynFixed.java b/libjava/classpath/org/omg/CORBA/DynFixed.java
new file mode 100644
index 00000000000..e7daa9ab5d0
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/DynFixed.java
@@ -0,0 +1,77 @@
+/* DynFixed.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;
+
+import org.omg.CORBA.DynAnyPackage.InvalidValue;
+
+/**
+ * Represents a CORBA <code>fixed</code>, allowing to get and set its value
+ * in the form of the binary representation.
+ *
+ * The format, described in CORBA specification, requires to store
+ * data in hexadecimal format, two digits per byte (oceted), most
+ * significant digit first. The last half-byte in the representation
+ * stores the sign, being 0xD for negative numbers and 0xC for
+ * zero and positive numbers. To have the even number of half bytes,
+ * 0x0 is appended to the beginning, if required. The position of the
+ * decimal point is not stored.
+ *
+ * @see gnu.CORBA.BigDecimalHelper
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public interface DynFixed
+ extends DynAny
+{
+ /**
+ * Get the value of this DynFixed in the binary form.
+ *
+ * @return the binary representation, defined in the header comment.
+ */
+ byte[] get_value();
+
+ /**
+ * Sets the value of this DynFixed from the binary representation.
+ *
+ * @param a_value the byte array, representing a CORBA <code>fixed</code>,
+ * as defined in the header comment.
+ */
+ void set_value(byte[] a_value)
+ throws InvalidValue;
+}
diff --git a/libjava/classpath/org/omg/CORBA/DynSequence.java b/libjava/classpath/org/omg/CORBA/DynSequence.java
new file mode 100644
index 00000000000..be7556705bb
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/DynSequence.java
@@ -0,0 +1,78 @@
+/* DynSequence.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;
+
+import org.omg.CORBA.DynAnyPackage.InvalidSeq;
+
+/**
+ * Represents the {@link DynAny}, holding the CORBA sequence
+ * (an array with the flexible length).
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public interface DynSequence
+ extends DynAny
+{
+ /**
+ * Get the elements of the enclosed sequence.
+ */
+ Any[] get_elements();
+
+ /**
+ * Returns the number of elements, stored in the sequence.
+ * @return
+ */
+ int length();
+
+ /**
+ * Sets the length of this sequence to the given value.
+ *
+ * @param l the new length of the sequence.
+ */
+ void length(int l);
+
+ /**
+ * Set the elements from of the enclosed array of Anys.
+ *
+ * @throws InvalidSeq if the passed array contains the
+ * elements of the different type.
+ */
+ void set_elements(Any[] an_array)
+ throws InvalidSeq;
+}
diff --git a/libjava/classpath/org/omg/CORBA/DynStruct.java b/libjava/classpath/org/omg/CORBA/DynStruct.java
new file mode 100644
index 00000000000..d1194428d93
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/DynStruct.java
@@ -0,0 +1,89 @@
+/* DynStruct.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;
+
+import org.omg.CORBA.DynAnyPackage.InvalidSeq;
+
+/**
+ * Represents the {@link DynAny}, holding the CORBA structure (record
+ * with the named fields). The internal reference, described in
+ * {@link DynAny#current_component()}, iterates over the fields of the
+ * structure.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public interface DynStruct
+ extends DynAny
+{
+/**
+ * Get the kind of the structure field that would be returned by
+ * {@link DynAny#current_component()}.
+ *
+ * @return the kind of the structure field.
+ */
+ TCKind current_member_kind();
+
+ /**
+ * Get the name of the structure field that would be returned by
+ * {@link DynAny#current_component()}.
+ *
+ * @return the name of the structure field.
+ */
+ String current_member_name();
+
+ /**
+ * Get all fields of the structure in the array of the named values,
+ * holding name, repository id and value of the associated field.
+ *
+ * @return members the array of the named values,
+ * representing the structure fields.
+ */
+ NameValuePair[] get_members();
+
+ /**
+ * Set all fields of this structure by name.
+ *
+ * @param members the array of the named values,
+ * representing the structure fields.
+ *
+ * @throws InvalidSeq if the passed argument is invalid.
+ */
+ void set_members(NameValuePair[] members)
+ throws InvalidSeq;
+}
diff --git a/libjava/classpath/org/omg/CORBA/DynUnion.java b/libjava/classpath/org/omg/CORBA/DynUnion.java
new file mode 100644
index 00000000000..115ac17dc2d
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/DynUnion.java
@@ -0,0 +1,99 @@
+/* DynUnion.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;
+
+
+/**
+ * Represents the {@link DynAny}, holding the CORBA structure (variant record
+ * with the named fields). The internal reference, described in
+ * {@link DynAny#current_component()}, iterates over the fields of the
+ * member, stored in the union. The union always holds only one member;
+ * which one, depends from the value of the discriminator.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public interface DynUnion
+ extends DynAny
+{
+ /**
+ * Returns the discriminator, defining, which set of fields is stored.
+ * @return the discriminator.
+ */
+ DynAny discriminator();
+
+ /**
+ * Returns the discriminator kind.
+ */
+ TCKind discriminator_kind();
+
+ /**
+ * Returns the member, stored in this union.
+ */
+ DynAny member();
+
+ /**
+ * Returns the kind of the member, stored in this union.
+ */
+ TCKind member_kind();
+
+ /**
+ * Returns the name of the currently focused member.
+ */
+ String member_name();
+
+ /**
+ * Renames the currently focused member.
+ *
+ * @param new_name the new name of the currently focused member.
+ */
+ void member_name(String new_name);
+
+ /**
+ * Checks if the discriminator of this union has been assigned a valid
+ * default value.
+ */
+ boolean set_as_default();
+
+ /**
+ * Determines if the discriminator of this union gets assigned a valid
+ * default value.
+ * @param assign_default
+ */
+ void set_as_default(boolean assign_default);
+}
diff --git a/libjava/classpath/org/omg/CORBA/DynValue.java b/libjava/classpath/org/omg/CORBA/DynValue.java
new file mode 100644
index 00000000000..24d28124651
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/DynValue.java
@@ -0,0 +1,88 @@
+/* DynValue.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;
+
+import org.omg.CORBA.DynAnyPackage.InvalidSeq;
+
+/**
+ * Represents the {@link DynAny}, holding a value type.
+ *
+ * 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 always local and passed by
+ * value, not by IOR reference.
+ *
+ * The value types can have both public and private members. They support
+ * inheritance. Value types can also be abstract.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public interface DynValue
+ extends DynAny, org.omg.CORBA.Object
+{
+ /**
+ * Get the kind of the member, pointed by the internal pointer.
+ *
+ * @return the kind of the member.
+ */
+ TCKind current_member_kind();
+
+ /**
+ * Get the name of the member, pointed by the internal pointer.
+ *
+ * @return the name of the member.
+ */
+ String current_member_name();
+
+ /**
+ * Get all members of the enclosed value type object.
+ * @return
+ */
+ NameValuePair[] get_members();
+
+ /**
+ * Set all members for the enclosed value type object.
+ *
+ * @param value an array of members to set.
+ *
+ * @throws InvalidSeq if the passed sequence is not valid.
+ */
+ void set_members(NameValuePair[] value)
+ throws InvalidSeq;
+} \ No newline at end of file
diff --git a/libjava/classpath/org/omg/CORBA/DynamicImplementation.java b/libjava/classpath/org/omg/CORBA/DynamicImplementation.java
new file mode 100644
index 00000000000..3bcf93d422b
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/DynamicImplementation.java
@@ -0,0 +1,81 @@
+/* DynamicImplementation.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;
+
+import org.omg.CORBA.portable.ObjectImpl;
+
+/**
+ * This class was probably originally thinked as a base of all CORBA
+ * object implementations. However the code, generated by IDL to
+ * java compilers almost never use it, preferring to derive the
+ * object implementation bases directly from the {@link ObjectImpl}.
+ * The class has become deprecated since the 1.4 release.
+ *
+ * @deprecated since 1.4.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public abstract class DynamicImplementation
+ extends ObjectImpl
+{
+ /**
+ * Invoke the method of the CORBA object.
+ *
+ * @deprecated since 1.4.
+ *
+ * @param request the container for both passing and returing the
+ * parameters, also contains the method name and thrown exceptions.
+ */
+ public abstract void invoke(ServerRequest request);
+
+ /**
+ * Returns the array of the repository ids, supported by this object.
+ * In this implementation, the method must be overrridden to return
+ * a sendible object-specific information. The default method returns
+ * an empty array.
+ *
+ * @deprecated since 1.4.
+ *
+ * @return the empty array, always.
+ */
+ public String[] _ids()
+ {
+ return new String[ 0 ];
+ }
+}
diff --git a/libjava/classpath/org/omg/CORBA/Environment.java b/libjava/classpath/org/omg/CORBA/Environment.java
new file mode 100644
index 00000000000..fab77c7eca7
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/Environment.java
@@ -0,0 +1,70 @@
+/* Environment.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;
+
+
+/**
+ * A container for an exception, that has been thrown by the method
+ * of the CORBA object.
+ *
+ * @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
+ */
+public abstract class Environment
+{
+ /**
+ * Removes the exception object from this container.
+ */
+ public abstract void clear();
+
+ /**
+ * Returns an exception, enclosed in this container.
+ *
+ * @return the enclosed exception or null if no any
+ * exception has been thrown or {@link #clear()}
+ * has been previously called.
+ */
+ public abstract Exception exception();
+
+ /**
+ * Inserts the given exception into this container.
+ *
+ * @param except the exception to insert.
+ */
+ public abstract void exception(Exception except);
+}
diff --git a/libjava/classpath/org/omg/CORBA/ExceptionList.java b/libjava/classpath/org/omg/CORBA/ExceptionList.java
new file mode 100644
index 00000000000..0a834344d71
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/ExceptionList.java
@@ -0,0 +1,73 @@
+/* ExceptionList.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;
+
+/**
+ * Stores exceptions that can be thrown when invoking a method of an
+ * CORBA {@link org.omg.CORBA.Object}.
+ * @author Audrius Meskauskas (AudriusA@Bioinformatics.org).
+ */
+public abstract class ExceptionList
+{
+ /**
+ * Add the typecode of the given exception to the list.
+ */
+ public abstract void add(TypeCode an_exception);
+
+ /**
+ * Get the number of the stored exceptions.
+ */
+ public abstract int count();
+
+ /**
+ * Get the item at the given position.
+ * @param at the index
+ * @throws Bounds if the index is out of range.
+ */
+ public abstract TypeCode item(int at)
+ throws Bounds;
+
+ /**
+ * Remove the item at the given position.
+ * @param at the index
+ * @throws Bounds if the index is out of range.
+ */
+ public abstract void remove(int at)
+ throws Bounds;
+}
diff --git a/libjava/classpath/org/omg/CORBA/FREE_MEM.java b/libjava/classpath/org/omg/CORBA/FREE_MEM.java
new file mode 100644
index 00000000000..5de665cb8a0
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/FREE_MEM.java
@@ -0,0 +1,96 @@
+/* FREE_MEM.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;
+
+import java.io.Serializable;
+
+/**
+ * Means errors, related to freing the allocated memory.
+ *
+ * @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
+ */
+public class FREE_MEM
+ extends SystemException
+ implements Serializable
+{
+ /**
+ * Use serialVersionUID for interoperability.
+ */
+ private static final long serialVersionUID = -1333559476995791982L;
+
+ /**
+ * Creates a FREE_MEM with the default minor code of 0,
+ * completion state COMPLETED_NO and the given explaining message.
+ * @param reasom the explaining message.
+ */
+ public FREE_MEM(String message)
+ {
+ super(message, 0, CompletionStatus.COMPLETED_NO);
+ }
+
+ /**
+ * Creates FREE_MEM with the default minor code of 0 and a
+ * completion state COMPLETED_NO.
+ */
+ public FREE_MEM()
+ {
+ super("", 0, CompletionStatus.COMPLETED_NO);
+ }
+
+ /** Creates a FREE_MEM exception with the specified minor
+ * code and completion status.
+ * @param minor additional error code.
+ * @param completed the method completion status.
+ */
+ public FREE_MEM(int minor, CompletionStatus completed)
+ {
+ super("", minor, completed);
+ }
+
+ /**
+ * Created FREE_MEM exception, providing full information.
+ * @param reason explaining message.
+ * @param minor additional error code (the "minor").
+ * @param completed the method completion status.
+ */
+ public FREE_MEM(String reason, int minor, CompletionStatus completed)
+ {
+ super(reason, minor, completed);
+ }
+}
diff --git a/libjava/classpath/org/omg/CORBA/FieldNameHelper.java b/libjava/classpath/org/omg/CORBA/FieldNameHelper.java
new file mode 100644
index 00000000000..a35df4f3565
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/FieldNameHelper.java
@@ -0,0 +1,116 @@
+/* FieldNameHelper.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;
+
+import gnu.CORBA.Restricted_ORB;
+
+import org.omg.CORBA.Any;
+import org.omg.CORBA.ORB;
+import org.omg.CORBA.TypeCode;
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+
+/**
+ * A formal helper for the CORBA FieldName that is identical to the
+ * narrow string.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public abstract class FieldNameHelper
+{
+ /**
+ * Insert the FieldName into Any (uses {@link Any.insert_string}).
+ *
+ * @param a the Any to insert into.
+ * @param that the string to insert.
+ */
+ public static void insert(Any a, String that)
+ {
+ a.insert_string(that);
+ }
+
+ /**
+ * Extract the FieldName from Any ((uses {@link Any.extract_string}).
+ *
+ * @param a the Any to extract from.
+ */
+ public static String extract(Any a)
+ {
+ return a.extract_string();
+ }
+
+ /**
+ * Return an string alias typecode, named "FieldName".
+ */
+ public static TypeCode type()
+ {
+ ORB orb = Restricted_ORB.Singleton;
+ return orb.create_alias_tc(id(), "FieldName", orb.create_string_tc(0));
+ }
+
+ /**
+ * Return the FieldName repository id.
+ * @return "IDL:omg.org/CORBA/FieldName:1.0", always.
+ */
+ public static String id()
+ {
+ return "IDL:omg.org/CORBA/FieldName:1.0";
+ }
+
+ /**
+ * Calls {@link InputStream#read_string()}.
+ *
+ * @param istream the stream to read from.
+ */
+ public static String read(InputStream istream)
+ {
+ return istream.read_string();
+ }
+
+ /**
+ * Calls {@link OutputStream#write_string()}.
+ *
+ * @param ostream the stream to write into.
+ * @param value the string (FieldName) value to write.
+ */
+ public static void write(OutputStream ostream, String value)
+ {
+ ostream.write_string(value);
+ }
+} \ No newline at end of file
diff --git a/libjava/classpath/org/omg/CORBA/FixedHolder.java b/libjava/classpath/org/omg/CORBA/FixedHolder.java
new file mode 100644
index 00000000000..c3918a08d0d
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/FixedHolder.java
@@ -0,0 +1,126 @@
+/* FixedHolder.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;
+
+import gnu.CORBA.fixedTypeCode;
+import gnu.CORBA.primitiveTypeCode;
+
+import java.math.BigDecimal;
+
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+import org.omg.CORBA.portable.Streamable;
+
+/**
+ * A holder for CORBA <code>fixed</code> that is mapped into
+ * java <code>BigDecimal</code>.
+ *
+ * The holders have several application areas. The end user usually
+ * sees them implementing CORBA methods where the primitive type
+ * is passed by reference. While CORBA (or, for example, C) supports
+ * this, the java does not and a wrapper class is required.
+ *
+ * @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
+ */
+public final class FixedHolder
+ implements Streamable
+{
+ /**
+ * The <code>BigDecimal</code> (CORBA <code>fixed</code>) value,
+ * held by this FixedHolder.
+ */
+ public BigDecimal value;
+
+ /**
+ * Constructs an instance of FixedHolder,
+ * initializing {@link #value} to <code>null</code>.
+ */
+ public FixedHolder()
+ {
+ }
+
+ /**
+ * Constructs an instance of FixedHolder,
+ * initializing {@link #value} to the given <code>BigDecimal</code>.
+ *
+ * @param initial_value a value that will be assigned to the
+ * {@link #value} field.
+ */
+ public FixedHolder(BigDecimal initial_value)
+ {
+ value = initial_value;
+ }
+
+ /**
+ * Fill in the {@link value } field by reading the required data
+ * from the given stream. For <code>fixed</code>, the functionality
+ * is delegated to
+ * {@link org.omg.CORBA.portable.InputStream#read_fixed}.
+ *
+ * @param input the input stream to read from.
+ */
+ public void _read(InputStream input)
+ {
+ value = input.read_fixed();
+ }
+
+ /**
+ * Returns the TypeCode, corresponding the CORBA type that is stored
+ * using this holder. The scale and digits are set corresponding
+ * the scale and used digits of the value that is currently stored
+ * or left with default value 0 if the value is not set.
+ */
+ public TypeCode _type()
+ {
+ return new fixedTypeCode(value);
+ }
+
+ /**
+ * Write the {@link value } field to the given stream.
+ * For <code>fixed</code>, the functionality
+ * is delegated to
+ * {@link org.omg.CORBA.portable.OutputStream#write_fixed(BigDecimal) }.
+ *
+ * @param output the output stream to write into.
+ */
+ public void _write(OutputStream output)
+ {
+ output.write_fixed(value);
+ }
+}
diff --git a/libjava/classpath/org/omg/CORBA/FloatHolder.java b/libjava/classpath/org/omg/CORBA/FloatHolder.java
new file mode 100644
index 00000000000..059953faf83
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/FloatHolder.java
@@ -0,0 +1,127 @@
+/* FloatHolder.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;
+
+import gnu.CORBA.primitiveTypeCode;
+
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+import org.omg.CORBA.portable.Streamable;
+
+/**
+ * A holder for CORBA <code>float</code> that is mapped into
+ * java <code>float</code>.
+ *
+ * The holders have several application areas. The end user usually
+ * sees them implementing CORBA methods where the primitive type
+ * is passed by reference. While CORBA (or, for example, C) supports
+ * this, the java does not and a wrapper class is required.
+ *
+ * @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
+ */
+public final class FloatHolder
+ implements Streamable
+{
+ /**
+ * The default type code for this holder.
+ */
+ private static final TypeCode t_float =
+ new primitiveTypeCode(TCKind.tk_float);
+
+ /**
+ * The <code>float</code> (CORBA <code>float</code>) value,
+ * held by this FloatHolder.
+ */
+ public float value;
+
+ /**
+ * Constructs an instance of FloatHolder,
+ * initializing {@link #value} to <code>0.0</code>.
+ */
+ public FloatHolder()
+ {
+ }
+
+ /**
+ * Constructs an instance of FloatHolder,
+ * initializing {@link #value} to the given <code>float</code>.
+ *
+ * @param initial_value a value that will be assigned to the
+ * {@link #value} field.
+ */
+ public FloatHolder(float initial_value)
+ {
+ value = initial_value;
+ }
+
+ /**
+ * Fill in the {@link value } field by reading the required data
+ * from the given stream. For <code>float</code>, the functionality
+ * is delegated to
+ * {@link org.omg.CORBA.portable.InputStream#read_float}.
+ *
+ * @param input the input stream to read from.
+ */
+ public void _read(InputStream input)
+ {
+ value = input.read_float();
+ }
+
+ /**
+ * Returns the TypeCode, corresponding the CORBA type that is stored
+ * using this holder.
+ */
+ public TypeCode _type()
+ {
+ return t_float;
+ }
+
+ /**
+ * Write the {@link value } field to the given stream.
+ * For <code>float</code>, the functionality
+ * is delegated to
+ * {@link org.omg.CORBA.portable.OutputStream#write_float(float) }.
+ *
+ * @param output the output stream to write into.
+ */
+ public void _write(OutputStream output)
+ {
+ output.write_float(value);
+ }
+}
diff --git a/libjava/classpath/org/omg/CORBA/FloatSeqHelper.java b/libjava/classpath/org/omg/CORBA/FloatSeqHelper.java
new file mode 100644
index 00000000000..9f7630c3f95
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/FloatSeqHelper.java
@@ -0,0 +1,142 @@
+/* FloatSeqHelper.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;
+
+import gnu.CORBA.primitiveArrayTypeCode;
+
+import org.omg.CORBA.TypeCodePackage.BadKind;
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+
+/**
+ * Provides static helper methods for working with
+ * CORBA sequence of <code>float</code>
+ * (<code>FloatSeq</code>).
+ *
+ * @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
+ */
+public abstract class FloatSeqHelper
+{
+ /**
+ * Extract the <code>float[]</code> from the
+ * given {@link Any}. This implementation expects the
+ * {@link Any} to hold the instance of {@link FloatSeqHolder}
+ * that is returned by {@link Any#extract_Streamable() }.
+ *
+ * @param a an Any to extract the array from.
+ *
+ * @return the extracted array.
+ *
+ * @throws ClassCastException if the Any contains something other than the
+ * the {@link FloatSeqHolder}.
+ */
+ public static float[] extract(Any a)
+ {
+ FloatSeqHolder h = (FloatSeqHolder) a.extract_Streamable();
+ return h.value;
+ }
+
+ /**
+ * Returns the agreed Id, delegating functionality to
+ * the {@link #type()}.id().
+ */
+ public static String id()
+ {
+ try
+ {
+ return type().id();
+ }
+ catch (BadKind ex)
+ {
+ // Should never happen under correct work.
+ throw new Error("Please report this bug.", ex);
+ }
+ }
+
+ /**
+ * Insert into the given <code>float[]</code> into the
+ * given {@link Any}. This implementation first creates
+ * a {@link FloatSeqHolder} and then calls
+ * {@link Any#insert_Streamable(Streamable)}.
+ *
+ * @param into the target Any.
+ * @param that the array to insert.
+ */
+ public static void insert(Any into, float[] that)
+ {
+ FloatSeqHolder holder = new FloatSeqHolder(that);
+ into.insert_Streamable(holder);
+ }
+
+ /**
+ * Reads the <code>float[]</code> from the CORBA input stream.
+ *
+ * @param input the CORBA (not java.io) stream to read from.
+ * @return the value from the stream.
+ */
+ public static float[] read(InputStream input)
+ {
+ float[] value = new float[ input.read_long() ];
+ input.read_float_array(value, 0, value.length);
+ return value;
+ }
+
+ /**
+ * Creates and returns a new instance of the TypeCode,
+ * corresponding the CORBA <code>FloatSeq</code>.
+ * The length of the sequence is left with the initial
+ * value 0.
+ */
+ public static TypeCode type()
+ {
+ return new primitiveArrayTypeCode(TCKind.tk_float);
+ }
+
+ /**
+ * Writes the <code>float[]</code> into the given stream.
+ *
+ * @param output the CORBA (not java.io) output stream to write.
+ * @param value the value that must be written.
+ */
+ public static void write(OutputStream output, float[] value)
+ {
+ output.write_long(value.length);
+ output.write_float_array(value, 0, value.length);
+ }
+}
diff --git a/libjava/classpath/org/omg/CORBA/FloatSeqHolder.java b/libjava/classpath/org/omg/CORBA/FloatSeqHolder.java
new file mode 100644
index 00000000000..24c7603336c
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/FloatSeqHolder.java
@@ -0,0 +1,126 @@
+/* FloatSeqHolder.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;
+
+import gnu.CORBA.primitiveArrayTypeCode;
+
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+import org.omg.CORBA.portable.Streamable;
+
+/**
+ * A sequence holder for CORBA <code>FloatSeq</code> that is mapped into
+ * java <code>float[]</code>.
+ *
+ * @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
+ */
+public final class FloatSeqHolder
+ implements Streamable
+{
+ /**
+ * The <code>float[]</code> (CORBA <code>FloatSeq</code>) value,
+ * held by this FloatSeqHolder.
+ */
+ public float[] value;
+
+ /**
+ * The type code for this holder. Each holder has a different instance.
+ */
+ private final primitiveArrayTypeCode typecode =
+ new primitiveArrayTypeCode(TCKind.tk_float);
+
+ /**
+ * Constructs an instance of FloatSeqHolder,
+ * initializing {@link #value} to <code>null</code>.
+ */
+ public FloatSeqHolder()
+ {
+ }
+
+ /**
+ * Constructs an instance of FloatSeqHolder,
+ * initializing {@link #value} to the given <code>float[]</code>.
+ *
+ * @param initial_value a value that will be assigned to the
+ * {@link #value} field.
+ */
+ public FloatSeqHolder(float[] initial_value)
+ {
+ value = initial_value;
+ typecode.setLength(value.length);
+ }
+
+ /**
+ * Fill in the {@link value } field by reading the required data
+ * from the given stream. This method first reads the array size
+ * (as CORBA <code>long</code>) and then calls the
+ * {@link org.omg.CORBA.portable.InputStream#read_float_array }.
+ *
+ * @param input the input stream to read from.
+ */
+ public void _read(InputStream input)
+ {
+ value = new float[ input.read_long() ];
+ input.read_float_array(value, 0, value.length);
+ typecode.setLength(value.length);
+ }
+
+ /**
+ * Returns the TypeCode, corresponding the CORBA type that is stored
+ * using this holder.
+ */
+ public TypeCode _type()
+ {
+ return typecode;
+ }
+
+ /**
+ * Write the {@link value } field to the given stream.
+ * This method first writes the array size
+ * (as CORBA <code>long</code>) and then calls the
+ * {@link org.omg.CORBA.portable.OutputStream#write_float_array }.
+ *
+ * @param output the output stream to write into.
+ */
+ public void _write(OutputStream output)
+ {
+ output.write_long(value.length);
+ output.write_float_array(value, 0, value.length);
+ }
+}
diff --git a/libjava/classpath/org/omg/CORBA/IDLEntity.java b/libjava/classpath/org/omg/CORBA/IDLEntity.java
new file mode 100644
index 00000000000..6515d83305b
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/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;
+
+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/IDLType.java b/libjava/classpath/org/omg/CORBA/IDLType.java
new file mode 100644
index 00000000000..74c10549f6c
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/IDLType.java
@@ -0,0 +1,55 @@
+/* IDLType.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;
+
+import org.omg.CORBA.portable.IDLEntity;
+
+import java.io.Serializable;
+
+/**
+ * An abstract interface
+ * that represent OMG IDL types.
+ *
+ * @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
+ */
+public interface IDLType
+ extends IDLTypeOperations, IRObject, IDLEntity, org.omg.CORBA.Object,
+ Serializable
+{
+}
diff --git a/libjava/classpath/org/omg/CORBA/IDLTypeHelper.java b/libjava/classpath/org/omg/CORBA/IDLTypeHelper.java
new file mode 100644
index 00000000000..d9ca36496f5
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/IDLTypeHelper.java
@@ -0,0 +1,139 @@
+/* IDLTypeHelper.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;
+
+import gnu.CORBA.Restricted_ORB;
+
+import org.omg.CORBA.portable.Delegate;
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.ObjectImpl;
+import org.omg.CORBA.portable.OutputStream;
+
+/**
+ * A helper operations for the IDL type.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public abstract class IDLTypeHelper
+{
+ /**
+ * The cached typecode value, computed once.
+ */
+ private static TypeCode typeCode;
+
+ /**
+ * Insert the IDL type into the given Any.
+ */
+ public static void insert(Any a, IDLType that)
+ {
+ OutputStream out = a.create_output_stream();
+ a.type(type());
+ write(out, that);
+ a.read_value(out.create_input_stream(), type());
+ }
+
+ /**
+ * Extract the IDL type from the given Any.
+ */
+ public static IDLType extract(Any a)
+ {
+ return read(a.create_input_stream());
+ }
+
+ /**
+ * Get the typecode of the IDL type (the interface typecode, name "IDLType").
+ */
+ public static TypeCode type()
+ {
+ if (typeCode == null)
+ {
+ typeCode =
+ Restricted_ORB.Singleton.create_interface_tc(IDLTypeHelper.id(),
+ "IDLType"
+ );
+ }
+ return typeCode;
+ }
+
+ /**
+ * Return the IDLType repository id.
+ *
+ * @return "IDL:omg.org/CORBA/IDLType:1.0", always.
+ */
+ public static String id()
+ {
+ return "IDL:omg.org/CORBA/IDLType:1.0";
+ }
+
+ /**
+ * Read the IDL type from the given input stream.
+ * The method reads an object and narrows into IDL type using this
+ * helper.
+ */
+ public static IDLType read(InputStream istream)
+ {
+ return narrow(istream.read_Object());
+ }
+
+ /**
+ * Write the IDL type to the output stream (as CORBA object).
+ */
+ public static void write(OutputStream ostream, IDLType value)
+ {
+ ostream.write_Object((org.omg.CORBA.Object) value);
+ }
+
+ /**
+ * Narrows the CORBA object into the IDL type.
+ */
+ public static IDLType narrow(org.omg.CORBA.Object obj)
+ {
+ if (obj == null)
+ return null;
+ else if (obj instanceof IDLType)
+ return (IDLType) obj;
+ else if (!obj._is_a(id()))
+ throw new org.omg.CORBA.BAD_PARAM();
+ else
+ {
+ Delegate delegate = ((ObjectImpl) obj)._get_delegate();
+ return new _IDLTypeStub(delegate);
+ }
+ }
+} \ No newline at end of file
diff --git a/libjava/classpath/org/omg/CORBA/IDLTypeOperations.java b/libjava/classpath/org/omg/CORBA/IDLTypeOperations.java
new file mode 100644
index 00000000000..1389167ed0d
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/IDLTypeOperations.java
@@ -0,0 +1,56 @@
+/* IDLTypeOperations.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. */
+
+
+/**
+ * Defines operations, applicable for the IDL type.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+package org.omg.CORBA;
+
+public interface IDLTypeOperations
+ extends IRObjectOperations
+{
+ /**
+ * Get the type code of the interface repository object.
+ *
+ * @return the data structure, describing the type of the object, stored in
+ * the repository.
+ */
+ TypeCode type();
+}
diff --git a/libjava/classpath/org/omg/CORBA/IMP_LIMIT.java b/libjava/classpath/org/omg/CORBA/IMP_LIMIT.java
new file mode 100644
index 00000000000..e61681c3293
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/IMP_LIMIT.java
@@ -0,0 +1,97 @@
+/* IMP_LIMIT.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;
+
+import java.io.Serializable;
+
+/**
+ * Means that the server have reached some implementation limit
+ * (too many clients, too many references, too long parameters and so on).
+ *
+ * @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
+ */
+public class IMP_LIMIT
+ extends SystemException
+ implements Serializable
+{
+ /**
+ * Use serialVersionUID for interoperability.
+ */
+ private static final long serialVersionUID = -8086463494577448422L;
+
+ /**
+ * Creates a IMP_LIMIT with the default minor code of 0,
+ * completion state COMPLETED_NO and the given explaining message.
+ * @param reasom the explaining message.
+ */
+ public IMP_LIMIT(String message)
+ {
+ super(message, 0, CompletionStatus.COMPLETED_NO);
+ }
+
+ /**
+ * Creates IMP_LIMIT with the default minor code of 0 and a
+ * completion state COMPLETED_NO.
+ */
+ public IMP_LIMIT()
+ {
+ super("", 0, CompletionStatus.COMPLETED_NO);
+ }
+
+ /** Creates a IMP_LIMIT exception with the specified minor
+ * code and completion status.
+ * @param minor additional error code.
+ * @param completed the method completion status.
+ */
+ public IMP_LIMIT(int minor, CompletionStatus completed)
+ {
+ super("", minor, completed);
+ }
+
+ /**
+ * Created IMP_LIMIT exception, providing full information.
+ * @param reason explaining message.
+ * @param minor additional error code (the "minor").
+ * @param completed the method completion status.
+ */
+ public IMP_LIMIT(String reason, int minor, CompletionStatus completed)
+ {
+ super(reason, minor, completed);
+ }
+}
diff --git a/libjava/classpath/org/omg/CORBA/INITIALIZE.java b/libjava/classpath/org/omg/CORBA/INITIALIZE.java
new file mode 100644
index 00000000000..f697e583368
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/INITIALIZE.java
@@ -0,0 +1,96 @@
+/* INITIALIZE.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;
+
+import java.io.Serializable;
+
+/**
+ * Mans that the server cannot be initialized because of the some reason.
+ *
+ * @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
+ */
+public class INITIALIZE
+ extends SystemException
+ implements Serializable
+{
+ /**
+ * Use serialVersionUID for interoperability.
+ */
+ private static final long serialVersionUID = -3753094599663690309L;
+
+ /**
+ * Creates a INITIALIZE with the default minor code of 0,
+ * completion state COMPLETED_NO and the given explaining message.
+ * @param reasom the explaining message.
+ */
+ public INITIALIZE(String message)
+ {
+ super(message, 0, CompletionStatus.COMPLETED_NO);
+ }
+
+ /**
+ * Creates INITIALIZE with the default minor code of 0 and a
+ * completion state COMPLETED_NO.
+ */
+ public INITIALIZE()
+ {
+ super("", 0, CompletionStatus.COMPLETED_NO);
+ }
+
+ /** Creates a INITIALIZE exception with the specified minor
+ * code and completion status.
+ * @param minor additional error code.
+ * @param completed the method completion status.
+ */
+ public INITIALIZE(int minor, CompletionStatus completed)
+ {
+ super("", minor, completed);
+ }
+
+ /**
+ * Created INITIALIZE exception, providing full information.
+ * @param reason explaining message.
+ * @param minor additional error code (the "minor").
+ * @param completed the method completion status.
+ */
+ public INITIALIZE(String reason, int minor, CompletionStatus completed)
+ {
+ super(reason, minor, completed);
+ }
+}
diff --git a/libjava/classpath/org/omg/CORBA/INTERNAL.java b/libjava/classpath/org/omg/CORBA/INTERNAL.java
new file mode 100644
index 00000000000..a49041e57a9
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/INTERNAL.java
@@ -0,0 +1,96 @@
+/* INTERNAL.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;
+
+import java.io.Serializable;
+
+/**
+ * Means the internal failure in ORB.
+ *
+ * @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
+ */
+public class INTERNAL
+ extends SystemException
+ implements Serializable
+{
+ /**
+ * Use serialVersionUID for interoperability.
+ */
+ private static final long serialVersionUID = 3771336866139357605L;
+
+ /**
+ * Creates a INTERNAL with the default minor code of 0,
+ * completion state COMPLETED_NO and the given explaining message.
+ * @param reasom the explaining message.
+ */
+ public INTERNAL(String message)
+ {
+ super(message, 0, CompletionStatus.COMPLETED_NO);
+ }
+
+ /**
+ * Creates INTERNAL with the default minor code of 0 and a
+ * completion state COMPLETED_NO.
+ */
+ public INTERNAL()
+ {
+ super("", 0, CompletionStatus.COMPLETED_NO);
+ }
+
+ /** Creates a INTERNAL exception with the specified minor
+ * code and completion status.
+ * @param minor additional error code.
+ * @param completed the method completion status.
+ */
+ public INTERNAL(int minor, CompletionStatus completed)
+ {
+ super("", minor, completed);
+ }
+
+ /**
+ * Created INTERNAL exception, providing full information.
+ * @param reason explaining message.
+ * @param minor additional error code (the "minor").
+ * @param completed the method completion status.
+ */
+ public INTERNAL(String reason, int minor, CompletionStatus completed)
+ {
+ super(reason, minor, completed);
+ }
+}
diff --git a/libjava/classpath/org/omg/CORBA/INTF_REPOS.java b/libjava/classpath/org/omg/CORBA/INTF_REPOS.java
new file mode 100644
index 00000000000..e879c0b1eff
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/INTF_REPOS.java
@@ -0,0 +1,96 @@
+/* INTF_REPOS.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;
+
+import java.io.Serializable;
+
+/**
+ * Means errors, related to the interface repository.
+ *
+ * @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
+ */
+public class INTF_REPOS
+ extends SystemException
+ implements Serializable
+{
+ /**
+ * Use serialVersionUID for interoperability.
+ */
+ private static final long serialVersionUID = 722572694720671863L;
+
+ /**
+ * Creates a INTF_REPOS with the default minor code of 0,
+ * completion state COMPLETED_NO and the given explaining message.
+ * @param reasom the explaining message.
+ */
+ public INTF_REPOS(String message)
+ {
+ super(message, 0, CompletionStatus.COMPLETED_NO);
+ }
+
+ /**
+ * Creates INTF_REPOS with the default minor code of 0 and a
+ * completion state COMPLETED_NO.
+ */
+ public INTF_REPOS()
+ {
+ super("", 0, CompletionStatus.COMPLETED_NO);
+ }
+
+ /** Creates a INTF_REPOS exception with the specified minor
+ * code and completion status.
+ * @param minor additional error code.
+ * @param completed the method completion status.
+ */
+ public INTF_REPOS(int minor, CompletionStatus completed)
+ {
+ super("", minor, completed);
+ }
+
+ /**
+ * Created INTF_REPOS exception, providing full information.
+ * @param reason explaining message.
+ * @param minor additional error code (the "minor").
+ * @param completed the method completion status.
+ */
+ public INTF_REPOS(String reason, int minor, CompletionStatus completed)
+ {
+ super(reason, minor, completed);
+ }
+}
diff --git a/libjava/classpath/org/omg/CORBA/INVALID_TRANSACTION.java b/libjava/classpath/org/omg/CORBA/INVALID_TRANSACTION.java
new file mode 100644
index 00000000000..98cef83044f
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/INVALID_TRANSACTION.java
@@ -0,0 +1,96 @@
+/* INVALID_TRANSACTION.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;
+
+import java.io.Serializable;
+
+/**
+ * Means that request carried an invalid transaction context.
+ *
+ * @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
+ */
+public class INVALID_TRANSACTION
+ extends SystemException
+ implements Serializable
+{
+ /**
+ * Use serialVersionUID for interoperability.
+ */
+ private static final long serialVersionUID = -4265126403821571697L;
+
+ /**
+ * Creates a INVALID_TRANSACTION with the default minor code of 0,
+ * completion state COMPLETED_NO and the given explaining message.
+ * @param reasom the explaining message.
+ */
+ public INVALID_TRANSACTION(String message)
+ {
+ super(message, 0, CompletionStatus.COMPLETED_NO);
+ }
+
+ /**
+ * Creates INVALID_TRANSACTION with the default minor code of 0 and a
+ * completion state COMPLETED_NO.
+ */
+ public INVALID_TRANSACTION()
+ {
+ super("", 0, CompletionStatus.COMPLETED_NO);
+ }
+
+ /** Creates a INVALID_TRANSACTION exception with the specified minor
+ * code and completion status.
+ * @param minor additional error code.
+ * @param completed the method completion status.
+ */
+ public INVALID_TRANSACTION(int minor, CompletionStatus completed)
+ {
+ super("", minor, completed);
+ }
+
+ /**
+ * Created INVALID_TRANSACTION exception, providing full information.
+ * @param reason explaining message.
+ * @param minor additional error code (the "minor").
+ * @param completed the method completion status.
+ */
+ public INVALID_TRANSACTION(String reason, int minor, CompletionStatus completed)
+ {
+ super(reason, minor, completed);
+ }
+}
diff --git a/libjava/classpath/org/omg/CORBA/INV_FLAG.java b/libjava/classpath/org/omg/CORBA/INV_FLAG.java
new file mode 100644
index 00000000000..7766a3cd058
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/INV_FLAG.java
@@ -0,0 +1,96 @@
+/* INV_FLAG.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;
+
+import java.io.Serializable;
+
+/**
+ * Means invalid flag, passed during operation.
+ *
+ * @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
+ */
+public class INV_FLAG
+ extends SystemException
+ implements Serializable
+{
+ /**
+ * Use serialVersionUID for interoperability.
+ */
+ private static final long serialVersionUID = -4863924749863817671L;
+
+ /**
+ * Creates a INV_FLAG with the default minor code of 0,
+ * completion state COMPLETED_NO and the given explaining message.
+ * @param reasom the explaining message.
+ */
+ public INV_FLAG(String message)
+ {
+ super(message, 0, CompletionStatus.COMPLETED_NO);
+ }
+
+ /**
+ * Creates INV_FLAG with the default minor code of 0 and a
+ * completion state COMPLETED_NO.
+ */
+ public INV_FLAG()
+ {
+ super("", 0, CompletionStatus.COMPLETED_NO);
+ }
+
+ /** Creates a INV_FLAG exception with the specified minor
+ * code and completion status.
+ * @param minor additional error code.
+ * @param completed the method completion status.
+ */
+ public INV_FLAG(int minor, CompletionStatus completed)
+ {
+ super("", minor, completed);
+ }
+
+ /**
+ * Created INV_FLAG exception, providing full information.
+ * @param reason explaining message.
+ * @param minor additional error code (the "minor").
+ * @param completed the method completion status.
+ */
+ public INV_FLAG(String reason, int minor, CompletionStatus completed)
+ {
+ super(reason, minor, completed);
+ }
+}
diff --git a/libjava/classpath/org/omg/CORBA/INV_IDENT.java b/libjava/classpath/org/omg/CORBA/INV_IDENT.java
new file mode 100644
index 00000000000..ca61a0a2412
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/INV_IDENT.java
@@ -0,0 +1,96 @@
+/* INV_IDENT.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;
+
+import java.io.Serializable;
+
+/**
+ * Means that some IDL identifier has a wrong syntax.
+ *
+ * @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
+ */
+public class INV_IDENT
+ extends SystemException
+ implements Serializable
+{
+ /**
+ * Use serialVersionUID for interoperability.
+ */
+ private static final long serialVersionUID = 4399295047946553530L;
+
+ /**
+ * Creates a INV_IDENT with the default minor code of 0,
+ * completion state COMPLETED_NO and the given explaining message.
+ * @param reasom the explaining message.
+ */
+ public INV_IDENT(String message)
+ {
+ super(message, 0, CompletionStatus.COMPLETED_NO);
+ }
+
+ /**
+ * Creates INV_IDENT with the default minor code of 0 and a
+ * completion state COMPLETED_NO.
+ */
+ public INV_IDENT()
+ {
+ super("", 0, CompletionStatus.COMPLETED_NO);
+ }
+
+ /** Creates a INV_IDENT exception with the specified minor
+ * code and completion status.
+ * @param minor additional error code.
+ * @param completed the method completion status.
+ */
+ public INV_IDENT(int minor, CompletionStatus completed)
+ {
+ super("", minor, completed);
+ }
+
+ /**
+ * Created INV_IDENT exception, providing full information.
+ * @param reason explaining message.
+ * @param minor additional error code (the "minor").
+ * @param completed the method completion status.
+ */
+ public INV_IDENT(String reason, int minor, CompletionStatus completed)
+ {
+ super(reason, minor, completed);
+ }
+}
diff --git a/libjava/classpath/org/omg/CORBA/INV_OBJREF.java b/libjava/classpath/org/omg/CORBA/INV_OBJREF.java
new file mode 100644
index 00000000000..ca8e059d484
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/INV_OBJREF.java
@@ -0,0 +1,96 @@
+/* INV_OBJREF.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;
+
+import java.io.Serializable;
+
+/**
+ * Means that some object reference is internally malformed.
+ *
+ * @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
+ */
+public class INV_OBJREF
+ extends SystemException
+ implements Serializable
+{
+ /**
+ * Use serialVersionUID for interoperability.
+ */
+ private static final long serialVersionUID = -7238811948257685034L;
+
+ /**
+ * Creates a INV_OBJREF with the default minor code of 0,
+ * completion state COMPLETED_NO and the given explaining message.
+ * @param reasom the explaining message.
+ */
+ public INV_OBJREF(String message)
+ {
+ super(message, 0, CompletionStatus.COMPLETED_NO);
+ }
+
+ /**
+ * Creates INV_OBJREF with the default minor code of 0 and a
+ * completion state COMPLETED_NO.
+ */
+ public INV_OBJREF()
+ {
+ super("", 0, CompletionStatus.COMPLETED_NO);
+ }
+
+ /** Creates a INV_OBJREF exception with the specified minor
+ * code and completion status.
+ * @param minor additional error code.
+ * @param completed the method completion status.
+ */
+ public INV_OBJREF(int minor, CompletionStatus completed)
+ {
+ super("", minor, completed);
+ }
+
+ /**
+ * Created INV_OBJREF exception, providing full information.
+ * @param reason explaining message.
+ * @param minor additional error code (the "minor").
+ * @param completed the method completion status.
+ */
+ public INV_OBJREF(String reason, int minor, CompletionStatus completed)
+ {
+ super(reason, minor, completed);
+ }
+}
diff --git a/libjava/classpath/org/omg/CORBA/INV_POLICY.java b/libjava/classpath/org/omg/CORBA/INV_POLICY.java
new file mode 100644
index 00000000000..f4ff245cf24
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/INV_POLICY.java
@@ -0,0 +1,98 @@
+/* INV_POLICY.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;
+
+import java.io.Serializable;
+
+/**
+ * This exception is thrown when an invocation cannot be made because of
+ * an incompatibility between Policy overrides that apply to the
+ * particular invocation.
+ *
+ * @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
+ */
+public class INV_POLICY
+ extends SystemException
+ implements Serializable
+{
+ /**
+ * Use serialVersionUID for interoperability.
+ */
+ private static final long serialVersionUID = -7823113107689030975L;
+
+ /**
+ * Creates a INV_POLICY with the default minor code of 0,
+ * completion state COMPLETED_NO and the given explaining message.
+ * @param reasom the explaining message.
+ */
+ public INV_POLICY(String message)
+ {
+ super(message, 0, CompletionStatus.COMPLETED_NO);
+ }
+
+ /**
+ * Creates INV_POLICY with the default minor code of 0 and a
+ * completion state COMPLETED_NO.
+ */
+ public INV_POLICY()
+ {
+ super("", 0, CompletionStatus.COMPLETED_NO);
+ }
+
+ /** Creates a INV_POLICY exception with the specified minor
+ * code and completion status.
+ * @param minor additional error code.
+ * @param completed the method completion status.
+ */
+ public INV_POLICY(int minor, CompletionStatus completed)
+ {
+ super("", minor, completed);
+ }
+
+ /**
+ * Created INV_POLICY exception, providing full information.
+ * @param reason explaining message.
+ * @param minor additional error code (the "minor").
+ * @param completed the method completion status.
+ */
+ public INV_POLICY(String reason, int minor, CompletionStatus completed)
+ {
+ super(reason, minor, completed);
+ }
+}
diff --git a/libjava/classpath/org/omg/CORBA/IRObject.java b/libjava/classpath/org/omg/CORBA/IRObject.java
new file mode 100644
index 00000000000..8c9cde19d39
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/IRObject.java
@@ -0,0 +1,53 @@
+/* IRObject.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;
+
+import org.omg.CORBA.portable.IDLEntity;
+
+import java.io.Serializable;
+
+/**
+ * Represents the interface repository object.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public interface IRObject
+ extends IRObjectOperations, org.omg.CORBA.Object, Serializable, IDLEntity
+{
+} \ No newline at end of file
diff --git a/libjava/classpath/org/omg/CORBA/IRObjectOperations.java b/libjava/classpath/org/omg/CORBA/IRObjectOperations.java
new file mode 100644
index 00000000000..c7c89ae557d
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/IRObjectOperations.java
@@ -0,0 +1,68 @@
+/* IRObjectOperations.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;
+
+
+/**
+ * Defines the operations, applicable to the interface repository object.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public interface IRObjectOperations {
+ /**
+ * Get the definition kind of this interface repository object.
+ *
+ * @return the defintion kind (one of the DefinitionKind.dk_...
+ * constants).
+ */
+ DefinitionKind def_kind();
+
+ /**
+ * Destroy this interface repository object. If the object is a container,
+ * the method applies to all its contents. If the object is part of some
+ * other object, it is removed.
+ *
+ * @throws BAD_INV_ORDER, minor code 1, if destroying this object would
+ * leave the repository in an incoherent state.
+ *
+ * @throws BAD_INV_ORDER, minor code 2, if the method is invoked on the
+ * Repository or on the definition of the primitive type.
+ */
+ void destroy() throws BAD_INV_ORDER;
+
+} \ No newline at end of file
diff --git a/libjava/classpath/org/omg/CORBA/IdentifierHelper.java b/libjava/classpath/org/omg/CORBA/IdentifierHelper.java
new file mode 100644
index 00000000000..fa204484125
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/IdentifierHelper.java
@@ -0,0 +1,116 @@
+/* IdentifierHelper.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;
+
+import gnu.CORBA.Restricted_ORB;
+
+import org.omg.CORBA.Any;
+import org.omg.CORBA.ORB;
+import org.omg.CORBA.TypeCode;
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+
+/**
+ * A formal helper for the CORBA Identifier that is identical to the
+ * narrow string.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public abstract class IdentifierHelper
+{
+ /**
+ * Insert the Identifier into Any (uses {@link Any.insert_string}).
+ *
+ * @param a the Any to insert into.
+ * @param that the string to insert.
+ */
+ public static void insert(Any a, String that)
+ {
+ a.insert_string(that);
+ }
+
+ /**
+ * Extract the Identifier from Any ((uses {@link Any.extract_string}).
+ *
+ * @param a the Any to extract from.
+ */
+ public static String extract(Any a)
+ {
+ return a.extract_string();
+ }
+
+ /**
+ * Return an string alias typecode, named "Identifier".
+ */
+ public static TypeCode type()
+ {
+ ORB orb = Restricted_ORB.Singleton;
+ return orb.create_alias_tc(id(), "Identifier", orb.create_string_tc(0));
+ }
+
+ /**
+ * Return the Identifier repository id.
+ * @return "IDL:omg.org/CORBA/Identifier:1.0", always.
+ */
+ public static String id()
+ {
+ return "IDL:omg.org/CORBA/Identifier:1.0";
+ }
+
+ /**
+ * Calls {@link InputStream#read_string()}.
+ *
+ * @param istream the stream to read from.
+ */
+ public static String read(InputStream istream)
+ {
+ return istream.read_string();
+ }
+
+ /**
+ * Calls {@link OutputStream#write_string()}.
+ *
+ * @param ostream the stream to write into.
+ * @param value the string (Identifier) value to write.
+ */
+ public static void write(OutputStream ostream, String value)
+ {
+ ostream.write_string(value);
+ }
+} \ No newline at end of file
diff --git a/libjava/classpath/org/omg/CORBA/IntHolder.java b/libjava/classpath/org/omg/CORBA/IntHolder.java
new file mode 100644
index 00000000000..19822ef766e
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/IntHolder.java
@@ -0,0 +1,126 @@
+/* IntHolder.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;
+
+import gnu.CORBA.primitiveTypeCode;
+
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+import org.omg.CORBA.portable.Streamable;
+
+/**
+ * A holder for CORBA <code>long</code> that is mapped into
+ * java <code>int</code>.
+ *
+ * The holders have several application areas. The end user usually
+ * sees them implementing CORBA methods where the primitive type
+ * is passed by reference. While CORBA (or, for example, C) supports
+ * this, the java does not and a wrapper class is required.
+ *
+ * @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
+ */
+public final class IntHolder
+ implements Streamable
+{
+ /**
+ * The default type code for this holder.
+ */
+ private static final TypeCode t_long = new primitiveTypeCode(TCKind.tk_long);
+
+ /**
+ * The <code>int</code> (CORBA <code>long</code>) value,
+ * held by this IntHolder.
+ */
+ public int value;
+
+ /**
+ * Constructs an instance of IntHolder,
+ * initializing {@link #value} to <code>0</code>.
+ */
+ public IntHolder()
+ {
+ }
+
+ /**
+ * Constructs an instance of IntHolder,
+ * initializing {@link #value} to the given <code>int</code>.
+ *
+ * @param initial_value a value that will be assigned to the
+ * {@link #value} field.
+ */
+ public IntHolder(int initial_value)
+ {
+ value = initial_value;
+ }
+
+ /**
+ * Fill in the {@link value } field by reading the required data
+ * from the given stream. For <code>long</code>, the functionality
+ * is delegated to
+ * {@link org.omg.CORBA.portable.InputStream#read_long}.
+ *
+ * @param input the input stream to read from.
+ */
+ public void _read(InputStream input)
+ {
+ value = input.read_long();
+ }
+
+ /**
+ * Returns the TypeCode, corresponding the CORBA type that is stored
+ * using this holder.
+ */
+ public TypeCode _type()
+ {
+ return t_long;
+ }
+
+ /**
+ * Write the {@link value } field to the given stream.
+ * For <code>long</code>, the functionality
+ * is delegated to
+ * {@link org.omg.CORBA.portable.OutputStream#write_long(int) }.
+ *
+ * @param output the output stream to write into.
+ */
+ public void _write(OutputStream output)
+ {
+ output.write_long(value);
+ }
+}
diff --git a/libjava/classpath/org/omg/CORBA/LocalObject.java b/libjava/classpath/org/omg/CORBA/LocalObject.java
new file mode 100644
index 00000000000..4b6ae68afda
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/LocalObject.java
@@ -0,0 +1,235 @@
+/* LocalObject.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;
+
+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.Policy;
+import org.omg.CORBA.Request;
+import org.omg.CORBA.SetOverrideType;
+
+/**
+ * An object, formally implementing the CORBA {@link Object}, but actually
+ * handling all invocations locally.
+ * Various calls to the remote object specific methods throw the
+ * {@link NO_IMPLEMENT}. The explaining message for this exception is
+ * specified in java API as <code>"This is a locally constrained object."</code>.
+ * It is not possible to get a stringified reference of the local object, or
+ * invoke a method using DII (by name via {@link Request} class).
+ *
+ * However narrowing and widening methods will work with local objects.
+ *
+ * @since 1.4
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public class LocalObject
+ implements org.omg.CORBA.Object
+{
+ /**
+ * The explaining message for the exception, thrown in response to call
+ * the method, not appropriate for the local object.
+ */
+ private static final String INAPPROPRIATE =
+ "This is a locally constrained object.";
+
+ /**
+ * This method is not appropriate for the local objects and just
+ * throws an exception.
+ *
+ * @throws NO_IMPLEMENT, always.
+ */
+ public Request _create_request(Context context, String operation,
+ NVList parameters, NamedValue returns
+ )
+ {
+ throw new NO_IMPLEMENT(INAPPROPRIATE);
+ }
+
+ /**
+ * This method is not appropriate for the local objects and just
+ * throws an exception.
+ *
+ * @throws NO_IMPLEMENT, always.
+ */
+ public Request _create_request(Context context, String operation,
+ NVList parameters, NamedValue returns,
+ ExceptionList exceptions, ContextList ctx_list
+ )
+ {
+ throw new NO_IMPLEMENT(INAPPROPRIATE);
+ }
+
+ /**
+ * This method is not appropriate for the local objects and just
+ * throws an exception.
+ *
+ * @throws NO_IMPLEMENT, always.
+ */
+ public org.omg.CORBA.Object _duplicate()
+ {
+ throw new NO_IMPLEMENT(INAPPROPRIATE);
+ }
+
+ /**
+ * This method is not appropriate for the local objects and just
+ * throws an exception.
+ *
+ * @throws NO_IMPLEMENT, always.
+ */
+ public DomainManager[] _get_domain_managers()
+ {
+ throw new NO_IMPLEMENT(INAPPROPRIATE);
+ }
+
+ /**
+ * This method is not appropriate for the local objects and just
+ * throws an exception.
+ *
+ * @throws NO_IMPLEMENT, always.
+ */
+ public org.omg.CORBA.Object _get_interface_def()
+ {
+ throw new NO_IMPLEMENT(INAPPROPRIATE);
+ }
+
+ /**
+ * This method is not appropriate for the local objects and just
+ * throws an exception.
+ *
+ * @throws NO_IMPLEMENT, always.
+ */
+ public Policy _get_policy(int a_policy_type)
+ throws BAD_PARAM
+ {
+ throw new NO_IMPLEMENT(INAPPROPRIATE);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public int _hash(int maximum)
+ {
+ return Math.abs(hashCode()) % maximum;
+ }
+
+ /**
+ * This method is not appropriate for the local objects and just
+ * throws an exception.
+ *
+ * @throws NO_IMPLEMENT, always.
+ */
+ public boolean _is_a(String repositoryIdentifer)
+ {
+ throw new NO_IMPLEMENT(INAPPROPRIATE);
+ }
+
+ /**
+ * Determines if the object is equal to another object, so far as it is
+ * possible to determine easily.
+ *
+ * @param other the other object.
+ *
+ * @return true if the pased object is not null and
+ * java.lang.Object.equals(other) returns true. False otherwise.
+ */
+ public boolean _is_equivalent(org.omg.CORBA.Object other)
+ {
+ if (other != null)
+ if (other.equals(this))
+ return true;
+
+ return false;
+ }
+
+ /**
+ * Always returs false.
+ *
+ * @return false, always.
+ */
+ public boolean _non_existent()
+ {
+ return false;
+ }
+
+ /**
+ * This method is not appropriate for the local objects and just
+ * throws an exception.
+ *
+ * @throws NO_IMPLEMENT, always.
+ */
+ public void _release()
+ {
+ throw new NO_IMPLEMENT(INAPPROPRIATE);
+ }
+
+ /**
+ * This method is not appropriate for the local objects and just
+ * throws an exception.
+ *
+ * @specnote it is possible to implement a local handling of the _request(),
+ * but the API clearly states that NO_IMPLEMENT
+ * must be thrown instead.
+ *
+ * @throws NO_IMPLEMENT, always.
+ */
+ public Request _request(String operation)
+ {
+ throw new NO_IMPLEMENT(INAPPROPRIATE);
+ }
+
+ /**
+ * This method is not appropriate for the local objects and just
+ * throws an exception.
+ *
+ * @throws NO_IMPLEMENT, always.
+ */
+ public org.omg.CORBA.Object _set_policy_override(Policy[] policies,
+ SetOverrideType how
+ )
+ {
+ throw new NO_IMPLEMENT(INAPPROPRIATE);
+ }
+} \ No newline at end of file
diff --git a/libjava/classpath/org/omg/CORBA/LongHolder.java b/libjava/classpath/org/omg/CORBA/LongHolder.java
new file mode 100644
index 00000000000..c0b14d33be2
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/LongHolder.java
@@ -0,0 +1,127 @@
+/* LongHolder.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;
+
+import gnu.CORBA.primitiveTypeCode;
+
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+import org.omg.CORBA.portable.Streamable;
+
+/**
+ * A holder for CORBA <code>long long</code> that is mapped into
+ * java <code>long</code>.
+ *
+ * The holders have several application areas. The end user usually
+ * sees them implementing CORBA methods where the primitive type
+ * is passed by reference. While CORBA (or, for example, C) supports
+ * this, the java does not and a wrapper class is required.
+ *
+ * @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
+ */
+public final class LongHolder
+ implements Streamable
+{
+ /**
+ * The default type code for this holder.
+ */
+ private static final TypeCode t_longlong =
+ new primitiveTypeCode(TCKind.tk_longlong);
+
+ /**
+ * The <code>long</code> (CORBA <code>long long</code>) value,
+ * held by this LongHolder.
+ */
+ public long value;
+
+ /**
+ * Constructs an instance of LongHolder,
+ * initializing {@link #value} to <code>0 </code>.
+ */
+ public LongHolder()
+ {
+ }
+
+ /**
+ * Constructs an instance of LongHolder,
+ * initializing {@link #value} to the given <code>long</code>.
+ *
+ * @param initial_value a value that will be assigned to the
+ * {@link #value} field.
+ */
+ public LongHolder(long initial_value)
+ {
+ value = initial_value;
+ }
+
+ /**
+ * Fill in the {@link value } field by reading the required data
+ * from the given stream. For <code>long long</code>, the functionality
+ * is delegated to
+ * {@link org.omg.CORBA.portable.InputStream#read_longlong}.
+ *
+ * @param input the input stream to read from.
+ */
+ public void _read(InputStream input)
+ {
+ value = input.read_longlong();
+ }
+
+ /**
+ * Returns the TypeCode, corresponding the CORBA type that is stored
+ * using this holder.
+ */
+ public TypeCode _type()
+ {
+ return t_longlong;
+ }
+
+ /**
+ * Write the {@link value } field to the given stream.
+ * For <code>long long</code>, the functionality
+ * is delegated to
+ * {@link org.omg.CORBA.portable.OutputStream#write_longlong(long) }.
+ *
+ * @param output the output stream to write into.
+ */
+ public void _write(OutputStream output)
+ {
+ output.write_longlong(value);
+ }
+}
diff --git a/libjava/classpath/org/omg/CORBA/LongLongSeqHelper.java b/libjava/classpath/org/omg/CORBA/LongLongSeqHelper.java
new file mode 100644
index 00000000000..1d7cde01cbb
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/LongLongSeqHelper.java
@@ -0,0 +1,142 @@
+/* LongLongSeqHelper.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;
+
+import gnu.CORBA.primitiveArrayTypeCode;
+
+import org.omg.CORBA.TypeCodePackage.BadKind;
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+
+/**
+ * Provides static helper methods for working with
+ * CORBA sequence of <code>long</code>
+ * (<code>LongLongSeq</code>).
+ *
+ * @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
+ */
+public abstract class LongLongSeqHelper
+{
+ /**
+ * Extract the <code>long[]</code> from the
+ * given {@link Any}. This implementation expects the
+ * {@link Any} to hold the instance of {@link LongLongSeqHolder}
+ * that is returned by {@link Any#extract_Streamable() }.
+ *
+ * @param a an Any to extract the array from.
+ *
+ * @return the extracted array.
+ *
+ * @throws ClassCastException if the Any contains something other than the
+ * the {@link LongLongSeqHolder}.
+ */
+ public static long[] extract(Any a)
+ {
+ LongLongSeqHolder h = (LongLongSeqHolder) a.extract_Streamable();
+ return h.value;
+ }
+
+ /**
+ * Returns the agreed Id, delegating functionality to
+ * the {@link #type()}.id().
+ */
+ public static String id()
+ {
+ try
+ {
+ return type().id();
+ }
+ catch (BadKind ex)
+ {
+ // Should never happen under correct work.
+ throw new Error("Please report this bug.", ex);
+ }
+ }
+
+ /**
+ * Insert into the given <code>long[]</code> into the
+ * given {@link Any}. This implementation first creates
+ * a {@link LongLongSeqHolder} and then calls
+ * {@link Any#insert_Streamable(Streamable)}.
+ *
+ * @param into the target Any.
+ * @param that the array to insert.
+ */
+ public static void insert(Any into, long[] that)
+ {
+ LongLongSeqHolder holder = new LongLongSeqHolder(that);
+ into.insert_Streamable(holder);
+ }
+
+ /**
+ * Reads the <code>long long[]</code> from the CORBA input stream.
+ *
+ * @param input the CORBA (not java.io) stream to read from.
+ * @return the value from the stream.
+ */
+ public static long[] read(InputStream input)
+ {
+ long[] value = new long[ input.read_long() ];
+ input.read_longlong_array(value, 0, value.length);
+ return value;
+ }
+
+ /**
+ * Creates and returns a new instance of the TypeCode,
+ * corresponding the CORBA <code>LongLongSeq</code>.
+ * The length of the sequence is left with the initial
+ * value 0.
+ */
+ public static TypeCode type()
+ {
+ return new primitiveArrayTypeCode(TCKind.tk_long);
+ }
+
+ /**
+ * Writes the <code>long[]</code> into the given stream.
+ *
+ * @param output the CORBA (not java.io) output stream to write.
+ * @param value the value that must be written.
+ */
+ public static void write(OutputStream output, long[] value)
+ {
+ output.write_long(value.length);
+ output.write_longlong_array(value, 0, value.length);
+ }
+}
diff --git a/libjava/classpath/org/omg/CORBA/LongLongSeqHolder.java b/libjava/classpath/org/omg/CORBA/LongLongSeqHolder.java
new file mode 100644
index 00000000000..95579029673
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/LongLongSeqHolder.java
@@ -0,0 +1,126 @@
+/* LongLongSeqHolder.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;
+
+import gnu.CORBA.primitiveArrayTypeCode;
+
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+import org.omg.CORBA.portable.Streamable;
+
+/**
+ * A sequence holder for CORBA <code>LongLongSeq</code> that is mapped into
+ * java <code>long[]</code>.
+ *
+ * @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
+ */
+public final class LongLongSeqHolder
+ implements Streamable
+{
+ /**
+ * The <code>long[]</code> (CORBA <code>LongLongSeq</code>) value,
+ * held by this LongLongSeqHolder.
+ */
+ public long[] value;
+
+ /**
+ * The type code for this holder. Each holder has a different instance.
+ */
+ private final primitiveArrayTypeCode typecode =
+ new primitiveArrayTypeCode(TCKind.tk_longlong);
+
+ /**
+ * Constructs an instance of LongLongSeqHolder,
+ * initializing {@link #value} to <code>null</code>.
+ */
+ public LongLongSeqHolder()
+ {
+ }
+
+ /**
+ * Constructs an instance of LongLongSeqHolder,
+ * initializing {@link #value} to the given <code>long[]</code>.
+ *
+ * @param initial_value a value that will be assigned to the
+ * {@link #value} field.
+ */
+ public LongLongSeqHolder(long[] initial_value)
+ {
+ value = initial_value;
+ typecode.setLength(value.length);
+ }
+
+ /**
+ * Fill in the {@link value } field by reading the required data
+ * from the given stream. This method first reads the array size
+ * (as CORBA <code>long</code>) and then calls the
+ * {@link org.omg.CORBA.portable.InputStream#read_longlong_array }.
+ *
+ * @param input the input stream to read from.
+ */
+ public void _read(InputStream input)
+ {
+ value = new long[ input.read_long() ];
+ input.read_longlong_array(value, 0, value.length);
+ typecode.setLength(value.length);
+ }
+
+ /**
+ * Returns the TypeCode, corresponding the CORBA type that is stored
+ * using this holder.
+ */
+ public TypeCode _type()
+ {
+ return typecode;
+ }
+
+ /**
+ * Write the {@link value } field to the given stream.
+ * This method first writes the array size
+ * (as CORBA <code>long</code>) and then calls the
+ * {@link org.omg.CORBA.portable.OutputStream#write_longlong_array }.
+ *
+ * @param output the output stream to write into.
+ */
+ public void _write(OutputStream output)
+ {
+ output.write_long(value.length);
+ output.write_longlong_array(value, 0, value.length);
+ }
+}
diff --git a/libjava/classpath/org/omg/CORBA/LongSeqHelper.java b/libjava/classpath/org/omg/CORBA/LongSeqHelper.java
new file mode 100644
index 00000000000..e98c77920dd
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/LongSeqHelper.java
@@ -0,0 +1,142 @@
+/* LongSeqHelper.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;
+
+import gnu.CORBA.primitiveArrayTypeCode;
+
+import org.omg.CORBA.TypeCodePackage.BadKind;
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+
+/**
+ * Provides static helper methods for working with
+ * CORBA sequence of <code>int</code>
+ * (<code>LongSeq</code>).
+ *
+ * @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
+ */
+public abstract class LongSeqHelper
+{
+ /**
+ * Extract the <code>int[]</code> from the
+ * given {@link Any}. This implementation expects the
+ * {@link Any} to hold the instance of {@link LongSeqHolder}
+ * that is returned by {@link Any#extract_Streamable() }.
+ *
+ * @param a an Any to extract the array from.
+ *
+ * @return the extracted array.
+ *
+ * @throws ClassCastException if the Any contains something other than the
+ * the {@link LongSeqHolder}.
+ */
+ public static int[] extract(Any a)
+ {
+ LongSeqHolder h = (LongSeqHolder) a.extract_Streamable();
+ return h.value;
+ }
+
+ /**
+ * Returns the agreed Id, delegating functionality to
+ * the {@link #type()}.id().
+ */
+ public static String id()
+ {
+ try
+ {
+ return type().id();
+ }
+ catch (BadKind ex)
+ {
+ // Should never happen under correct work.
+ throw new Error("Please report this bug.", ex);
+ }
+ }
+
+ /**
+ * Insert into the given <code>int[]</code> into the
+ * given {@link Any}. This implementation first creates
+ * a {@link LongSeqHolder} and then calls
+ * {@link Any#insert_Streamable(Streamable)}.
+ *
+ * @param into the target Any.
+ * @param that the array to insert.
+ */
+ public static void insert(Any into, int[] that)
+ {
+ LongSeqHolder holder = new LongSeqHolder(that);
+ into.insert_Streamable(holder);
+ }
+
+ /**
+ * Reads the <code>int[]</code> from the CORBA input stream.
+ *
+ * @param input the CORBA (not java.io) stream to read from.
+ * @return the value from the stream.
+ */
+ public static int[] read(InputStream input)
+ {
+ int[] value = new int[ input.read_long() ];
+ input.read_long_array(value, 0, value.length);
+ return value;
+ }
+
+ /**
+ * Creates and returns a new instance of the TypeCode,
+ * corresponding the CORBA <code>LongSeq</code>.
+ * The length of the sequence is left with the initial
+ * value 0.
+ */
+ public static TypeCode type()
+ {
+ return new primitiveArrayTypeCode(TCKind.tk_long);
+ }
+
+ /**
+ * Writes the <code>int[]</code> into the given stream.
+ *
+ * @param output the CORBA (not java.io) output stream to write.
+ * @param value the value that must be written.
+ */
+ public static void write(OutputStream output, int[] value)
+ {
+ output.write_long(value.length);
+ output.write_long_array(value, 0, value.length);
+ }
+}
diff --git a/libjava/classpath/org/omg/CORBA/LongSeqHolder.java b/libjava/classpath/org/omg/CORBA/LongSeqHolder.java
new file mode 100644
index 00000000000..ac571decdb6
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/LongSeqHolder.java
@@ -0,0 +1,128 @@
+/* LongSeqHolder.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;
+
+import gnu.CORBA.primitiveArrayTypeCode;
+
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+import org.omg.CORBA.portable.Streamable;
+
+/**
+ * A sequence holder for CORBA <code>LongSeq</code> that is mapped into
+ * java <code>int[]</code>.
+ *
+ * @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
+ */
+public final class LongSeqHolder
+ implements Streamable
+{
+ /**
+ * The type code for this holder. Each holder has a different instance.
+ */
+ private final primitiveArrayTypeCode typecode =
+ new primitiveArrayTypeCode(TCKind.tk_long);
+
+ /**
+ * The <code>int[]</code> (CORBA <code>LongSeq</code>) value,
+ * held by this LongSeqHolder.
+ */
+ public int[] value;
+
+ /**
+ * Constructs an instance of LongSeqHolder,
+ * initializing {@link #value} to <code>null</code>.
+ */
+ public LongSeqHolder()
+ {
+ }
+
+ /**
+ * Constructs an instance of LongSeqHolder,
+ * initializing {@link #value} to the given <code>int</code>.
+ *
+ * @param initial_value a value that will be assigned to the
+ * {@link #value} field.
+ */
+ public LongSeqHolder(int[] initial_value)
+ {
+ value = initial_value;
+ typecode.setLength(value.length);
+ }
+
+ /**
+ * Fill in the {@link value } field by reading the required data
+ * from the given stream. This method first reads the array size
+ * (as CORBA <code>long</code>and then calls the
+ * {@link org.omg.CORBA.portable.InputStream#input.read_long_array }.
+ *
+ * @param input the input stream to read from.
+ */
+ public void _read(InputStream input)
+ {
+ value = new int[ input.read_long() ];
+ input.read_long_array(value, 0, value.length);
+ typecode.setLength(value.length);
+ }
+
+ /**
+ * Write the {@link value } field to the given stream.
+ * This method first writes the array size
+ * (as CORBA <code>long</code>and then calls the
+ * {@link org.omg.CORBA.portable.OutputStream#input.write_long_array }.
+ *
+ * @param output the output stream to write into.
+ */
+ public void _write(OutputStream output)
+ {
+ output.write_long(value.length);
+ output.write_long_array(value, 0, value.length);
+ }
+
+ /**
+ * Returns the TypeCode, corresponding the CORBA type that is stored
+ * using this holder.
+ */
+ public TypeCode _type()
+ {
+ return typecode;
+ }
+
+
+}
diff --git a/libjava/classpath/org/omg/CORBA/MARSHAL.java b/libjava/classpath/org/omg/CORBA/MARSHAL.java
new file mode 100644
index 00000000000..34cfa78f637
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/MARSHAL.java
@@ -0,0 +1,97 @@
+/* MARSHAL.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;
+
+import java.io.Serializable;
+
+/**
+ * Means that some request or reply from the network has a wrong
+ * size or is structurally invalid.
+ *
+ * @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
+ */
+public class MARSHAL
+ extends SystemException
+ implements Serializable
+{
+ /**
+ * Use serialVersionUID for interoperability.
+ */
+ private static final long serialVersionUID = 7416408250336395546L;
+
+ /**
+ * Creates a MARSHAL with the default minor code of 0,
+ * completion state COMPLETED_NO and the given explaining message.
+ * @param reasom the explaining message.
+ */
+ public MARSHAL(String message)
+ {
+ super(message, 0, CompletionStatus.COMPLETED_NO);
+ }
+
+ /**
+ * Creates MARSHAL with the default minor code of 0 and a
+ * completion state COMPLETED_NO.
+ */
+ public MARSHAL()
+ {
+ super("", 0, CompletionStatus.COMPLETED_NO);
+ }
+
+ /** Creates a MARSHAL exception with the specified minor
+ * code and completion status.
+ * @param minor additional error code.
+ * @param completed the method completion status.
+ */
+ public MARSHAL(int minor, CompletionStatus completed)
+ {
+ super("", minor, completed);
+ }
+
+ /**
+ * Created MARSHAL exception, providing full information.
+ * @param reason explaining message.
+ * @param minor additional error code (the "minor").
+ * @param completed the method completion status.
+ */
+ public MARSHAL(String reason, int minor, CompletionStatus completed)
+ {
+ super(reason, minor, completed);
+ }
+}
diff --git a/libjava/classpath/org/omg/CORBA/NO_IMPLEMENT.java b/libjava/classpath/org/omg/CORBA/NO_IMPLEMENT.java
new file mode 100644
index 00000000000..7ffbca49dd9
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/NO_IMPLEMENT.java
@@ -0,0 +1,97 @@
+/* NO_IMPLEMENT.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;
+
+import java.io.Serializable;
+
+/**
+ * Means that while the operation being invoked does exists, no
+ * implementation for it exists.
+ *
+ * @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
+ */
+public class NO_IMPLEMENT
+ extends SystemException
+ implements Serializable
+{
+ /**
+ * Use serialVersionUID for interoperability.
+ */
+ private static final long serialVersionUID = 3519190655657192112L;
+
+ /**
+ * Creates a NO_IMPLEMENT with the default minor code of 0,
+ * completion state COMPLETED_NO and the given explaining message.
+ * @param reasom the explaining message.
+ */
+ public NO_IMPLEMENT(String message)
+ {
+ super(message, 0, CompletionStatus.COMPLETED_NO);
+ }
+
+ /**
+ * Creates NO_IMPLEMENT with the default minor code of 0 and a
+ * completion state COMPLETED_NO.
+ */
+ public NO_IMPLEMENT()
+ {
+ super("", 0, CompletionStatus.COMPLETED_NO);
+ }
+
+ /** Creates a NO_IMPLEMENT exception with the specified minor
+ * code and completion status.
+ * @param minor additional error code.
+ * @param completed the method completion status.
+ */
+ public NO_IMPLEMENT(int minor, CompletionStatus completed)
+ {
+ super("", minor, completed);
+ }
+
+ /**
+ * Created NO_IMPLEMENT exception, providing full information.
+ * @param reason explaining message.
+ * @param minor additional error code (the "minor").
+ * @param completed the method completion status.
+ */
+ public NO_IMPLEMENT(String reason, int minor, CompletionStatus completed)
+ {
+ super(reason, minor, completed);
+ }
+}
diff --git a/libjava/classpath/org/omg/CORBA/NO_MEMORY.java b/libjava/classpath/org/omg/CORBA/NO_MEMORY.java
new file mode 100644
index 00000000000..e09b4f1afac
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/NO_MEMORY.java
@@ -0,0 +1,96 @@
+/* NO_MEMORY.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;
+
+import java.io.Serializable;
+
+/**
+ * Means that the server has runned out of memory.
+ *
+ * @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
+ */
+public class NO_MEMORY
+ extends SystemException
+ implements Serializable
+{
+ /**
+ * Use serialVersionUID for interoperability.
+ */
+ private static final long serialVersionUID = -4591569617929689285L;
+
+ /**
+ * Creates a NO_MEMORY with the default minor code of 0,
+ * completion state COMPLETED_NO and the given explaining message.
+ * @param reasom the explaining message.
+ */
+ public NO_MEMORY(String message)
+ {
+ super(message, 0, CompletionStatus.COMPLETED_NO);
+ }
+
+ /**
+ * Creates NO_MEMORY with the default minor code of 0 and a
+ * completion state COMPLETED_NO.
+ */
+ public NO_MEMORY()
+ {
+ super("", 0, CompletionStatus.COMPLETED_NO);
+ }
+
+ /** Creates a NO_MEMORY exception with the specified minor
+ * code and completion status.
+ * @param minor additional error code.
+ * @param completed the method completion status.
+ */
+ public NO_MEMORY(int minor, CompletionStatus completed)
+ {
+ super("", minor, completed);
+ }
+
+ /**
+ * Created NO_MEMORY exception, providing full information.
+ * @param reason explaining message.
+ * @param minor additional error code (the "minor").
+ * @param completed the method completion status.
+ */
+ public NO_MEMORY(String reason, int minor, CompletionStatus completed)
+ {
+ super(reason, minor, completed);
+ }
+}
diff --git a/libjava/classpath/org/omg/CORBA/NO_PERMISSION.java b/libjava/classpath/org/omg/CORBA/NO_PERMISSION.java
new file mode 100644
index 00000000000..dbeaa33eb04
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/NO_PERMISSION.java
@@ -0,0 +1,96 @@
+/* NO_PERMISSION.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;
+
+import java.io.Serializable;
+
+/**
+ * Means that the caller has no rights to invoke the operation.
+ *
+ * @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
+ */
+public class NO_PERMISSION
+ extends SystemException
+ implements Serializable
+{
+ /**
+ * Use serialVersionUID for interoperability.
+ */
+ private static final long serialVersionUID = -1533969523582458479L;
+
+ /**
+ * Creates a NO_PERMISSION with the default minor code of 0,
+ * completion state COMPLETED_NO and the given explaining message.
+ * @param reasom the explaining message.
+ */
+ public NO_PERMISSION(String message)
+ {
+ super(message, 0, CompletionStatus.COMPLETED_NO);
+ }
+
+ /**
+ * Creates NO_PERMISSION with the default minor code of 0 and a
+ * completion state COMPLETED_NO.
+ */
+ public NO_PERMISSION()
+ {
+ super("", 0, CompletionStatus.COMPLETED_NO);
+ }
+
+ /** Creates a NO_PERMISSION exception with the specified minor
+ * code and completion status.
+ * @param minor additional error code.
+ * @param completed the method completion status.
+ */
+ public NO_PERMISSION(int minor, CompletionStatus completed)
+ {
+ super("", minor, completed);
+ }
+
+ /**
+ * Created NO_PERMISSION exception, providing full information.
+ * @param reason explaining message.
+ * @param minor additional error code (the "minor").
+ * @param completed the method completion status.
+ */
+ public NO_PERMISSION(String reason, int minor, CompletionStatus completed)
+ {
+ super(reason, minor, completed);
+ }
+}
diff --git a/libjava/classpath/org/omg/CORBA/NO_RESOURCES.java b/libjava/classpath/org/omg/CORBA/NO_RESOURCES.java
new file mode 100644
index 00000000000..262b8ce1a6b
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/NO_RESOURCES.java
@@ -0,0 +1,97 @@
+/* NO_RESOURCES.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;
+
+import java.io.Serializable;
+
+/**
+ * Means that the ORB has reached some general resource limitation like
+ * maximal number of the opened connections.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public class NO_RESOURCES
+ extends SystemException
+ implements Serializable
+{
+ /**
+ * Use serialVersionUID (v1.4) for interoperability.
+ */
+ private static final long serialVersionUID = 8129246118235803597L;
+
+ /**
+ * Creates a NO_RESOURCES with the default minor code of 0,
+ * completion state COMPLETED_NO and the given explaining message.
+ * @param reasom the explaining message.
+ */
+ public NO_RESOURCES(String message)
+ {
+ super(message, 0, CompletionStatus.COMPLETED_NO);
+ }
+
+ /**
+ * Creates NO_RESOURCES with the default minor code of 0 and a
+ * completion state COMPLETED_NO.
+ */
+ public NO_RESOURCES()
+ {
+ super("", 0, CompletionStatus.COMPLETED_NO);
+ }
+
+ /** Creates a NO_RESOURCES exception with the specified minor
+ * code and completion status.
+ * @param minor additional error code.
+ * @param completed the method completion status.
+ */
+ public NO_RESOURCES(int minor, CompletionStatus completed)
+ {
+ super("", minor, completed);
+ }
+
+ /**
+ * Created NO_RESOURCES exception, providing full information.
+ * @param reason explaining message.
+ * @param minor additional error code (the "minor").
+ * @param completed the method completion status.
+ */
+ public NO_RESOURCES(String reason, int minor, CompletionStatus completed)
+ {
+ super(reason, minor, completed);
+ }
+}
diff --git a/libjava/classpath/org/omg/CORBA/NO_RESPONSE.java b/libjava/classpath/org/omg/CORBA/NO_RESPONSE.java
new file mode 100644
index 00000000000..0c31cfbee78
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/NO_RESPONSE.java
@@ -0,0 +1,97 @@
+/* NO_RESPONSE.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;
+
+import java.io.Serializable;
+
+/**
+ * Means that the client attempts to retrieve the result that is not
+ * yet available.
+ *
+ * @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
+ */
+public class NO_RESPONSE
+ extends SystemException
+ implements Serializable
+{
+ /**
+ * Use serialVersionUID for interoperability.
+ */
+ private static final long serialVersionUID = 1971973765161647047L;
+
+ /**
+ * Creates a NO_RESPONSE with the default minor code of 0,
+ * completion state COMPLETED_NO and the given explaining message.
+ * @param reasom the explaining message.
+ */
+ public NO_RESPONSE(String message)
+ {
+ super(message, 0, CompletionStatus.COMPLETED_NO);
+ }
+
+ /**
+ * Creates NO_RESPONSE with the default minor code of 0 and a
+ * completion state COMPLETED_NO.
+ */
+ public NO_RESPONSE()
+ {
+ super("", 0, CompletionStatus.COMPLETED_NO);
+ }
+
+ /** Creates a NO_RESPONSE exception with the specified minor
+ * code and completion status.
+ * @param minor additional error code.
+ * @param completed the method completion status.
+ */
+ public NO_RESPONSE(int minor, CompletionStatus completed)
+ {
+ super("", minor, completed);
+ }
+
+ /**
+ * Created NO_RESPONSE exception, providing full information.
+ * @param reason explaining message.
+ * @param minor additional error code (the "minor").
+ * @param completed the method completion status.
+ */
+ public NO_RESPONSE(String reason, int minor, CompletionStatus completed)
+ {
+ super(reason, minor, completed);
+ }
+}
diff --git a/libjava/classpath/org/omg/CORBA/NVList.java b/libjava/classpath/org/omg/CORBA/NVList.java
new file mode 100644
index 00000000000..af1241ada7d
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/NVList.java
@@ -0,0 +1,117 @@
+/* NVList.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;
+
+import org.omg.CORBA.Any;
+import org.omg.CORBA.Bounds;
+import org.omg.CORBA.NamedValue;
+
+/**
+ * The named value list, used to define the parameters in the
+ * {@link org.omg.CORBA.Request}. This class is also
+ * used to hold the values of {@link Context}.
+ *
+ * @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
+ */
+public abstract class NVList
+{
+ /**
+ * Create and add a new named value object with null name,
+ * null value and having given flags.
+ * @param a_flags the flags, the normally expected values are
+ * {@link org.omg.CORBA.ARG_IN#value},
+ * {@link org.omg.CORBA.ARG_OUT#value} and
+ * {@link org.omg.CORBA.ARG_INOUT#value} or 0.
+ *
+ * @return the created and added value.
+ */
+ public abstract NamedValue add(int a_flags);
+
+ /**
+ * Create and add the new named value object with the given
+ * names, given flags and the null value.
+ * @param a_name the name
+ * @param a_flags the flags, the normally expected values are
+ * {@link org.omg.CORBA.ARG_IN#value},
+ * {@link org.omg.CORBA.ARG_OUT#value} and
+ * {@link org.omg.CORBA.ARG_INOUT#value} or 0.
+ *
+ * @return the created and added value.
+ */
+ public abstract NamedValue add_item(String a_name, int a_flags);
+
+ /**
+ * Create and add the named value object with the given name,
+ * value and flags.
+ * @param a_name the name
+ * @param a_value the value
+ * @param a_flags the flags, the normally expected values are
+ * {@link org.omg.CORBA.ARG_IN#value},
+ * {@link org.omg.CORBA.ARG_OUT#value} and
+ * {@link org.omg.CORBA.ARG_INOUT#value} or 0.
+ *
+ * @return the created object.
+ */
+ public abstract NamedValue add_value(String a_name, Any a_value, int a_flags);
+
+ /**
+ * Get the number of the present named value pairs.
+ *
+ * @return the number of objects in the list.
+ */
+ public abstract int count();
+
+ /**
+ * Get the item at the given index
+ * @param at the index.
+ *
+ * @return the item at the index
+ * @throws Bounds if the index is out of bounds.
+ */
+ public abstract NamedValue item(int at)
+ throws Bounds;
+
+ /**
+ * Remove the item at the given index
+ * @param at the index
+ * @throws Bounds if the index is out of bounds.
+ */
+ public abstract void remove(int at)
+ throws Bounds;
+}
diff --git a/libjava/classpath/org/omg/CORBA/NameValuePair.java b/libjava/classpath/org/omg/CORBA/NameValuePair.java
new file mode 100644
index 00000000000..a447c6f7b19
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/NameValuePair.java
@@ -0,0 +1,90 @@
+/* NameValuePair.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;
+
+import org.omg.CORBA.portable.IDLEntity;
+
+import java.io.Serializable;
+
+/**
+ * Holds the value, having the given name(id). This class is used by
+ * with {@link DynStruct} to name the fields of the record (structure).
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public final class NameValuePair
+ implements Serializable, IDLEntity
+{
+ /**
+ * The value of the structure record.
+ */
+ public Any value;
+
+ /**
+ * Use serialVersionUID (v1.4) for interoperability.
+ */
+ private static final long serialVersionUID = 7000741877654946223L;
+
+ /**
+ * The name of the structure record.
+ */
+ public String id;
+
+ /**
+ * Cretes an unitialised instance of the name-value pair.
+ */
+ public NameValuePair()
+ {
+ }
+
+ /**
+ * Creates the name-value pair, initialising the fields to the passed
+ * values.
+ *
+ * @param an_id the name (also called id) of the name-value pair, normally
+ * the name of the structure field.
+ *
+ * @param a_value the value of the name-value pair.
+ */
+ public NameValuePair(String an_id, Any a_value)
+ {
+ id = an_id;
+ value = a_value;
+ }
+}
diff --git a/libjava/classpath/org/omg/CORBA/NameValuePairHelper.java b/libjava/classpath/org/omg/CORBA/NameValuePairHelper.java
new file mode 100644
index 00000000000..f40e570a79b
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/NameValuePairHelper.java
@@ -0,0 +1,141 @@
+/* NameValuePairHelper.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;
+
+import gnu.CORBA.DynAn.NameValuePairHolder;
+import gnu.CORBA.aliasTypeCode;
+import gnu.CORBA.primitiveTypeCode;
+import gnu.CORBA.stringTypeCode;
+
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+
+/**
+ * The helper operations for {@link NameValuePair}.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public abstract class NameValuePairHelper
+{
+ /**
+ * The {@link NameValuePair} repository id,
+ * 'IDL:omg.org/CORBA/NameValuePair:1.0'.
+ */
+ private static String _id = "IDL:omg.org/CORBA/NameValuePair:1.0";
+
+ /**
+ * The cached type code value.
+ */
+ private static TypeCode typeCode;
+
+ /**
+ * Extract the NameValuePair from the given {@link Any}.
+ */
+ public static NameValuePair extract(Any a)
+ {
+ try
+ {
+ return ((NameValuePairHolder) a.extract_Streamable()).value;
+ }
+ catch (ClassCastException ex)
+ {
+ throw new BAD_OPERATION("NameValuePair expected");
+ }
+ }
+
+ /**
+ * Return the NameValuePair repository id.
+ */
+ public static String id()
+ {
+ return _id;
+ }
+
+ /**
+ * Insert the NameValuePair into the given {@link Any}.
+ */
+ public static void insert(Any a, NameValuePair that)
+ {
+ a.insert_Streamable(new NameValuePairHolder(that));
+ }
+
+ /**
+ * Read the NameValuePair from the given CDR stream. First reads the
+ * name (id) as string, then the value as {@link Any}.
+ */
+ public static NameValuePair read(InputStream istream)
+ {
+ NameValuePair p = new NameValuePair();
+ p.id = istream.read_string();
+ p.value = istream.read_any();
+ return p;
+ }
+
+ /**
+ * Create the type code for the name value pair.
+ */
+ public static TypeCode type()
+ {
+ if (typeCode == null)
+ {
+ StructMember[] members = new StructMember[ 2 ];
+
+ TypeCode t_id =
+ new aliasTypeCode(new stringTypeCode(TCKind.tk_string), "", "id");
+
+ members [ 0 ] = new StructMember("id", t_id, null);
+
+ members [ 1 ] =
+ new StructMember("value", new primitiveTypeCode(TCKind.tk_any), null);
+
+ typeCode = ORB.init().create_struct_tc(id(), "NameValuePair", members);
+ }
+ return typeCode;
+ }
+
+ /**
+ * Write the exception to the CDR output stream. First writes the
+ * name (id), then the value as {@link Any}.
+ */
+ public static void write(OutputStream ostream, NameValuePair value)
+ {
+ ostream.write_string(value.id);
+ ostream.write_any(value.value);
+ }
+}
diff --git a/libjava/classpath/org/omg/CORBA/NamedValue.java b/libjava/classpath/org/omg/CORBA/NamedValue.java
new file mode 100644
index 00000000000..492c854b7b8
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/NamedValue.java
@@ -0,0 +1,71 @@
+/* NamedValue.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;
+
+/**
+ * The class is used to describe a call parameter, having name,
+ * value and the passing mode flags ({@link ARG_IN}, {@link ARG_OUT} or
+ * {@link ARG_INOUT}. The same class is also used in {@link Context} to
+ * pass the property names and values. This class is normally created by
+ * {@link ORB#create_named_value(String, Any, int)}.
+ *
+ * @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
+ */
+public abstract class NamedValue
+{
+ /**
+ * Get the parameter flags.
+ * @return normally one of ({@link ARG_IN}, {@link ARG_OUT} or
+ * {@link ARG_INOUT}).
+ */
+ public abstract int flags();
+
+ /**
+ * Get the name of this parameter.
+ * @return the name of this instance.
+ */
+ public abstract String name();
+
+ /**
+ * Get the value of this parameter. The parameter value is wrapped into
+ * the instance of {@link Any}.
+ *
+ * @return the value of this parameter.
+ */
+ public abstract Any value();
+}
diff --git a/libjava/classpath/org/omg/CORBA/OBJECT_NOT_EXIST.java b/libjava/classpath/org/omg/CORBA/OBJECT_NOT_EXIST.java
new file mode 100644
index 00000000000..aa8571dcb41
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/OBJECT_NOT_EXIST.java
@@ -0,0 +1,95 @@
+/* OBJECT_NOT_EXIST.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;
+
+import java.io.Serializable;
+
+/**
+ * Means an attempt to perform some operation of the deleted object.
+ * @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
+ */
+public class OBJECT_NOT_EXIST
+ extends SystemException
+ implements Serializable
+{
+ /**
+ * Use serialVersionUID for interoperability.
+ */
+ private static final long serialVersionUID = 7226958015420512389L;
+
+ /**
+ * Creates a OBJECT_NOT_EXIST with the default minor code of 0,
+ * completion state COMPLETED_NO and the given explaining message.
+ * @param reasom the explaining message.
+ */
+ public OBJECT_NOT_EXIST(String message)
+ {
+ super(message, 0, CompletionStatus.COMPLETED_NO);
+ }
+
+ /**
+ * Creates OBJECT_NOT_EXIST with the default minor code of 0 and a
+ * completion state COMPLETED_NO.
+ */
+ public OBJECT_NOT_EXIST()
+ {
+ super("", 0, CompletionStatus.COMPLETED_NO);
+ }
+
+ /** Creates a OBJECT_NOT_EXIST exception with the specified minor
+ * code and completion status.
+ * @param minor additional error code.
+ * @param completed the method completion status.
+ */
+ public OBJECT_NOT_EXIST(int minor, CompletionStatus completed)
+ {
+ super("", minor, completed);
+ }
+
+ /**
+ * Created OBJECT_NOT_EXIST exception, providing full information.
+ * @param reason explaining message.
+ * @param minor additional error code (the "minor").
+ * @param completed the method completion status.
+ */
+ public OBJECT_NOT_EXIST(String reason, int minor, CompletionStatus completed)
+ {
+ super(reason, minor, completed);
+ }
+}
diff --git a/libjava/classpath/org/omg/CORBA/OBJ_ADAPTER.java b/libjava/classpath/org/omg/CORBA/OBJ_ADAPTER.java
new file mode 100644
index 00000000000..36c54b28662
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/OBJ_ADAPTER.java
@@ -0,0 +1,96 @@
+/* OBJ_ADAPTER.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;
+
+import java.io.Serializable;
+
+/**
+ * This exception typically indicates an administrative mismatch.
+ *
+ * @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
+ */
+public class OBJ_ADAPTER
+ extends SystemException
+ implements Serializable
+{
+ /**
+ * Use serialVersionUID for interoperability.
+ */
+ private static final long serialVersionUID = -1516541344234786928L;
+
+ /**
+ * Creates a OBJ_ADAPTER with the default minor code of 0,
+ * completion state COMPLETED_NO and the given explaining message.
+ * @param reasom the explaining message.
+ */
+ public OBJ_ADAPTER(String message)
+ {
+ super(message, 0, CompletionStatus.COMPLETED_NO);
+ }
+
+ /**
+ * Creates OBJ_ADAPTER with the default minor code of 0 and a
+ * completion state COMPLETED_NO.
+ */
+ public OBJ_ADAPTER()
+ {
+ super("", 0, CompletionStatus.COMPLETED_NO);
+ }
+
+ /** Creates a OBJ_ADAPTER exception with the specified minor
+ * code and completion status.
+ * @param minor additional error code.
+ * @param completed the method completion status.
+ */
+ public OBJ_ADAPTER(int minor, CompletionStatus completed)
+ {
+ super("", minor, completed);
+ }
+
+ /**
+ * Created OBJ_ADAPTER exception, providing full information.
+ * @param reason explaining message.
+ * @param minor additional error code (the "minor").
+ * @param completed the method completion status.
+ */
+ public OBJ_ADAPTER(String reason, int minor, CompletionStatus completed)
+ {
+ super(reason, minor, completed);
+ }
+}
diff --git a/libjava/classpath/org/omg/CORBA/OMGVMCID.java b/libjava/classpath/org/omg/CORBA/OMGVMCID.java
new file mode 100644
index 00000000000..6c7b30810ef
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/OMGVMCID.java
@@ -0,0 +1,54 @@
+/* OMGVMCID.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+package org.omg.CORBA;
+
+/**
+ * Holds a single constant, specifying, that
+ * The vendor minor code ID reserved for the Object Management Group
+ * (http://www.omg.org).
+ *
+ * @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
+ */
+public interface OMGVMCID
+{
+ /**
+ * The vendor minor code ID (1330446336) reserved for the Object
+ * Management Group (http://www.omg.org).
+ */
+ int value = 1330446336;
+}
diff --git a/libjava/classpath/org/omg/CORBA/ORB.java b/libjava/classpath/org/omg/CORBA/ORB.java
new file mode 100644
index 00000000000..5f10fba37c3
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/ORB.java
@@ -0,0 +1,1101 @@
+/* ORB.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;
+
+import gnu.CORBA.Restricted_ORB;
+import gnu.CORBA.primitiveTypeCode;
+import gnu.CORBA.fixedTypeCode;
+import gnu.CORBA.generalTypeCode;
+import gnu.CORBA.gnuContext;
+import gnu.CORBA.recordTypeCode;
+import gnu.CORBA.recursiveTypeCode;
+
+import org.omg.CORBA.ORBPackage.InconsistentTypeCode;
+
+import java.applet.Applet;
+
+import java.io.BufferedInputStream;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+
+import java.util.Properties;
+
+/**
+ * A central class in CORBA implementation, responsible for sending and
+ * handling remote invocations. ORB also works as a factory for
+ * creating instances of certain CORBA classes.
+ *
+ * Despite the core library contains the fully working CORBA implementation,
+ * it also provides a simple way to plug-in the alternative CORBA support.
+ * This is done by replacing the ORB. The alternative ORB can be specified
+ * via properties, passed to ORB.Init(...).
+ *
+ * When creating an ORB instance, the class name
+ * is searched in the following locations:
+ * <p>
+ * 1. Applet parameter or application string array, if any.<br>
+ * 2. The properties parameter, if any.<br>
+ * 3. The System properties.<br>
+ * 4. The orb.properties file located in the user.home directory (if any).<br>
+ * 5. The orb.properties file located in the java.home/lib directory (if any).
+ * </p>
+ *
+ * The supported properties are:
+ * <table border="1">
+ * <tr><td> org.omg.CORBA.ORBClass</td><td>The class,
+ * implementing the functional ORB, returned by
+ * {@link #init(Applet, Properties)} or
+ * {@link #init(String[], Properties)} </td></tr>
+ * <tr><td>org.omg.CORBA.ORBSingletonClass</td><td>The class,
+ * implementing the restricted ORB, returned by
+ * {@link #init()}.
+ * </td></tr>
+ * <tr><td>org.omg.CORBA.ORBInitRef</td><td>Specifies the
+ * initial reference, accessible by name with the method
+ * {@link resolve_initial_references(String)}.
+ * </table>
+ * The command line accepts the same properties as a keys. When specifying
+ * in the command line, the prefix org.omg.CORBA can be omitted,
+ * for instance<code> -ORBInitRef NameService=IOR:aabbccdd....</code>
+ *
+ * @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
+ */
+public abstract class ORB
+{
+ /**
+ * By default, {@link init(String[], Properties)} and
+ * {@link init(Applet, Properties} return
+ * the built-in fully functional ORB is returned. If the
+ * <code>props</code> contains the property org.omg.CORBA.ORBClass,
+ * the value of this property is used as a class name to instantiate
+ * a user-defined ORB.
+ */
+ private static final String FUNCTIONAL_ORB = "org.omg.CORBA.ORBClass";
+
+ /**
+ * The name of the restricted ORB property.
+ */
+ private static final String RESTRICTED_ORB =
+ "org.omg.CORBA.ORBSingletonClass";
+
+ /**
+ * The class, implementing the default fully functional ORB.
+ */
+ private static final String DEFAULT_FUNCTIONAL_ORB = "gnu.CORBA.Functional_ORB";
+
+ /**
+ * The class, implementing the default restricted ORB.
+ */
+ private static final String DEFAULT_RESTRICTED_ORB = "gnu.CORBA.Restricted_ORB";
+
+
+ /**
+ * Connect the given CORBA object to this ORB. After the object is
+ * connected, it starts receiving remote invocations via this ORB.
+ *
+ * The OMG group recommends to use Portable Object Adapter (POA) instead
+ * of calling this method.
+ *
+ * This method is implemented in the derived Gnu Classpah classes,
+ * returned by ORB.init(..). In this abstract class, the implementation
+ * just throws {@link NO_IMPLEMENT}.
+ *
+ * @param object the org.omg.CORBA.Object to connect.
+ */
+ public void connect(org.omg.CORBA.Object object)
+ {
+ throw new NO_IMPLEMENT();
+ }
+
+ /**
+ * Disconnect the given CORBA object from this ORB. The object will be
+ * no longer receiving the remote invocations. In response to the
+ * remote invocation on this object, the ORB will send the
+ * exception {@link OBJECT_NOT_EXIST}. The object, however, is not
+ * destroyed and can receive the local invocations.
+ *
+ * This method is implemented in the derived Gnu Classpah classes,
+ * returned by ORB.init(..). In this abstract class, the implementation
+ * just throws {@link NO_IMPLEMENT}.
+ *
+ * @param object the object to disconnect.
+ */
+ public void disconnect(org.omg.CORBA.Object object)
+ {
+ throw new NO_IMPLEMENT();
+ }
+
+
+ /**
+ * Create alias typecode for the given typecode.
+ */
+ public abstract TypeCode create_alias_tc(String id, String name,
+ TypeCode typecode
+ );
+
+ /**
+ * Create an instance of the CORBA {@link Any} with the type, intialised
+ * to {@link TCKind#tc_null}
+ */
+ public abstract Any create_any();
+
+ /**
+ * Create a typecode, defining an array of the given elements.
+ *
+ * @param length the size of array
+ * @param element_type the array component type.
+ *
+ * @return the corresponding typecode.
+ */
+ public abstract TypeCode create_array_tc(int length, TypeCode element_type);
+
+ /**
+ * Creates an empty CORBA <code>ContextList</code>.
+ *
+ * @return the newly created context list.
+ */
+ public abstract ContextList create_context_list();
+
+ /**
+ * The support for {@link DynAny} and derived interfaces
+ * has never been implemented in Sun's java releases,
+ * at least till v1.4 inclusive.
+ *
+ * Since v1.4 this stil missing implementation was replaced
+ * by the new DynamicAny package.
+ *
+ * @throws NO_IMPLEMENT, always.
+ */
+ public DynAny create_basic_dyn_any(org.omg.CORBA.TypeCode t)
+ throws InconsistentTypeCode
+ {
+ throw new NO_IMPLEMENT();
+ };
+
+ /**
+ * The support for {@link DynAny} and derived interfaces
+ * has never been implemented in Sun's java releases,
+ * at least till v1.4 inclusive.
+ *
+ * Since v1.4 this stil missing implementation was replaced
+ * by the new DynamicAny package.
+ *
+ * @throws NO_IMPLEMENT, always.
+ */
+ public DynAny create_dyn_any(org.omg.CORBA.Any a)
+ {
+ throw new NO_IMPLEMENT();
+ };
+
+ /**
+ * The support for {@link DynArray}
+ * has never been implemented in Sun's java releases,
+ * at least till v1.4 inclusive.
+ *
+ * Since v1.4 this stil missing implementation was replaced
+ * by the new DynamicAny package.
+ *
+ * @throws NO_IMPLEMENT, always.
+ */
+ public DynArray create_dyn_array(org.omg.CORBA.TypeCode t)
+ throws InconsistentTypeCode
+ {
+ throw new NO_IMPLEMENT();
+ };
+
+ /**
+ * The support for {@link DynEnum}
+ * has never been implemented in Sun's java releases,
+ * at least till v1.4 inclusive.
+ *
+ * Since v1.4 this stil missing implementation was replaced
+ * by the new DynamicAny package.
+ *
+ * @throws NO_IMPLEMENT, always.
+ */
+ public DynEnum create_dyn_enum(org.omg.CORBA.TypeCode t)
+ throws InconsistentTypeCode
+ {
+ throw new NO_IMPLEMENT();
+ };
+
+ /**
+ * The support for {@link DynSequence}
+ * has never been implemented in Sun's java releases,
+ * at least till v1.4 inclusive.
+ *
+ * Since v1.4 this stil missing implementation was replaced
+ * by the new DynamicAny package.
+ *
+ * @throws NO_IMPLEMENT, always.
+ */
+ public DynSequence create_dyn_sequence(org.omg.CORBA.TypeCode t)
+ throws InconsistentTypeCode
+ {
+ throw new NO_IMPLEMENT();
+ };
+
+ /**
+ * The support for {@link DynStruct} and derived interfaces
+ * has never been implemented in Sun's java releases,
+ * at least till v1.4 inclusive.
+ *
+ * Since v1.4 this stil missing implementation was replaced
+ * by the new DynamicAny package.
+ *
+ * @throws NO_IMPLEMENT, always.
+ */
+ public DynStruct create_dyn_struct(org.omg.CORBA.TypeCode t)
+ throws InconsistentTypeCode
+ {
+ throw new NO_IMPLEMENT();
+ };
+
+ /**
+ * The support for {@link DynUnion} and derived interfaces
+ * has never been implemented in Sun's java releases,
+ * at least till v1.4 inclusive.
+ *
+ * Since v1.4 this stil missing implementation was replaced
+ * by the new DynamicAny package.
+ *
+ * @throws NO_IMPLEMENT, always.
+ */
+ public DynUnion create_dyn_union(org.omg.CORBA.TypeCode t)
+ throws InconsistentTypeCode
+ {
+ throw new NO_IMPLEMENT();
+ };
+
+ /**
+ * Create a typecode, defining the given enumeration.
+ *
+ * @param id the id.
+ * @param name the name.
+ * @param members the memebers
+ * @return the created enumeration.
+ */
+ public abstract TypeCode create_enum_tc(String id, String name,
+ String[] members
+ );
+
+ /**
+ * Create an environment (container for exceptions).
+ *
+ * @return the created container.
+ */
+ public abstract Environment create_environment();
+
+ /**
+ * Creates an empty exception list.
+ *
+ * @return the newly created list.
+ */
+ public abstract ExceptionList create_exception_list();
+
+ /**
+ * Create the exception typecode.
+ *
+ * @param id the id of exception.
+ * @param name the name of exception.
+ * @param members the members of exception.
+ */
+ public abstract TypeCode create_exception_tc(String id, String name,
+ StructMember[] members
+ );
+
+ /**
+ * Creates a TypeCode object for CORBA <code>fixed</code> that is
+ * mapped to java {@link java.math.BigDecimal}.
+ *
+ * @param digits the number of digits in that <code>fixed</code>.
+ * @param scale the number of digits after the decimal point.
+ *
+ * @return the corresponding TypeCode.
+ */
+ public TypeCode create_fixed_tc(short digits, short scale)
+ {
+ fixedTypeCode r = new fixedTypeCode();
+ r.setDigits(digits);
+ r.setScale(scale);
+ return r;
+ }
+
+ /**
+ * Creates a typecode, representing the IDL interface.
+ *
+ * @param id the interface repository id.
+ * @param name the interface name.
+ *
+ * @return the created typecode.
+ */
+ public abstract TypeCode create_interface_tc(String id, String name);
+
+ /**
+ * Create an instance of a new {@link NVList}.
+ *
+ * @param count the initial size of the list. If more elements are added,
+ * the list automatically expands.
+ *
+ * @return the created list.
+ */
+ public abstract NVList create_list(int count);
+
+ /**
+ * Create a new named value.
+ *
+ * @param name the name of the named value
+ * @param any the content of the named value.
+ * @param flags the flags of the named value
+ *
+ * @return the named value.
+ */
+ public abstract NamedValue create_named_value(String s, Any any, int flags);
+
+ /**
+ * Send multiple prepared requests one way, do not caring about the answer.
+ * The messages, containing requests, will be marked, indicating that
+ * the sender is not expecting to get a reply.
+ *
+ * @param requests the prepared array of requests.
+ *
+ * @see Request#send_oneway()
+ */
+ public abstract void send_multiple_requests_oneway(Request[] requests);
+
+ /**
+ * Send multiple prepared requests expecting to get a reply. All requests
+ * are send in parallel, each in its own separate thread. When the
+ * reply arrives, it is stored in the agreed fields of the corresponing
+ * request data structure. If this method is called repeatedly,
+ * the new requests are added to the set of the currently sent requests,
+ * but the old set is not discarded.
+ *
+ * @param requests the prepared array of requests.
+ *
+ * @see #poll_next_response()
+ * @see #get_next_response()
+ * @see Request#send_deferred()
+ */
+ public abstract void send_multiple_requests_deferred(Request[] requests);
+
+ /**
+ * Find if any of the requests that have been previously sent with
+ * {@link #send_multiple_requests_deferred}, have a response yet.
+ *
+ * @return true if there is at least one response to the previously
+ * sent request, false otherwise.
+ */
+ public abstract boolean poll_next_response();
+
+ /**
+ * Get the next instance with a response being received. If all currently
+ * sent responses not yet processed, this method pauses till at least one of
+ * them is complete. If there are no requests currently sent, the method
+ * pauses till some request is submitted and the response is received.
+ * This strategy is identical to the one accepted by Suns 1.4 ORB
+ * implementation.
+ *
+ * @return the previously sent request that now contains the received
+ * response.
+ *
+ * @throws WrongTransaction If the method was called from the transaction
+ * scope different than the one, used to send the request. The exception
+ * can be raised only if the request is implicitly associated with some
+ * particular transaction.
+ */
+ public abstract Request get_next_response()
+ throws WrongTransaction;
+
+
+ /**
+ * Create a new CDR output stream, where the parameter values can be written
+ * during the method invocation.
+ *
+ * @return a stream to write values into.
+ */
+ public abstract org.omg.CORBA.portable.OutputStream create_output_stream();
+
+ /**
+ * This should create the list, initialised with the argument descriptions
+ * for the given operation definition (CORBA <code>OperationDef</code>).
+ * The information should be obtained from the interface repository.
+ * However this method is oficially documented as not implemented at least
+ * till v1.4 inclusive.
+ *
+ * @param peration_definition the operation definition, must be
+ * CORBA <code>OperationDef</code>.
+ *
+ * @return never
+ *
+ * @throws NO_IMPLEMENT, always.
+ */
+ public NVList create_operation_list(Object operation_definition)
+ {
+ throw new NO_IMPLEMENT();
+ }
+
+ /**
+ * This should create the new policy with the specified type and initial
+ * state. The policies and methods for getting them are not implemented till
+ * v1.4 inclusive.
+ *
+ * @param type the policy type.
+ * @param value the policy value.
+ *
+ * @return never
+ *
+ * @throws NO_IMPLEMENT, always.
+ */
+ public Policy create_policy(int type, Any value)
+ throws PolicyError
+ {
+ throw new NO_IMPLEMENT();
+ }
+
+
+
+ /**
+ * Create typecode, defining the sequence of the elements, having
+ * the given type.
+ *
+ * @param bound the maximal length of the sequence, 0 if not restricted.
+ *
+ * @param element_type the sequence element type.
+ *
+ * @return the typecode.
+ */
+ public abstract TypeCode create_sequence_tc(int bound, TypeCode element_type);
+
+ /**
+ * Create a TypeCode, representing the CORBA <code>string</code>.
+ *
+ * @param bound the maximal length of the string, 0 is unlimited.
+ *
+ * @return the corresponding string typecode.
+ */
+ public abstract TypeCode create_string_tc(int bound);
+
+ /**
+ * Create the typecode, defining the given IDL structure.
+ *
+ * The TypeCode object is initialized with the given id, name, and members.
+ * @param id the Id of this type.
+ * @param the name of this type.
+ * @param members the member list.
+ *
+ * @return the typecode.
+ */
+ public abstract TypeCode create_struct_tc(String id, String name,
+ StructMember[] members
+ );
+
+ /**
+ * Create the typecode, defining the given IDL union.
+ *
+ * The TypeCode object is initialized with the given id, name, discriminator
+ * and members.
+ *
+ * @param id the Id of this type.
+ * @param the name of this type.
+ * @param discriminator the union discriminator.
+ * @param members the member list.
+ *
+ * @return the typecode.
+ */
+ public abstract TypeCode create_union_tc(String id, String name,
+ TypeCode discriminator,
+ UnionMember[] members
+ );
+
+ /**
+ * Create a TypeCode, representing the CORBA <code>wstring</code>.
+ *
+ * @param bound the maximal length of the string, 0 is unlimited.
+ *
+ * @return the corresponding string typecode.
+ */
+ public abstract TypeCode create_wstring_tc(int bound);
+
+
+ /**
+ * Create a typecode for an abstract interface. The abstract interface
+ * can be either CORBA object or CORBA value type.
+ *
+ * @param id the id of the abstract interface.
+ * @param name the name of the abstract interface.
+ *
+ * @return the created typecode.
+ */
+ public TypeCode create_abstract_interface_tc(String id, String name)
+ {
+ generalTypeCode t = new generalTypeCode(TCKind.tk_abstract_interface);
+ t.setName(name);
+ t.setId(id);
+ return t;
+ }
+
+ /**
+ * Create a typecode for a native interface.
+ *
+ * @param id the id of the native interface.
+ * @param name the name of the native interface.
+ *
+ * @return the created typecode.
+ */
+ public TypeCode create_native_tc(String id, String name)
+ {
+ generalTypeCode t = new generalTypeCode(TCKind.tk_native);
+ t.setName(name);
+ t.setId(id);
+ return t;
+ }
+
+ /**
+ * Create a typecode, representing a tree-like structure.
+ * This structure contains a member that is a sequence of the same type,
+ * as the structure itself. You can imagine as if the folder definition
+ * contains a variable-length array of the enclosed (nested) folder
+ * definitions. In this way, it is possible to have a tree like
+ * structure that can be transferred via CORBA CDR stream.
+ *
+ * @deprecated It is easier and clearler to use a combination of
+ * create_recursive_tc and create_sequence_tc instead.
+ *
+ * @param bound the maximal expected number of the nested components
+ * on each node; 0 if not limited.
+ *
+ * @param offset the position of the field in the returned structure
+ * that contains the sequence of the structures of the same field.
+ * The members before this field are intialised using parameterless
+ * StructMember constructor.
+ *
+ * @return a typecode, defining a stucture, where a member at the
+ * <code>offset</code> position defines an array of the identical
+ * structures.
+ *
+ * @see #create_recursive_tc(String)
+ * @see #create_sequence_tc(int, TypeCode)
+ */
+ public TypeCode create_recursive_sequence_tc(int bound, int offset)
+ {
+ recordTypeCode r = new recordTypeCode(TCKind.tk_struct);
+ for (int i = 0; i < offset; i++)
+ r.add(new StructMember());
+
+ TypeCode recurs = new primitiveTypeCode(TCKind.tk_sequence);
+
+ r.add(new StructMember("", recurs, null));
+ return r;
+ }
+
+ /**
+ * Create a typecode which serves as a placeholder for typcode, containing
+ * recursion.
+ *
+ * @param id the id of the recursive typecode, for that this typecode
+ * serves as a placeholder.
+ */
+ public TypeCode create_recursive_tc(String id)
+ {
+ return new recursiveTypeCode(id);
+ }
+
+ /**
+ * Create value box typecode.
+ */
+ public TypeCode create_value_box_tc(String id, String name,
+ TypeCode boxed_type
+ )
+ {
+ generalTypeCode t = new generalTypeCode(TCKind.tk_value_box);
+ t.setName(name);
+ t.setId(id);
+ t.setContentType(boxed_type);
+ return t;
+ }
+
+ /**
+ * Create IDL value type code.
+ */
+ public TypeCode create_value_tc(String id, String name, short type_modifier,
+ TypeCode concrete_base, ValueMember[] members
+ )
+ {
+ recordTypeCode r = new recordTypeCode(TCKind.tk_value);
+ r.setId(id);
+ r.setName(name);
+ r.setTypeModifier(type_modifier);
+ r.setConcreteBase_type(concrete_base);
+
+ for (int i = 0; i < members.length; i++)
+ {
+ r.add(members [ i ]);
+ }
+
+ return r;
+ }
+
+ /**
+ * This should return the information, related to the current thread.
+ * The {@link Current} is very general interface, with no fields and
+ * operations defined. This method is not implemented in Suns
+ * releases at least till v1.4 inclusive.
+ *
+ * @deprecated since 1.2
+ *
+ * @return never
+ *
+ * @throws NO_IMPLEMENT, always.
+ */
+ public Current get_current()
+ {
+ throw new NO_IMPLEMENT();
+ }
+
+ /**
+ * This should return the information about the CORBA facilities and
+ * services, available from this ORB. However this method is oficially
+ * documented as not implemented at least till v1.4 inclusive.
+ *
+ * @param service_type a type of the service being requested. The OMG
+ * specification currently defines only one value, 1, for security
+ * related services.
+ *
+ * @param service_info a holder, where the returned information should
+ * be stored.
+ *
+ * @return should return true if the service information is available
+ * from the ORB, but this method never returns.
+ *
+ * @throws NO_IMPLEMENT, always.
+ */
+ public boolean get_service_information(short service_type,
+ ServiceInformationHolder service_info)
+ {
+ throw new NO_IMPLEMENT();
+ }
+
+ /**
+ * Get the default context of this ORB. This is an initial root of all
+ * contexts.
+ *
+ * The default method returns a new context with the empty name and
+ * no parent context.
+ *
+ * @return the default context of this ORB.
+ *
+ * @throws NO_IMPLEMENT for the Singleton ORB, returned by
+ * the parameterless {@link init()}.
+ */
+ public Context get_default_context()
+ {
+ return new gnuContext("", null);
+ }
+
+ /**
+ * Return thg typecode, representing the given primitive object type.
+ *
+ * @param the kind of the primitive typecode.
+ *
+ * @return the typecode of the primitve typecode.
+ */
+ public abstract TypeCode get_primitive_tc(TCKind tcKind);
+
+ /**
+ * Returns so-called Singleton ORB, a highly restricted version
+ * that cannot communicate over network. This ORB is provided
+ * for the potentially malicious applets with heavy security restrictions.
+ *
+ * The returned Singleton ORB can only create typecodes,
+ * {@link Any}, {@link ContextList}, {@link NVList} and
+ * {@link org.omg.CORBA.portable.OutputStream} that writes to an
+ * internal buffer.
+ *
+ * All other methods throw the {@link NO_IMPLEMENT} exception, additionally
+ * printing the error message about the potential attempt to violate
+ * the security rules.
+ *
+ * The implementing ORB class, used in this method, is found as described
+ * in the header.
+ *
+ * @return the working derivative of ORB, implementing the methods
+ * of this abstract class.
+ */
+ public static ORB init()
+ {
+ String orb_cn = getORBName(null, RESTRICTED_ORB);
+ if (orb_cn == null)
+ return Restricted_ORB.Singleton;
+ else
+ return createORB(null, orb_cn);
+ }
+
+ /**
+ * Creates the working instance of ORB for an applet.
+ *
+ * By default the built-in fully functional ORB is returned. The ORB class
+ * is found as described in the header of this class.
+ *
+ * @param applet the applet. The property org.omg.CORBA.ORBClass,
+ * if present, defines the used ORB implementation class. If this
+ * property is not present, the ORB class is found as described in the
+ * class header.
+ *
+ * @param props the properties, may be <code>null</code>.
+ *
+ * @return a newly created functional derivative of this abstract class.
+ */
+ public static ORB init(Applet applet, Properties props)
+ {
+ String ocn = applet.getParameter(FUNCTIONAL_ORB);
+ ORB orb = createORB(props, ocn);
+ orb.set_parameters(applet, props);
+
+ return orb;
+ }
+
+ /**
+ * Creates the working instance of ORB for a
+ * standalone application.
+ *
+ * By default the built-in fully functional ORB is returned. The ORB class
+ * is found as described in the header of this class.
+ *
+ * @param the parameters, passed to the applications
+ * <code>main(String[] args)</code> method, may be <code>null</code>.
+ * The parameter -org.omg.CORBA.ORBClass <class name>
+ * if present, defines the used ORB implementation class. If this
+ * property is not present, the ORB class is found as described in the
+ * class header.
+
+ *
+ * @param props application specific properties, may be <code>null</code>.
+ *
+ * @return a newly created functional derivative of this abstract class.
+ */
+ public static ORB init(String[] args, Properties props)
+ {
+ String ocn = null;
+
+ String orbKey = "-" + FUNCTIONAL_ORB;
+
+ if (args != null)
+ if (args.length >= 2)
+ {
+ for (int i = 0; i < args.length - 1; i++)
+ {
+ if (args [ i ].equals(orbKey))
+ ocn = args [ i + 1 ];
+ }
+ }
+
+ ORB orb = createORB(props, ocn);
+
+ orb.set_parameters(args, props);
+ return orb;
+ }
+
+ /**
+ * List the initially available CORBA objects (services).
+ *
+ * @return a list of services.
+ *
+ * @see resolve_initial_references(String)
+ */
+ public abstract String[] list_initial_services();
+
+ /**
+ * Find and return the easily accessible CORBA object, addressed
+ * by name. The returned object is typically casted to the more
+ * specific reference using the <code>narrow(Object)</code> method
+ * of its helper.
+ *
+ * @param name the object name.
+ * @return the object
+ * @throws org.omg.CORBA.ORBPackage.InvalidName if the given name
+ * is not associated with the known object.
+ */
+ public abstract Object resolve_initial_references(String name)
+ throws org.omg.CORBA.ORBPackage.InvalidName;
+
+ /**
+ * Get the IOR reference string for the given object.
+ * IOR can be compared with the Internet address for a web page,
+ * it provides means to locate the CORBA service on the web.
+ * IOR contains the host address, port number, the object identifier
+ * (key) inside the server, the communication protocol version,
+ * supported charsets and so on.
+ *
+ * @param the CORBA object
+ * @return the object IOR representation.
+ * @see string_to_object(String)
+ */
+ public abstract String object_to_string(Object forObject);
+
+ /**
+ * This should perform the implementation dependent unit of work in the
+ * main thread.
+ *
+ * This method is part of the support for the distribute use of the
+ * single execution thread.
+ *
+ * Same as in Suns releases at least till 1.4 inclusive,
+ * the distribute use of the single thread is not implemented.
+ * Use multiple threads, provided by jre.
+ *
+ * The method returns without action.
+ */
+ public void perform_work()
+ {
+ }
+
+ /**
+ * Checks if the ORB needs the main thread to perform some work.
+ * The method should return true if the ORB needs the main thread,
+ * and false if it does not.
+ *
+ * This method is part of the support for the distribute use of the
+ * single execution thread.
+ *
+ * Same as in Suns releases at least till 1.4 inclusive,
+ * the distributed use of the single thread is not implemented.
+ * Use multiple threads, provided by jre.
+ *
+ * @return false, always.
+ */
+ public boolean work_pending()
+ {
+ return false;
+ }
+
+ /**
+ * Find and return the CORBA object, addressed by the given
+ * IOR string representation. The object can (an usually is)
+ * located on a remote computer, possibly running a different
+ * (not necessary java) CORBA implementation. The returned
+ * object is typically casted to the more specific reference
+ * using the <code>narrow(Object)</code> method of its helper.
+ *
+ * @param IOR the object IOR representation string.
+ *
+ * @return the found CORBA object.
+ * @see object_to_string(org.omg.CORBA.Object)
+ */
+ public abstract Object string_to_object(String IOR);
+
+ /**
+ * Start listening on the input socket. This method
+ * blocks the current thread until {@link #shutdown(boolean)}
+ * is called and shutdown process is completed.
+ */
+ public void run()
+ {
+ }
+
+ /**
+ * Shutdown the ORB server.
+ *
+ * @param wait_for_completion if true, the current thread is
+ * suspended untile the shutdown process is complete.
+ */
+ public void shutdown(boolean wait_for_completion)
+ {
+ }
+
+ /**
+ * Destroy this server, releasing the occupied resources.
+ * The default method returns without action.
+ */
+ public void destroy()
+ {
+ }
+
+ /**
+ * Set the ORB parameters. This method is normally called from
+ * {@link #init(String[], Properties)}.
+ *
+ * @param para the parameters, that were passed as the parameters
+ * to the <code>main(String[] args)</code> method of the current standalone
+ * application.
+ *
+ * @param props application specific properties that were passed
+ * as a second parameter in {@link init(String[], Properties)}).
+ * Can be <code>null</code>.
+ */
+ protected abstract void set_parameters(String[] para, Properties props);
+
+ /**
+ * Set the ORB parameters. This method is normally called from
+ * {@link #init(Applet, Properties)}.
+ *
+ * @param app the current applet.
+ *
+ * @param props application specific properties, passed as the second
+ * parameter in {@link #init(Applet, Properties)}.
+ * Can be <code>null</code>.
+ */
+ protected abstract void set_parameters(Applet app, Properties props);
+
+ /**
+ * Checks if the communication over network is allowed.
+ * @throws java.lang.SecurityException
+ */
+ private static final void checkNetworkingPermission(String host, int port)
+ throws SecurityException
+ {
+ SecurityManager security = System.getSecurityManager();
+ if (security != null)
+ {
+ security.checkConnect(host, port);
+ }
+ }
+
+ /**
+ * Get the ORB class name.
+ */
+ private static String getORBName(Properties props, String property)
+ {
+ String orb_cn = null;
+
+ if (props != null)
+ orb_cn = props.getProperty(property, null);
+
+ if (orb_cn == null)
+ orb_cn = System.getProperty(property, null);
+
+ if (orb_cn == null)
+ orb_cn = checkFile(property, "user.home", null);
+
+ if (orb_cn == null)
+ orb_cn = checkFile(property, "java.home", "lib");
+
+ return orb_cn;
+ }
+
+ /**
+ * Check if the property is defined in the existsting file orb.properties.
+ *
+ * @param property the property
+ * @param dir the system property, defining the folder where the
+ * file could be expected.
+ * @param subdir subfolder where to look for the file.
+ *
+ * @return the property value, null if not found or file does not exist.
+ */
+ private static String checkFile(String property, String dir, String subdir)
+ {
+ try
+ {
+ File f = new File(dir);
+ if (!f.exists())
+ return null;
+
+ if (subdir != null)
+ f = new File(f, subdir);
+
+ f = new File(f, "orb.properties");
+
+ if (!f.exists())
+ return null;
+
+ Properties p = new Properties();
+ p.load(new BufferedInputStream(new FileInputStream(f)));
+
+ return p.getProperty(property, null);
+ }
+ catch (IOException ex)
+ {
+ return null;
+ }
+ }
+
+ /**
+ * Create ORB when its name is possibly known.
+ *
+ * @param props properties, possibly containing the ORB name.
+ * @param orbClassName the direct ORB class name, overriding
+ * other possible locations, or null if not specified.
+ */
+ private static ORB createORB(Properties props, String orbClassName)
+ {
+ ORB orb = null;
+
+ if (orbClassName == null)
+ {
+ orbClassName = getORBName(props, FUNCTIONAL_ORB);
+
+ if (orbClassName == null)
+ orbClassName = DEFAULT_FUNCTIONAL_ORB;
+ }
+
+ try
+ {
+ orb = (ORB) Class.forName(orbClassName).newInstance();
+ }
+ catch (ClassNotFoundException ex)
+ {
+ noORB(orbClassName, ex);
+ }
+ catch (IllegalAccessException ex)
+ {
+ noORB(orbClassName, ex);
+ }
+ catch (InstantiationException ex)
+ {
+ noORB(orbClassName, ex);
+ }
+
+ return orb;
+ }
+
+ /**
+ * Throw the runtime exception.
+ *
+ * @param orb_c the ORB class name.
+ * @param why the explaining chained exception.
+ */
+ private static void noORB(String orb_c, Throwable why)
+ {
+ throw new RuntimeException("The ORB " + orb_c + " cannot be instantiated.",
+ why
+ );
+ }
+}
diff --git a/libjava/classpath/org/omg/CORBA/ORBPackage/InconsistentTypeCode.java b/libjava/classpath/org/omg/CORBA/ORBPackage/InconsistentTypeCode.java
new file mode 100644
index 00000000000..e021a8a9f5c
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/ORBPackage/InconsistentTypeCode.java
@@ -0,0 +1,79 @@
+/* InconsistentTypeCode.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.ORBPackage;
+
+import java.io.Serializable;
+
+import org.omg.CORBA.UserException;
+
+import org.omg.CORBA.portable.IDLEntity;
+
+/**
+ * The exception is thrown
+ * in response of the attempt to create the dynamic
+ * with an unmatching type code.
+ *
+ * @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
+ */
+public class InconsistentTypeCode
+ extends UserException
+ implements IDLEntity, Serializable
+{
+ /**
+ * Use serialVersionUID for interoperability.
+ * Using the version 1.4 UID.
+ */
+ private static final long serialVersionUID = -4393472660722667060L;
+
+ /**
+ * Constructs a the exception.
+ */
+ public InconsistentTypeCode()
+ {
+ }
+
+ /**
+ * Constructs the exception, explaining the reason of throwing it.
+ * @param reason a string, explaining, why the exception has been thrown.
+ */
+ public InconsistentTypeCode(String reason)
+ {
+ super(reason);
+ }
+}
diff --git a/libjava/classpath/org/omg/CORBA/ORBPackage/InvalidName.java b/libjava/classpath/org/omg/CORBA/ORBPackage/InvalidName.java
new file mode 100644
index 00000000000..f2b78f47cf2
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/ORBPackage/InvalidName.java
@@ -0,0 +1,79 @@
+/* InvalidName.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.ORBPackage;
+
+import java.io.Serializable;
+
+import org.omg.CORBA.UserException;
+
+import org.omg.CORBA.portable.IDLEntity;
+
+/**
+ * The exception is thrown by
+ * {@link org.omg.CORBA.ORB#resolve_initial_references(String)}
+ * in response of passing a name for
+ * which there is no initial reference.
+ * @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
+ */
+public class InvalidName
+ extends UserException
+ implements IDLEntity, Serializable
+{
+ /**
+ * Use serialVersionUID for interoperability.
+ * Using the version 1.4 UID.
+ */
+ private static final long serialVersionUID = 6635923991559230168L;
+
+ /**
+ * Constructs a the exception.
+ */
+ public InvalidName()
+ {
+ }
+
+ /**
+ * Constructs the exception, explaining the reason of throwing it.
+ * @param reason a string, explaining, why the exception has been thrown.
+ */
+ public InvalidName(String reason)
+ {
+ super(reason);
+ }
+}
diff --git a/libjava/classpath/org/omg/CORBA/ORBPackage/package.html b/libjava/classpath/org/omg/CORBA/ORBPackage/package.html
new file mode 100644
index 00000000000..b0711261d18
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/ORBPackage/package.html
@@ -0,0 +1,46 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
+<!-- package.html - describes classes in javax.sql 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.ORBPackage</title></head>
+
+<body>
+<p>Provides a couple of exceptions, thrown by methods in the {@link org.omg.CORBA.ORB} class.</p>
+
+</body>
+</html>
diff --git a/libjava/classpath/org/omg/CORBA/Object.java b/libjava/classpath/org/omg/CORBA/Object.java
new file mode 100644
index 00000000000..997fab9e827
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/Object.java
@@ -0,0 +1,191 @@
+/* Object.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;
+
+/**
+ * The CORBA object reference. The object can be either local or remote.
+ * For the local object, the methods of the derived object are called
+ * like on any other java object. For the remote object, the reference
+ * points to the stup (proxy), responsible for the remote invocation.
+ *
+ * @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
+ */
+public interface Object
+{
+ /**
+ * 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.
+ */
+ Request _create_request(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 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.
+ */
+ Request _create_request(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.
+ *
+ * The method may return the object reference itself.
+ *
+ * @return as a rule, <code>this</code>.
+ */
+ org.omg.CORBA.Object _duplicate();
+
+ /**
+ * Retrieve the domain managers for this object.
+ *
+ * @return the domain managers.
+ */
+ DomainManager[] _get_domain_managers();
+
+ /**
+ * Get the <code>InterfaceDef</code> for this Object.
+ */
+ org.omg.CORBA.Object _get_interface_def();
+
+ /**
+ * 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.
+ */
+ Policy _get_policy(int a_policy_type)
+ throws BAD_PARAM;
+
+ /**
+ * 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 maximum the maximal value to return.
+ *
+ * @return the hashcode.
+ */
+ int _hash(int maximum);
+
+ /**
+ * Check if this object can be referenced by the given repository id.
+ *
+ * @param repositoryIdentifer the repository id.
+ *
+ * @return true if the passed parameter is a repository id of this
+ * CORBA object.
+ */
+ boolean _is_a(String repositoryIdentifer);
+
+ /**
+ * 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.
+ */
+ boolean _is_equivalent(org.omg.CORBA.Object other);
+
+ /**
+ * Determines if the server object for this reference has already
+ * been destroyed.
+ *
+ * @return true if the object has been destroyed, false otherwise.
+ */
+ boolean _non_existent();
+
+ /**
+ * Free resoureces, occupied by this reference. The object implementation
+ * is not notified, and the other references to the same object are not
+ * affected.
+ */
+ void _release();
+
+ /**
+ * Create a request to invoke the method of this CORBA object.
+ *
+ * @param operation the name of the method to invoke.
+ *
+ * @return the request.
+ */
+ Request _request(String operation);
+
+ /**
+ * 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.
+ *
+ * @return the new reference with the changed policies.
+ */
+ Object _set_policy_override(Policy[] policies, SetOverrideType how);
+}
diff --git a/libjava/classpath/org/omg/CORBA/ObjectHelper.java b/libjava/classpath/org/omg/CORBA/ObjectHelper.java
new file mode 100644
index 00000000000..0e0efa51efd
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/ObjectHelper.java
@@ -0,0 +1,113 @@
+/* ObjectHelper.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;
+
+import gnu.CORBA.primitiveTypeCode;
+
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+
+/**
+ * The helper operations for the binding list.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public abstract class ObjectHelper
+{
+ /**
+ * The cached binding list type code.
+ */
+ private static TypeCode typeCode = new primitiveTypeCode(TCKind.tk_objref);
+
+ /**
+ * Extract the array of object from the given {@link Any}.
+ */
+ public static org.omg.CORBA.Object extract(Any a)
+ {
+ try
+ {
+ return ((ObjectHolder) a.extract_Streamable()).value;
+ }
+ catch (ClassCastException ex)
+ {
+ throw new BAD_OPERATION("CORBA object expected");
+ }
+ }
+
+ /**
+ * Get the object repository id.
+ * @return the empty string.
+ */
+ public static String id()
+ {
+ return "";
+ }
+
+ /**
+ * Insert the object into the given {@link Any}.
+ */
+ public static void insert(Any a, org.omg.CORBA.Object object)
+ {
+ a.insert_Streamable(new ObjectHolder(object));
+ }
+
+ /**
+ * Read the object from the given CDR input stream.
+ */
+ public static org.omg.CORBA.Object read(InputStream istream)
+ {
+ return istream.read_Object();
+ }
+
+ /**
+ * Return the object type code.
+ */
+ public static TypeCode type()
+ {
+ return typeCode;
+ }
+
+ /**
+ * Write the object into the given CDR output stream.
+ */
+ public static void write(OutputStream ostream, org.omg.CORBA.Object value)
+ {
+ ostream.write_Object(value);
+ }
+}
diff --git a/libjava/classpath/org/omg/CORBA/ObjectHolder.java b/libjava/classpath/org/omg/CORBA/ObjectHolder.java
new file mode 100644
index 00000000000..02526bee1dd
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/ObjectHolder.java
@@ -0,0 +1,127 @@
+/* ObjectHolder.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;
+
+import gnu.CORBA.primitiveTypeCode;
+
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+import org.omg.CORBA.portable.Streamable;
+
+/**
+ * A holder for CORBA <code>Object</code> that is mapped into
+ * java <code>org.omg.CORBA.Object</code>.
+ *
+ * The holders have several application areas. The end user usually
+ * sees them implementing CORBA methods where the primitive type
+ * is passed by reference. While CORBA (or, for example, C) supports
+ * this, the java does not and a wrapper class is required.
+ *
+ * @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
+ */
+public final class ObjectHolder
+ implements Streamable
+{
+ /**
+ * The default type code for this holder.
+ */
+ private static final TypeCode t_object =
+ new primitiveTypeCode(TCKind.tk_objref);
+
+ /**
+ * The <code>org.omg.CORBA.Object</code> (CORBA <code>Object</code>) value,
+ * held by this ObjectHolder.
+ */
+ public org.omg.CORBA.Object value;
+
+ /**
+ * Constructs an instance of ObjectHolder,
+ * initializing {@link #value} to <code>0</code>.
+ */
+ public ObjectHolder()
+ {
+ }
+
+ /**
+ * Constructs an instance of ObjectHolder,
+ * initializing {@link #value} to the given <code>org.omg.CORBA.Object</code>.
+ *
+ * @param initial_value a value that will be assigned to the
+ * {@link #value} field.
+ */
+ public ObjectHolder(org.omg.CORBA.Object initial_value)
+ {
+ value = initial_value;
+ }
+
+ /**
+ * Fill in the {@link value } field by reading the required data
+ * from the given stream. For <code>org.omg.CORBA.Object</code>, the
+ * functionality is delegated to
+ * {@link org.omg.CORBA.portable.InputStream#read_Object}.
+ *
+ * @param input the input stream to read from.
+ */
+ public void _read(InputStream input)
+ {
+ value = input.read_Object();
+ }
+
+ /**
+ * Returns the TypeCode, corresponding the CORBA type that is stored
+ * using this holder.
+ */
+ public TypeCode _type()
+ {
+ return t_object;
+ }
+
+ /**
+ * Write the {@link value } field to the given stream.
+ * For <code>Object</code>, the functionality
+ * is delegated to
+ * {@link org.omg.CORBA.portable.OutputStream#write_Object(Object) }.
+ *
+ * @param output the output stream to write into.
+ */
+ public void _write(OutputStream output)
+ {
+ output.write_Object(value);
+ }
+}
diff --git a/libjava/classpath/org/omg/CORBA/OctetSeqHelper.java b/libjava/classpath/org/omg/CORBA/OctetSeqHelper.java
new file mode 100644
index 00000000000..0612ae4e2ff
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/OctetSeqHelper.java
@@ -0,0 +1,142 @@
+/* OctetSeqHelper.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;
+
+import gnu.CORBA.primitiveArrayTypeCode;
+
+import org.omg.CORBA.TypeCodePackage.BadKind;
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+
+/**
+ * Provides static helper methods for working with
+ * CORBA sequence of <code>byte</code>
+ * (<code>OctetSeq</code>).
+ *
+ * @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
+ */
+public abstract class OctetSeqHelper
+{
+ /**
+ * Extract the <code>byte[]</code> from the
+ * given {@link Any}. This implementation expects the
+ * {@link Any} to hold the instance of {@link OctetSeqHolder}
+ * that is returned by {@link Any#extract_Streamable() }.
+ *
+ * @param a an Any to extract the array from.
+ *
+ * @return the extracted array.
+ *
+ * @throws ClassCastException if the Any contains something other than the
+ * the {@link OctetSeqHolder}.
+ */
+ public static byte[] extract(Any a)
+ {
+ OctetSeqHolder h = (OctetSeqHolder) a.extract_Streamable();
+ return h.value;
+ }
+
+ /**
+ * Returns the agreed Id, delegating functionality to
+ * the {@link #type()}.id().
+ */
+ public static String id()
+ {
+ try
+ {
+ return type().id();
+ }
+ catch (BadKind ex)
+ {
+ // Should never happen under correct work.
+ throw new Error("Please report this bug.", ex);
+ }
+ }
+
+ /**
+ * Insert into the given <code>byte[]</code> into the
+ * given {@link Any}. This implementation first creates
+ * a {@link OctetSeqHolder} and then calls
+ * {@link Any#insert_Streamable(Streamable)}.
+ *
+ * @param into the target Any.
+ * @param that the array to insert.
+ */
+ public static void insert(Any into, byte[] that)
+ {
+ OctetSeqHolder holder = new OctetSeqHolder(that);
+ into.insert_Streamable(holder);
+ }
+
+ /**
+ * Reads the <code>byte[]</code> from the CORBA input stream.
+ *
+ * @param input the CORBA (not java.io) stream to read from.
+ * @return the value from the stream.
+ */
+ public static byte[] read(InputStream input)
+ {
+ byte[] value = new byte[ input.read_long() ];
+ input.read_octet_array(value, 0, value.length);
+ return value;
+ }
+
+ /**
+ * Creates and returns a new instance of the TypeCode,
+ * corresponding the CORBA <code>OctetSeq</code>.
+ * The length of the sequence is left with the initial
+ * value 0.
+ */
+ public static TypeCode type()
+ {
+ return new primitiveArrayTypeCode(TCKind.tk_octet);
+ }
+
+ /**
+ * Writes the <code>byte[]</code> into the given stream.
+ *
+ * @param output the CORBA (not java.io) output stream to write.
+ * @param value the value that must be written.
+ */
+ public static void write(OutputStream output, byte[] value)
+ {
+ output.write_long(value.length);
+ output.write_octet_array(value, 0, value.length);
+ }
+}
diff --git a/libjava/classpath/org/omg/CORBA/OctetSeqHolder.java b/libjava/classpath/org/omg/CORBA/OctetSeqHolder.java
new file mode 100644
index 00000000000..5092d707eea
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/OctetSeqHolder.java
@@ -0,0 +1,126 @@
+/* OctetSeqHolder.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;
+
+import gnu.CORBA.primitiveArrayTypeCode;
+
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+import org.omg.CORBA.portable.Streamable;
+
+/**
+ * A sequence holder for CORBA <code>OctetSeq</code> that is mapped into
+ * java <code>byte[]</code>.
+ *
+ * @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
+ */
+public final class OctetSeqHolder
+ implements Streamable
+{
+ /**
+ * The <code>byte[]</code> (CORBA <code>OctetSeq</code>) value,
+ * held by this OctetSeqHolder.
+ */
+ public byte[] value;
+
+ /**
+ * The type code for this holder. Each holder has a different instance.
+ */
+ private final primitiveArrayTypeCode typecode =
+ new primitiveArrayTypeCode(TCKind.tk_octet);
+
+ /**
+ * Constructs an instance of OctetSeqHolder,
+ * initializing {@link #value} to <code>null</code>.
+ */
+ public OctetSeqHolder()
+ {
+ }
+
+ /**
+ * Constructs an instance of OctetSeqHolder,
+ * initializing {@link #value} to the given <code>byte[]</code>.
+ *
+ * @param initial_value a value that will be assigned to the
+ * {@link #value} field.
+ */
+ public OctetSeqHolder(byte[] initial_value)
+ {
+ value = initial_value;
+ typecode.setLength(value.length);
+ }
+
+ /**
+ * Fill in the {@link value } field by reading the required data
+ * from the given stream. This method first reads the array size
+ * (as CORBA <code>long</code>) and then calls the
+ * {@link org.omg.CORBA.portable.InputStream#read_octet_array }.
+ *
+ * @param input the input stream to read from.
+ */
+ public void _read(InputStream input)
+ {
+ value = new byte[ input.read_long() ];
+ input.read_octet_array(value, 0, value.length);
+ typecode.setLength(value.length);
+ }
+
+ /**
+ * Returns the TypeCode, corresponding the CORBA type that is stored
+ * using this holder.
+ */
+ public TypeCode _type()
+ {
+ return typecode;
+ }
+
+ /**
+ * Write the {@link value } field to the given stream.
+ * This method first writes the array size
+ * (as CORBA <code>long</code>) and then calls the
+ * {@link org.omg.CORBA.portable.OutputStream#write_octet_array }.
+ *
+ * @param output the output stream to write into.
+ */
+ public void _write(OutputStream output)
+ {
+ output.write_long(value.length);
+ output.write_octet_array(value, 0, value.length);
+ }
+}
diff --git a/libjava/classpath/org/omg/CORBA/PERSIST_STORE.java b/libjava/classpath/org/omg/CORBA/PERSIST_STORE.java
new file mode 100644
index 00000000000..8aae9b3bcf6
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/PERSIST_STORE.java
@@ -0,0 +1,96 @@
+/* PERSIST_STORE.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;
+
+import java.io.Serializable;
+
+/**
+ * Indicates a persistent storage failure like database crash.
+ *
+ * @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
+ */
+public class PERSIST_STORE
+ extends SystemException
+ implements Serializable
+{
+ /**
+ * Use serialVersionUID for interoperability.
+ */
+ private static final long serialVersionUID = -6835478548864681965L;
+
+ /**
+ * Creates a PERSIST_STORE with the default minor code of 0,
+ * completion state COMPLETED_NO and the given explaining message.
+ * @param reasom the explaining message.
+ */
+ public PERSIST_STORE(String message)
+ {
+ super(message, 0, CompletionStatus.COMPLETED_NO);
+ }
+
+ /**
+ * Creates PERSIST_STORE with the default minor code of 0 and a
+ * completion state COMPLETED_NO.
+ */
+ public PERSIST_STORE()
+ {
+ super("", 0, CompletionStatus.COMPLETED_NO);
+ }
+
+ /** Creates a PERSIST_STORE exception with the specified minor
+ * code and completion status.
+ * @param minor additional error code.
+ * @param completed the method completion status.
+ */
+ public PERSIST_STORE(int minor, CompletionStatus completed)
+ {
+ super("", minor, completed);
+ }
+
+ /**
+ * Created PERSIST_STORE exception, providing full information.
+ * @param reason explaining message.
+ * @param minor additional error code (the "minor").
+ * @param completed the method completion status.
+ */
+ public PERSIST_STORE(String reason, int minor, CompletionStatus completed)
+ {
+ super(reason, minor, completed);
+ }
+}
diff --git a/libjava/classpath/org/omg/CORBA/PRIVATE_MEMBER.java b/libjava/classpath/org/omg/CORBA/PRIVATE_MEMBER.java
new file mode 100644
index 00000000000..0c055dc46b6
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/PRIVATE_MEMBER.java
@@ -0,0 +1,55 @@
+/* PRIVATE_MEMBER.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;
+
+/**
+ * One of the two constants, defining the visibility scope of
+ * the {@link ValueMember}. The other constant is
+ * {@link PUBLIC_MEMBER}.
+ *
+ * @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
+ *
+ * @see ValueMember#access
+ */
+public interface PRIVATE_MEMBER
+{
+ /**
+ * The flag, specifying that the value member is private.
+ */
+ short value = 0;
+}
diff --git a/libjava/classpath/org/omg/CORBA/PUBLIC_MEMBER.java b/libjava/classpath/org/omg/CORBA/PUBLIC_MEMBER.java
new file mode 100644
index 00000000000..9008f7f7ad3
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/PUBLIC_MEMBER.java
@@ -0,0 +1,55 @@
+/* PUBLIC_MEMBER.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;
+
+/**
+ * One of the two constants, defining the visibility scope of
+ * the {@link ValueMember}. The other constant is
+ * {@link PRIVATE_MEMBER}.
+ *
+ * @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
+ *
+ * @see ValueMember#access
+ */
+public interface PUBLIC_MEMBER
+{
+ /**
+ * The flag, specifying that the value member is public.
+ */
+ short value = 1;
+}
diff --git a/libjava/classpath/org/omg/CORBA/ParameterMode.java b/libjava/classpath/org/omg/CORBA/ParameterMode.java
new file mode 100644
index 00000000000..73c6f574fb3
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/ParameterMode.java
@@ -0,0 +1,142 @@
+/* ParameterMode.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;
+
+import org.omg.CORBA.portable.IDLEntity;
+
+import java.io.Serializable;
+
+/**
+ * Defines the parameter modes (the ways in that a method parameter
+ * is used during invocation).
+ *
+ * In CORBA, a method parameter can pass the value (PARAM_IN),
+ * be used as a placeholder to return the value (PARAM_OUT) or
+ * both pass the data and be used as a placeholder to return the
+ * changed value (PARAM_INOUT).
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public class ParameterMode
+ implements Serializable, IDLEntity
+{
+ /**
+ * Use serialVersionUID (v1.4) for interoperability.
+ */
+ private static final long serialVersionUID = 1521598391932998229L;
+
+ /**
+ * This value means that the parameter is an IN parameter.
+ */
+ public static final int _PARAM_IN = 0;
+
+ /**
+ * This value means that the parameter is an OUT parameter.
+ */
+ public static final int _PARAM_OUT = 1;
+
+ /**
+ * This value means that the parameter is an INOUT parameter.
+ */
+ public static final int _PARAM_INOUT = 2;
+
+ /**
+ * This value means that the parameter is an IN parameter.
+ */
+ public static ParameterMode PARAM_IN = new ParameterMode(_PARAM_IN);
+
+ /**
+ * This value means that the parameter is an OUT parameter.
+ */
+ public static ParameterMode PARAM_OUT = new ParameterMode(_PARAM_OUT);
+
+ /**
+ * This value means that the parameter is an INOUT parameter.
+ */
+ public static ParameterMode PARAM_INOUT = new ParameterMode(_PARAM_INOUT);
+
+ /**
+ * The value of this parameter mode instance.
+ */
+ private final int value;
+
+ /**
+ * The conversion table.
+ */
+ private static final ParameterMode[] table =
+ new ParameterMode[] { PARAM_IN, PARAM_OUT, PARAM_INOUT };
+
+ /**
+ * Create an instance of the parameter mode with the given value.
+ */
+ protected ParameterMode(int a_value)
+ {
+ value = a_value;
+ }
+
+ /**
+ * Return the integer value code for the given parameter mode.
+ *
+ * @return 0 for PARAM_IN, 1 for PARAM_OUT, 3 for PARAM_INOUT.
+ */
+ public int value()
+ {
+ return value;
+ }
+
+ /**
+ * Get a parameter mode instance for the integer parameter mode code.
+ *
+ * @param p_mode a parameter mode (0..2).
+ *
+ * @return a corresponding parameter mode instance.
+ *
+ * @throws BAD_PARAM for the invalid parameter mode code.
+ */
+ public static ParameterMode from_int(int p_mode)
+ {
+ try
+ {
+ return table [ p_mode ];
+ }
+ catch (ArrayIndexOutOfBoundsException ex)
+ {
+ throw new BAD_PARAM("Invalid parameter mode: " + p_mode);
+ }
+ }
+} \ No newline at end of file
diff --git a/libjava/classpath/org/omg/CORBA/ParameterModeHelper.java b/libjava/classpath/org/omg/CORBA/ParameterModeHelper.java
new file mode 100644
index 00000000000..ec75b2bcf72
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/ParameterModeHelper.java
@@ -0,0 +1,125 @@
+/* ParameterModeHelper.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;
+
+import gnu.CORBA.Restricted_ORB;
+
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+
+/**
+ * A helper operations for a method parameter modes.
+ * A method parameter can pass the value (PARAM_IN), be used as a placeholder
+ * to return the value (PARAM_OUT) or both pass the data and be used as a
+ * placeholder to return the changed value (PARAM_INOUT).
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public abstract class ParameterModeHelper
+{
+ /**
+ * The cached typecode value, computed only once.
+ */
+ private static TypeCode typeCode;
+
+ /**
+ * Insert the parameter mode into the given Any.
+ */
+ public static void insert(Any any, ParameterMode that)
+ {
+ any.insert_Streamable(new ParameterModeHolder(that));
+ }
+
+ /**
+ * Extract the parameter mode from the given Any.
+ */
+ public static ParameterMode extract(Any any)
+ {
+ return ((ParameterModeHolder) any.extract_Streamable()).value;
+ }
+
+ /**
+ * Get the parameter mode typecode (enumeration, named "ParameterMode").
+ * The typecode states that the enumeration can obtain one of
+ * the following values: PARAM_IN ,PARAM_OUT ,PARAM_INOUT .
+ */
+ public static TypeCode type()
+ {
+ if (typeCode == null)
+ {
+ String[] members =
+ new String[] { "PARAM_IN", "PARAM_OUT", "PARAM_INOUT" };
+
+ typeCode =
+ Restricted_ORB.Singleton.create_enum_tc(id(), "ParameterMode", members);
+ }
+ return typeCode;
+ }
+
+ /**
+ * Get the parameter mode repository id.
+ *
+ * @return "IDL:omg.org/CORBA/ParameterMode:1.0", always.
+ */
+ public static String id()
+ {
+ return "IDL:omg.org/CORBA/ParameterMode:1.0";
+ }
+
+ /**
+ * Read the enumeration value (as int) from the CDR intput stream.
+ *
+ * @param istream a stream to read from.
+ */
+ public static ParameterMode read(InputStream istream)
+ {
+ return ParameterMode.from_int(istream.read_long());
+ }
+
+ /**
+ * Write the enumeration value (as int) to the CDR output stream.
+ *
+ * @param ostream a stream to write into.
+ * @param value a value to write.
+ */
+ public static void write(OutputStream ostream, ParameterMode value)
+ {
+ ostream.write_long(value.value());
+ }
+} \ No newline at end of file
diff --git a/libjava/classpath/org/omg/CORBA/ParameterModeHolder.java b/libjava/classpath/org/omg/CORBA/ParameterModeHolder.java
new file mode 100644
index 00000000000..5c932b7d050
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/ParameterModeHolder.java
@@ -0,0 +1,93 @@
+/* ParameterModeHolder.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;
+
+/**
+ * The holder for ParameterMode.
+ *
+ * @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
+ */
+public class ParameterModeHolder
+ implements org.omg.CORBA.portable.Streamable
+{
+ /**
+ * The stored ParameterMode value.
+ */
+ public ParameterMode value;
+
+ /**
+ * Create the unitialised instance.
+ */
+ public ParameterModeHolder()
+ {
+ }
+
+ /**
+ * Create the initialised instance.
+ * @param initialValue
+ */
+ public ParameterModeHolder(ParameterMode initialValue)
+ {
+ value = initialValue;
+ }
+
+ /**
+ * Fill in the {@link value} by data from the CDR stream.
+ */
+ public void _read(org.omg.CORBA.portable.InputStream in)
+ {
+ value = ParameterModeHelper.read(in);
+ }
+
+ /**
+ * Get the typecode of the ParameterMode.
+ */
+ public org.omg.CORBA.TypeCode _type()
+ {
+ return ParameterModeHelper.type();
+ }
+
+ /**
+ * Write the stored value into the CDR stream.
+ */
+ public void _write(org.omg.CORBA.portable.OutputStream out)
+ {
+ ParameterModeHelper.write(out, value);
+ }
+}
diff --git a/libjava/classpath/org/omg/CORBA/Policy.java b/libjava/classpath/org/omg/CORBA/Policy.java
new file mode 100644
index 00000000000..b1fae60bf5b
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/Policy.java
@@ -0,0 +1,55 @@
+/* Policy.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;
+
+import java.io.Serializable;
+
+import org.omg.CORBA.portable.IDLEntity;
+
+/**
+ * The interfaces derived from the class allow an ORB or CORBA service
+ * access to certain choices (id assignment, threading model and so on)
+ * that affect they operation.
+ *
+ * @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
+ */
+public interface Policy
+ extends IDLEntity, Object, Serializable, PolicyOperations
+{
+}
diff --git a/libjava/classpath/org/omg/CORBA/PolicyError.java b/libjava/classpath/org/omg/CORBA/PolicyError.java
new file mode 100644
index 00000000000..82ae4e45dc0
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/PolicyError.java
@@ -0,0 +1,102 @@
+/* PolicyError.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;
+
+import java.io.Serializable;
+
+/**
+ * The exception is thrown when a policy error occurs.
+ * A PolicyError exception may include one of the following error reason codes:
+ * {@link BAD_POLICY}, {@link BAD_POLICY_TYPE},
+ * {@link BAD_POLICY_VALUE}, {@link UNSUPPORTED_POLICY},
+ * {@link UNSUPPORTED_POLICY_VALUE}.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public class PolicyError
+ extends UserException
+ implements IDLEntity, Serializable
+{
+ /**
+ * Holds the exception reason code, one of
+ * {@link BAD_POLICY}, {@link BAD_POLICY_TYPE},
+ * {@link BAD_POLICY_VALUE}, {@link UNSUPPORTED_POLICY},
+ * {@link UNSUPPORTED_POLICY_VALUE}.
+ */
+ public short reason;
+
+ /**
+ * Use serialVersionUID (v1.4) for interoperability.
+ */
+ private static final long serialVersionUID = -9196809779974700103L;
+
+ /**
+ * Constructs an unitialised instance of the policy error.
+ */
+ public PolicyError()
+ {
+ }
+
+ /**
+ * Constructs the policy error with the given reason code.
+ * @param reason a reason code, one of
+ * {@link BAD_POLICY}, {@link BAD_POLICY_TYPE},
+ * {@link BAD_POLICY_VALUE}, {@link UNSUPPORTED_POLICY},
+ * {@link UNSUPPORTED_POLICY_VALUE}.
+ */
+ public PolicyError(short a_reason)
+ {
+ reason = a_reason;
+ }
+
+ /**
+ * Constructs the policy error with the given reason code and the
+ * detailed message.
+ * @param reason a reason code, one of
+ * {@link BAD_POLICY}, {@link BAD_POLICY_TYPE},
+ * {@link BAD_POLICY_VALUE}, {@link UNSUPPORTED_POLICY},
+ * {@link UNSUPPORTED_POLICY_VALUE}.
+ * @param details the detailed message.
+ */
+ public PolicyError(String a_details, short a_reason)
+ {
+ super(a_details);
+ reason = a_reason;
+ }
+}
diff --git a/libjava/classpath/org/omg/CORBA/PolicyHelper.java b/libjava/classpath/org/omg/CORBA/PolicyHelper.java
new file mode 100644
index 00000000000..16b9d94c754
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/PolicyHelper.java
@@ -0,0 +1,164 @@
+/* PolicyHelper.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;
+
+import org.omg.CORBA.Any;
+import org.omg.CORBA.BAD_OPERATION;
+import org.omg.CORBA.ORB;
+import org.omg.CORBA.StructMember;
+import org.omg.CORBA.TCKind;
+import org.omg.CORBA.TypeCode;
+import org.omg.CORBA.portable.Delegate;
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.ObjectImpl;
+import org.omg.CORBA.portable.OutputStream;
+
+/**
+* The helper operations for the
+* CORBA object {@link Policy}.
+*
+* @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+*/
+public abstract class PolicyHelper
+{
+ /**
+ * The cached {@link Policy} typecode, computed once.
+ */
+ private static TypeCode typeCode;
+
+ /**
+ * Get the type code of the {@link Policy}.
+ *
+ * @return interface typecode, named "Policy".
+ */
+ public static TypeCode type()
+ {
+ if (typeCode == null)
+ typeCode = ORB.init().create_interface_tc(id(), "Policy");
+ return typeCode;
+ }
+
+ /**
+ * Insert the Policy into the given Any.
+ *
+ * @param any the Any to insert into.
+ * @param that the Policy to insert.
+ */
+ public static void insert(Any any, Policy that)
+ {
+ any.insert_Streamable(new PolicyHolder(that));
+ }
+
+ /**
+ * Extract the Policy from given Any.
+ *
+ * @throws BAD_OPERATION if the passed Any does not contain Policy.
+ */
+ public static Policy extract(Any any)
+ {
+ try
+ {
+ PolicyHolder h = (PolicyHolder) any.extract_Streamable();
+ return h.value;
+ }
+ catch (ClassCastException ex)
+ {
+ throw new BAD_OPERATION("Policy expected");
+ }
+ }
+
+ /**
+ * Get the Policy repository id.
+ *
+ * @return "IDL:omg.org/CORBA/Policy:1.0", always.
+ */
+ public static String id()
+ {
+ return "IDL:omg.org/CORBA/Policy:1.0";
+ }
+
+ /**
+ * Cast the passed object into the Policy. If the
+ * object has a different java type, create an instance
+ * of the _PolicyStub, using the same delegate, as for
+ * the passed parameter. Hence, unlike java type cast,
+ * this method may return a different object, than has been passed.
+ *
+ * @param obj the object to narrow.
+ * @return narrowed instance.
+ * @throws BAD_PARAM if the passed object is not a Policy.
+ */
+ public static Policy narrow(org.omg.CORBA.Object obj)
+ {
+ if (obj == null)
+ return null;
+ else if (obj instanceof Policy)
+ return (Policy) obj;
+ else
+ {
+ // Check for the policy id cannot be performed because
+ // this helper must read various subclasses of the Policy,
+ // and the IOR profile currently supports only one id.
+
+ Delegate delegate = ((ObjectImpl) obj)._get_delegate();
+ return new _PolicyStub(delegate);
+ }
+ }
+
+ /**
+ * Read the object from the CDR intput stream (IOR profile expected).
+ *
+ * @param input a org.omg.CORBA.portable stream to read from.
+ */
+ public static Policy read(InputStream input)
+ {
+ return narrow(input.read_Object());
+ }
+
+ /**
+ * Write the object to the CDR output stream (as IOR profile).
+ *
+ * @param output a org.omg.CORBA.portable stream stream to write into.
+ * @param value a value to write.
+ */
+ public static void write(OutputStream output, Policy value)
+ {
+ output.write_Object(value);
+ }
+} \ No newline at end of file
diff --git a/libjava/classpath/org/omg/CORBA/PolicyHolder.java b/libjava/classpath/org/omg/CORBA/PolicyHolder.java
new file mode 100644
index 00000000000..e398cc14d7b
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/PolicyHolder.java
@@ -0,0 +1,106 @@
+/* PolicyHolder.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;
+
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+import org.omg.CORBA.portable.Streamable;
+
+/**
+* A holder for the object {@link Policy}.
+*
+* @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+*/
+public class PolicyHolder
+ implements Streamable
+{
+ /**
+ * The stored Policy value.
+ */
+ public Policy value;
+
+ /**
+ * Create the unitialised instance, leaving the value field
+ * with default <code>null</code> value.
+ */
+ public PolicyHolder()
+ {
+ }
+
+ /**
+ * Create the initialised instance.
+ * @param initialValue the value that will be assigned to
+ * the <code>value</code> field.
+ */
+ public PolicyHolder(Policy initialValue)
+ {
+ value = initialValue;
+ }
+
+ /**
+ * Fill in the {@link value} by data from the CDR stream.
+ * Delegates work to {@link PolicyHelper}.
+ *
+ * @param input the org.omg.CORBA.portable stream to read.
+ */
+ public void _read(InputStream input)
+ {
+ value = PolicyHelper.read(input);
+ }
+
+ /**
+ * Write the stored value into the CDR stream.
+ * Delegates work to {@link PolicyHelper}.
+ *
+ * @param output the org.omg.CORBA.portable stream to write.
+ */
+ public void _write(OutputStream output)
+ {
+ PolicyHelper.write(output, value);
+ }
+
+ /**
+ * Get the typecode of the Policy.
+ * Delegates work to {@link PolicyHelper}.
+ */
+ public org.omg.CORBA.TypeCode _type()
+ {
+ return PolicyHelper.type();
+ }
+} \ No newline at end of file
diff --git a/libjava/classpath/org/omg/CORBA/PolicyListHelper.java b/libjava/classpath/org/omg/CORBA/PolicyListHelper.java
new file mode 100644
index 00000000000..f03836a4fcc
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/PolicyListHelper.java
@@ -0,0 +1,149 @@
+/* PolicyListHelper.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;
+
+import org.omg.CORBA.Any;
+import org.omg.CORBA.BAD_OPERATION;
+import org.omg.CORBA.ORB;
+import org.omg.CORBA.StructMember;
+import org.omg.CORBA.TCKind;
+import org.omg.CORBA.TypeCode;
+import org.omg.CORBA.portable.Delegate;
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.ObjectImpl;
+import org.omg.CORBA.portable.OutputStream;
+
+/**
+* The helper operations for the
+* CORBA object {@link Policy[]}.
+*
+* @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+*/
+public abstract class PolicyListHelper
+{
+ /**
+ * The cached {@link Policy[]} typecode, computed once.
+ */
+ private static TypeCode typeCode;
+
+ /**
+ * Get the type code of the {@link Policy[]}.
+ */
+ public static TypeCode type()
+ {
+ if (typeCode == null)
+ typeCode = ORB.init().create_interface_tc(id(), "Policy[]");
+ return typeCode;
+ }
+
+ /**
+ * Insert the Policy[] into the given Any.
+ *
+ * @param any the Any to insert into.
+ * @param that the Policy[] to insert.
+ */
+ public static void insert(Any any, Policy[] that)
+ {
+ any.insert_Streamable(new PolicyListHolder(that));
+ }
+
+ /**
+ * Extract the Policy[] from given Any.
+ *
+ * @throws BAD_OPERATION if the passed Any does not contain Policy[].
+ */
+ public static Policy[] extract(Any any)
+ {
+ try
+ {
+ PolicyListHolder holds = (PolicyListHolder) any.extract_Streamable();
+ return holds.value;
+ }
+ catch (ClassCastException ex)
+ {
+ throw new BAD_OPERATION("Policy[] expected");
+ }
+ }
+
+ /**
+ * Get the Policy[] repository id.
+ *
+ * @return "IDL:omg.org/CORBA/PolicyList:1.0", always.
+ */
+ public static String id()
+ {
+ return "IDL:omg.org/CORBA/PolicyList:1.0";
+ }
+
+ /**
+ * Read the sequence of policies from the CDR intput stream.
+ * The method follows usual CDR standards (an array length as
+ * CORBA long, followed by the array members, if any).
+ * The array members are read using {@link PolicyHelper}.
+ *
+ * @param input a org.omg.CORBA.portable stream to read from.
+ */
+ public static Policy[] read(InputStream input)
+ {
+ Policy[] p = new Policy[ input.read_long() ];
+ for (int i = 0; i < p.length; i++)
+ {
+ p [ i ] = PolicyHelper.read(input);
+ }
+ return p;
+ }
+
+ /**
+ * Write the sequence of policies from the CDR intput stream.
+ * The method follows usual CDR standards (an array length as
+ * CORBA long, followed by the array members, if any).
+ * The array members are written using {@link PolicyHelper}.
+ *
+ * @param output a org.omg.CORBA.portable stream stream to write into.
+ * @param value a policy array to write.
+ */
+ public static void write(OutputStream output, Policy[] value)
+ {
+ output.write_long(value.length);
+ for (int i = 0; i < value.length; i++)
+ {
+ PolicyHelper.write(output, value [ i ]);
+ }
+ }
+} \ No newline at end of file
diff --git a/libjava/classpath/org/omg/CORBA/PolicyListHolder.java b/libjava/classpath/org/omg/CORBA/PolicyListHolder.java
new file mode 100644
index 00000000000..6c1b1cc9726
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/PolicyListHolder.java
@@ -0,0 +1,106 @@
+/* PolicyListHolder.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;
+
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+import org.omg.CORBA.portable.Streamable;
+
+/**
+* A holder for the object {@link Policy[]}.
+*
+* @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+*/
+public class PolicyListHolder
+ implements Streamable
+{
+ /**
+ * The stored Policy[] value.
+ */
+ public Policy[] value;
+
+ /**
+ * Create the unitialised instance, leaving the value field
+ * with default <code>null</code> value.
+ */
+ public PolicyListHolder()
+ {
+ }
+
+ /**
+ * Create the initialised instance.
+ * @param initialValue the value that will be assigned to
+ * the <code>value</code> field.
+ */
+ public PolicyListHolder(Policy[] initialValue)
+ {
+ value = initialValue;
+ }
+
+ /**
+ * Fill in the {@link value} by data from the CDR stream.
+ * Uses {@link PolicyListHelper}.
+ *
+ * @param input the org.omg.CORBA.portable stream to read.
+ */
+ public void _read(InputStream input)
+ {
+ value = PolicyListHelper.read(input);
+ }
+
+ /**
+ * Write the stored value into the CDR stream.
+ * Uses {@link PolicyListHelper}.
+ *
+ * @param output the org.omg.CORBA.portable stream to write.
+ */
+ public void _write(OutputStream output)
+ {
+ PolicyListHelper.write(output, value);
+ }
+
+ /**
+ * Get the typecode of the Policy[].
+ * Uses {@link PolicyListHelper}.
+ */
+ public org.omg.CORBA.TypeCode _type()
+ {
+ return PolicyListHelper.type();
+ }
+} \ No newline at end of file
diff --git a/libjava/classpath/org/omg/CORBA/PolicyOperations.java b/libjava/classpath/org/omg/CORBA/PolicyOperations.java
new file mode 100644
index 00000000000..06ca2734d8d
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/PolicyOperations.java
@@ -0,0 +1,70 @@
+/* PolicyOperation.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;
+
+/**
+ * Defines the operations that can be applied to the {@link Policy}
+ * object.
+ *
+ * @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
+ */
+public interface PolicyOperations
+{
+ /**
+ * Return a copy of this Policy.
+ *
+ * @return a copy of theis Policy, without any retained relationships
+ * to the previous domain or object.
+ */
+ Policy copy();
+
+ /**
+ * Destroy the policy object.
+ */
+ void destroy();
+
+ /**
+ * Return an integer number, corresponding the type of this policy.
+ * The values, defining the different policy types, are allocated
+ * by OMG (request AT omg DOT org).
+ *
+ * @return the integer policy code.
+ */
+ int policy_type();
+}
diff --git a/libjava/classpath/org/omg/CORBA/PolicyTypeHelper.java b/libjava/classpath/org/omg/CORBA/PolicyTypeHelper.java
new file mode 100644
index 00000000000..dadd3a9e6ef
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/PolicyTypeHelper.java
@@ -0,0 +1,122 @@
+/* PolicyTypeHelper.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;
+
+import org.omg.CORBA.Any;
+import org.omg.CORBA.BAD_OPERATION;
+import org.omg.CORBA.ORB;
+import org.omg.CORBA.StructMember;
+import org.omg.CORBA.TCKind;
+import org.omg.CORBA.TypeCode;
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+
+/**
+* A helper operations for the policy type. A policy type is an integer
+* constant and needs no helper, but the one is included to
+* to facilitate the automated code handling.
+*
+* @specnote In this implementation, this class is not in use. Its "logical"
+* place would be {@link ORB}, having the PolicyType type. These parameters
+* are declarded as <coe>int</code> in the ORB interface.
+*
+* @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+*/
+public abstract class PolicyTypeHelper
+{
+ /**
+ * Create the PolicyType typecode (alias of CORBA ulong, named "PolicyType".
+ */
+ public static TypeCode type()
+ {
+ ORB orb = ORB.init();
+ return orb.create_alias_tc(id(), "PolicyType",
+ orb.get_primitive_tc(TCKind.tk_ulong)
+ );
+ }
+
+ /**
+ * Insert the int into the given Any.
+ */
+ public static void insert(Any any, int that)
+ {
+ any.insert_ulong(that);
+ }
+
+ /**
+ * Extract the int from given Any.
+ *
+ * @throws BAD_OPERATION if the passed Any does not contain int.
+ */
+ public static int extract(Any any)
+ {
+ return any.extract_ulong();
+ }
+
+ /**
+ * Get the int repository id.
+ *
+ * @return "IDL:omg.org/CORBA/PolicyType:1.0", always.
+ */
+ public static String id()
+ {
+ return "IDL:omg.org/CORBA/PolicyType:1.0";
+ }
+
+ /**
+ * Read the int (policy type) from the CDR intput stream.
+ *
+ * @param input a org.omg.CORBA.portable stream to read from.
+ */
+ public static int read(InputStream input)
+ {
+ return input.read_ulong();
+ }
+
+ /**
+ * Write the int (policy type) to the CDR output stream.
+ *
+ * @param output a org.omg.CORBA.portable stream stream to write into.
+ * @param value a value to write.
+ */
+ public static void write(OutputStream output, int value)
+ {
+ output.write_ulong(value);
+ }
+} \ No newline at end of file
diff --git a/libjava/classpath/org/omg/CORBA/Principal.java b/libjava/classpath/org/omg/CORBA/Principal.java
new file mode 100644
index 00000000000..9832f228d4d
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/Principal.java
@@ -0,0 +1,89 @@
+/* Principal.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;
+
+/**
+ * This class was used to store the client identity in the past.
+ * The client identity is stored in the form of the <code>byte</code>
+ * array.
+ *
+ * @deprecated by CORBA 2.2.
+ *
+ * @author Audrius Meskauskas(AudriusA@Bioinformatics.org)
+ *
+ */
+public class Principal
+{
+ /**
+ * The field, holding the client identity.
+ */
+ private byte[] m_name;
+
+ /**
+ * @deprecated
+ */
+ public Principal()
+ {
+ }
+
+ /**
+ * Gets the name of the Principal.
+ *
+ * @deprecated by CORBA 2.2
+ *
+ * @return a name of the Pricipal.
+ */
+ public byte[] name()
+ {
+ /**@todo Override this org.omg.CORBA.Principal method*/
+ return m_name;
+ }
+
+ /**
+ * Sets the name of the Principal to the given value.
+ *
+ * @deprecated by CORBA 2.2
+ *
+ * @param a_name a value to set the name to.
+ */
+ public void name(byte[] a_name)
+ {
+ m_name = a_name;
+ }
+}
diff --git a/libjava/classpath/org/omg/CORBA/PrincipalHolder.java b/libjava/classpath/org/omg/CORBA/PrincipalHolder.java
new file mode 100644
index 00000000000..22501a0f794
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/PrincipalHolder.java
@@ -0,0 +1,122 @@
+/* PrincipalHolder.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;
+
+import gnu.CORBA.primitiveTypeCode;
+
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+import org.omg.CORBA.portable.Streamable;
+
+/**
+ * A holder for storing an instance of {@link Principal}.
+ *
+ * @deprecated by CORBA 2.2.
+ *
+ * @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
+ */
+public final class PrincipalHolder
+ implements Streamable
+{
+ /**
+ * The default type code for this holder.
+ */
+ private static final TypeCode t_any =
+ new primitiveTypeCode(TCKind.tk_Principal);
+
+ /**
+ * The instance of {@link Principal}, held by this holder.
+ */
+ public Principal value;
+
+ /**
+ * Constructs an instance of PrincipalHolder,
+ * initializing {@link #value} to <code>null</code>.
+ */
+ public PrincipalHolder()
+ {
+ }
+
+ /**
+ * Constructs an instance of PrincipalHolder,
+ * initializing {@link #value} to the passed parameter.
+ *
+ * @param initial_value a value that will be assigned to the
+ * {@link #value} field.
+ */
+ public PrincipalHolder(Principal initial_value)
+ {
+ value = initial_value;
+ }
+
+ /**
+ * Fill in the {@link value } field by reading the required data
+ * from the given stream. For {@link Principal}, the functionality
+ * is delegated to
+ * {@link org.omg.CORBA.portable.InputStream#read_Principal}.
+ *
+ * @param input the input stream to read from.
+ */
+ public void _read(InputStream input)
+ {
+ value = input.read_Principal();
+ }
+
+ /**
+ * Returns the TypeCode, corresponding the CORBA type that is stored
+ * using this holder.
+ */
+ public TypeCode _type()
+ {
+ return t_any;
+ }
+
+ /**
+ * Write the {@link value } field to the given stream.
+ * For {@link Principal} the functionality
+ * is delegated to
+ * {@link org.omg.CORBA.portable.OutputStream#write_Principal(Principal)}
+ * .
+ * @param output the output stream to write into.
+ */
+ public void _write(OutputStream output)
+ {
+ output.write_Principal(value);
+ }
+}
diff --git a/libjava/classpath/org/omg/CORBA/RepositoryIdHelper.java b/libjava/classpath/org/omg/CORBA/RepositoryIdHelper.java
new file mode 100644
index 00000000000..42fb008521f
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/RepositoryIdHelper.java
@@ -0,0 +1,116 @@
+/* RepositoryIdHelper.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;
+
+import gnu.CORBA.Restricted_ORB;
+
+import org.omg.CORBA.Any;
+import org.omg.CORBA.ORB;
+import org.omg.CORBA.TypeCode;
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+
+/**
+ * A formal helper for the CORBA Repository Id that is identical to the
+ * narrow string.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public abstract class RepositoryIdHelper
+{
+ /**
+ * Insert the Repository Id into Any (uses {@link Any.insert_string}).
+ *
+ * @param a the Any to insert into.
+ * @param that the string to insert.
+ */
+ public static void insert(Any a, String that)
+ {
+ a.insert_string(that);
+ }
+
+ /**
+ * Extract the Repository Id from Any ((uses {@link Any.extract_string}).
+ *
+ * @param a the Any to extract from.
+ */
+ public static String extract(Any a)
+ {
+ return a.extract_string();
+ }
+
+ /**
+ * Return an string alias typecode, named "RepositoryId"
+ */
+ public static TypeCode type()
+ {
+ ORB orb = Restricted_ORB.Singleton;
+ return orb.create_alias_tc(id(), "RepositoryId", orb.create_string_tc(0));
+ }
+
+ /**
+ * Return the Repository Id repository id.
+ * @return "IDL:omg.org/CORBA/RepositoryId:1.0", always.
+ */
+ public static String id()
+ {
+ return "IDL:omg.org/CORBA/RepositoryId:1.0";
+ }
+
+ /**
+ * Calls {@link InputStream#read_string()}.
+ *
+ * @param istream the stream to read from.
+ */
+ public static String read(InputStream istream)
+ {
+ return istream.read_string();
+ }
+
+ /**
+ * Calls {@link OutputStream#write_string()}.
+ *
+ * @param ostream the stream to write into.
+ * @param value the string (Repository Id) value to write.
+ */
+ public static void write(OutputStream ostream, String value)
+ {
+ ostream.write_string(value);
+ }
+} \ No newline at end of file
diff --git a/libjava/classpath/org/omg/CORBA/Request.java b/libjava/classpath/org/omg/CORBA/Request.java
new file mode 100644
index 00000000000..f299d426b8a
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/Request.java
@@ -0,0 +1,242 @@
+/* Request.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;
+
+
+/**
+ * An object, containing the information, needed to invoke the method of
+ * the local or remote CORBA object. The Request is used in
+ * Dynamic Invocation Interface (DII) which allows dynamic creation of
+ * requests.
+ *
+ * @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
+ */
+public abstract class Request
+{
+ /**
+ * Add the named input parameter that passes value to
+ * the method being invoked. This is similar to the "passing by value"
+ * conception.
+ *
+ * The created parameter is returned allowing to set the value.
+ *
+ * @return the created parameter.
+ */
+ public abstract Any add_in_arg();
+
+ /**
+ * Add the input/output parameter that passes value both to and from
+ * the method being invoked. This is similar to the "passing by reference"
+ * conception.
+ *
+ * The created parameter is returned allowing to set the value.
+ *
+ * @return the created parameter.
+ */
+ public abstract Any add_inout_arg();
+
+ /**
+ * Add the named input parameter that passes value to
+ * the method being invoked. This is similar to the "passing by value"
+ * conception.
+ *
+ * The created parameter is returned allowing to set the value.
+ *
+ * @param name the parameter name.
+ *
+ * @return the created parameter.
+ */
+ public abstract Any add_named_in_arg(String name);
+
+ /**
+ * Add the named input/output parameter that passes value both to and from
+ * the method being invoked. This is similar to the "passing by reference"
+ * conception.
+ *
+ * The created parameter is returned allowing to set the value.
+ *
+ * @param name the parameter name.
+ *
+ * @return the created parameter.
+ */
+ public abstract Any add_named_inout_arg(String name);
+
+ /**
+ * Add the named output parameter that passes value from
+ * the method being invoked. Differently from the java
+ * language, the CORBA IDL method can return multiple values.
+ *
+ * The created parameter is returned allowing to set the value.
+ *
+ * @param name the parameter name.
+ *
+ * @return the created parameter.
+ */
+ public abstract Any add_named_out_arg(String name);
+
+ /**
+ * Add the output parameter that passes value from
+ * the method being invoked. Differently from the java
+ * language, the CORBA IDL method can return multiple values.
+ *
+ * The created parameter is returned allowing to set the value.
+ *
+ * @return the created parameter.
+ */
+ public abstract Any add_out_arg();
+
+ /**
+ * Return the list of all previously added parameters.
+ *
+ * @return the list of parameters.
+ */
+ public abstract NVList arguments();
+
+ /**
+ * Get the context list object for this request.
+ *
+ * @return a list of strings that must be resolved and sent with the
+ * invocation.
+ */
+ public abstract ContextList contexts();
+
+ /**
+ * Get the context, previously set using {@link #cts(Context)}.
+ * The context contains the details about this request.
+ */
+ public abstract Context ctx();
+
+ /**
+ * Set the context that shuld be later returned by {@link #ctx()}.
+ * This context contains the details about this request.
+ *
+ * @param a_context a context to set.
+ */
+ public abstract void ctx(Context a_context);
+
+ /**
+ * Returns the container, eclosing an exception that the invoked method
+ * has thrown.
+ *
+ * @return the Environment object, containng the exception.
+ */
+ public abstract Environment env();
+
+ /**
+ * List the exceptions that may be thrown by the CORBA object method being
+ * invoked.
+ *
+ * @return the list of exceptions.
+ */
+ public abstract ExceptionList exceptions();
+
+ /**
+ * Allow to access the response that has been previously sent using
+ * {@link send_deferred()}.
+ *
+ * @throws WrongTransaction if the transaction scope mismatches.
+ */
+ public abstract void get_response()
+ throws WrongTransaction;
+
+ /**
+ * Submit the request, suspending the current thread until the
+ * answer is received.
+ */
+ public abstract void invoke();
+
+ /**
+ * Get the name of the method being invoked.
+ *
+ * @return the name of the method being invoked.
+ */
+ public abstract String operation();
+
+ /**
+ * Check if the response is received to the request that was
+ * previously send using {@link send_deferred()}.
+ *
+ * @return true if the response has been already received, false otherwise.
+ */
+ public abstract boolean poll_response();
+
+ /**
+ * Get the value, returned by the method, together with its name.
+ *
+ * @return the value, returned by the method.
+ */
+ public abstract NamedValue result();
+
+ /**
+ * Get the value, returned by the method.
+ *
+ * @return the value, returned by the method.
+ */
+ public abstract Any return_value();
+
+ /**
+ * Send a request without suspending the current thread.
+ *
+ * Allow later check of the request status by {@link #poll_response()} and
+ * retrieving the results by {@link #get_response()}.
+ */
+ public abstract void send_deferred();
+
+ /**
+ * Send a request and forget about it, not waiting for a response.
+ * This can be done also for methods that normally are expected
+ * to return some values.
+ */
+ public abstract void send_oneway();
+
+ /**
+ * Set the return type.
+ *
+ * @param returns the type of the value, returned in response to this
+ * request.
+ */
+ public abstract void set_return_type(TypeCode returns);
+
+ /**
+ * Return the CORBA object on that the method would be invoked.
+ *
+ * @return the invocation target.
+ */
+ public abstract org.omg.CORBA.Object target();
+}
diff --git a/libjava/classpath/org/omg/CORBA/ServerRequest.java b/libjava/classpath/org/omg/CORBA/ServerRequest.java
new file mode 100644
index 00000000000..38bb9fe9051
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/ServerRequest.java
@@ -0,0 +1,164 @@
+/* ServerRequest.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;
+
+/**
+ * This class was expected to be part of the dynamic skeleton interface,
+ * but it is almost never used in the code, generated by IDL to java compiler.
+ * The recent tendention is to skip the request step, reading the method
+ * arguments from the CDR input stream directly. The supplementing class
+ * {@link DynamicImplementation} has already been deprecated in java 1.2
+ * version.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public abstract class ServerRequest
+{
+ /**
+ * Get the context information.
+ */
+ public abstract Context ctx();
+
+ /**
+ * Should return the name of the operation (method) being invoked.
+ * Following the 1.4 specification, it does not, and must be overridden to
+ * get functionality.
+ *
+ * @return the name of the operation being invoked. The object attribute
+ * access operations are called _get_&lt;attribute_name&gt;
+ * and _set_&lt;attribute_name&gt;.
+ *
+ * @throws NO_IMPLEMENT, always.
+ */
+ public String operation()
+ {
+ throw new NO_IMPLEMENT();
+ }
+
+ /**
+ * Should specify the method parameter types and retrieve the
+ * values that must be passed to the method being called. Following
+ * the 1.4 specification, it does not, and must be overridden to
+ * get functionality.
+ *
+ * @param args the method parameters.
+ *
+ * @throws NO_IMPLEMENT, always.
+ */
+ public void arguments(NVList args)
+ {
+ throw new NO_IMPLEMENT();
+ }
+
+ /**
+ * Should specify the return value for the call. Following
+ * the 1.4 specification, it does not, and must be overridden to
+ * get functionality.
+ *
+ * @param result the return value.
+ *
+ * @throws NO_IMPLEMENT, always.
+ */
+ public void set_result(Any result)
+ {
+ throw new NO_IMPLEMENT();
+ }
+
+ /**
+ * Should set the exception that has been thrown during
+ * the method invocation. Following the 1.4 specification, it does not,
+ * and must be overridden to get functionality.
+ *
+ * @param exc the Any, holding the exception.
+ *
+ * @throws NO_IMPLEMENT, always.
+ */
+ public void set_exception(Any exc)
+ {
+ throw new NO_IMPLEMENT();
+ }
+
+ /**
+ * This method is deprecated, {@link #set_result} (same parameter).
+ *
+ * @deprecated since 1.2
+ *
+ * @throws NO_IMPLEMENT, always.
+ */
+ public void result(Any r)
+ {
+ throw new NO_IMPLEMENT();
+ }
+
+ /**
+ * This method is deprecated, use {@link #set_exception} (same parameter).
+ *
+ * @deprecated since 1.2.
+ *
+ * @throws NO_IMPLEMENT, always.
+ */
+ public void except(Any exc)
+ {
+ throw new NO_IMPLEMENT();
+ }
+
+ /**
+ * This method is deprecated, use {@link #arguments} (same parameter).
+ *
+ * @deprecated since 1.2
+ *
+ * @throws NO_IMPLEMENT, always.
+ */
+ public void params(NVList args)
+ {
+ throw new NO_IMPLEMENT();
+ }
+
+ /**
+ * This method is deprecated, use {@link #operation} (same parameter).
+ *
+ * @deprecated since 1.2
+ *
+ * @throws NO_IMPLEMENT, always.
+ */
+ public String op_name()
+ {
+ throw new NO_IMPLEMENT();
+ }
+}
diff --git a/libjava/classpath/org/omg/CORBA/ServiceDetail.java b/libjava/classpath/org/omg/CORBA/ServiceDetail.java
new file mode 100644
index 00000000000..a709f7cf068
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/ServiceDetail.java
@@ -0,0 +1,81 @@
+/* ServiceDetail.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;
+
+import org.omg.CORBA.portable.IDLEntity;
+
+/**
+ * An object, representing one of the additional details about the
+ * particular ORB service.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public final class ServiceDetail
+ implements IDLEntity
+{
+ /**
+ * The type of the information, defined by this detail.
+ */
+ public int service_detail_type;
+
+ /**
+ * The binary data, defining the information.
+ */
+ public byte[] service_detail;
+
+ /**
+ * Create an unitialised instance.
+ */
+ public ServiceDetail()
+ {
+ }
+
+ /**
+ * Create the instance of the service detail, initialising its fields
+ * to the given values.
+ *
+ * @param _service_detail_type the service detail type.
+ * @param _service_detail the service detail.
+ */
+ public ServiceDetail(int _service_detail_type, byte[] _service_detail)
+ {
+ service_detail_type = _service_detail_type;
+ service_detail = _service_detail;
+ }
+}
diff --git a/libjava/classpath/org/omg/CORBA/ServiceDetailHelper.java b/libjava/classpath/org/omg/CORBA/ServiceDetailHelper.java
new file mode 100644
index 00000000000..37b4f835127
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/ServiceDetailHelper.java
@@ -0,0 +1,172 @@
+/* ServiceDetailHelper.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;
+
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+import gnu.CORBA.*;
+
+/**
+ * The helper operations on the Service Detail.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public abstract class ServiceDetailHelper
+{
+ /**
+ * The service detail repository id.
+ */
+ private static String _id = "IDL:omg.org/CORBA/ServiceDetail:1.0";
+
+ /**
+ * The cached typecode value, computed once.
+ */
+ private static TypeCode typeCode;
+
+ /**
+ * Extract the service detail info from the given {@link Any}
+ *
+ * @param a the Any to extract from.
+ *
+ * @return the extracted detail.
+ *
+ * @throws BAD_OPERATION if the parameter holds something different
+ * from the ServiceDetail.
+ */
+ public static ServiceDetail extract(Any a)
+ {
+ try
+ {
+ return ((ServiceDetailHolder) a.extract_Streamable()).value;
+ }
+ catch (ClassCastException ex)
+ {
+ throw new BAD_OPERATION();
+ }
+ }
+
+ /**
+ * Get the service detail repository id.
+ *
+ * @return the service detail repository id,
+ * <code>IDL:omg.org/CORBA/ServiceDetail:1.0</code>, always.
+ */
+ public static String id()
+ {
+ return _id;
+ }
+
+ /**
+ * Insert the service detail into the given {@link Any}.
+ *
+ * @param a the Any to insert into.
+ *
+ * @param that the detail to insert.
+ */
+ public static void insert(Any a, ServiceDetail that)
+ {
+ a.insert_Streamable(new ServiceDetailHolder(that));
+ }
+
+ /**
+ * Read the service detail information from the given CDR
+ * intput stream. First reads the type, then the flexible
+ * length byte sequence.
+ *
+ * @param istream a stram to read from.
+ *
+ * @return the loaded service detail.
+ */
+ public static ServiceDetail read(InputStream istream)
+ {
+ ServiceDetail value = new ServiceDetail();
+ value.service_detail_type = istream.read_ulong();
+
+ int l = istream.read_long();
+ value.service_detail = new byte[ l ];
+ istream.read_octet_array(value.service_detail, 0, l);
+ return value;
+ }
+
+ /**
+ * Get the typecode of the service detail, assuming to be it
+ * a structure with the two fields.
+ *
+ * @return the newly created or cached typecode value.
+ */
+ public static TypeCode type()
+ {
+ if (typeCode == null)
+ {
+ ORB orb = ORB.init();
+
+ StructMember[] members = new StructMember[ 2 ];
+
+ TypeCode type =
+ orb.create_alias_tc(_id, "ServiceDetailType",
+ orb.get_primitive_tc(TCKind.tk_ulong)
+ );
+ members [ 0 ] = new StructMember("service_detail_type", type, null);
+
+ TypeCode data =
+ orb.create_sequence_tc(0, orb.get_primitive_tc(TCKind.tk_octet));
+ members [ 1 ] = new StructMember("service_detail", data, null);
+
+ typeCode = orb.create_struct_tc(id(), "ServiceDetail", members);
+ }
+ return typeCode;
+ }
+
+ /**
+ * Write the service detail data to the given CDR output stream.
+ * Writes the detail type first, then the detail type data
+ * as the variable length byte sequence.
+ *
+ * @param ostream a stream to write into.
+ * @param value a value to write.
+ */
+ public static void write(OutputStream ostream, ServiceDetail value)
+ {
+ ostream.write_ulong(value.service_detail_type);
+ ostream.write_long(value.service_detail.length);
+ ostream.write_octet_array(value.service_detail, 0,
+ value.service_detail.length
+ );
+ }
+}
diff --git a/libjava/classpath/org/omg/CORBA/ServiceInformation.java b/libjava/classpath/org/omg/CORBA/ServiceInformation.java
new file mode 100644
index 00000000000..c4ec7f1da23
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/ServiceInformation.java
@@ -0,0 +1,88 @@
+/* ServiceInformation.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;
+
+import org.omg.CORBA.portable.IDLEntity;
+
+/**
+ * Stores information about the CORBA service, available from some ORB.
+ *
+ * This class is part of the service information support, but the
+ * 1.4 API specification states that this support should be not implemented.
+ *
+ * @see ORB#get_service_information
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public final class ServiceInformation
+ implements IDLEntity
+{
+ /**
+ * The array of service details, defining the various aspects of this
+ * service.
+ */
+ public ServiceDetail[] service_details;
+
+ /**
+ * The array, defining various options of this service.
+ */
+ public int[] service_options;
+
+ /**
+ * Create an unitialised instance of the service information.
+ */
+ public ServiceInformation()
+ {
+ }
+
+ /**
+ * Create an instance of the service information, intialised with
+ * the passed values.
+ *
+ * @param _service_options the service options.
+ * @param _service_details the service details.
+ */
+ public ServiceInformation(int[] _service_options,
+ ServiceDetail[] _service_details
+ )
+ {
+ service_options = _service_options;
+ service_details = _service_details;
+ }
+}
diff --git a/libjava/classpath/org/omg/CORBA/ServiceInformationHelper.java b/libjava/classpath/org/omg/CORBA/ServiceInformationHelper.java
new file mode 100644
index 00000000000..78a21d1826f
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/ServiceInformationHelper.java
@@ -0,0 +1,154 @@
+/* ServiceInformationHelper.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;
+
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+
+/**
+ * Helper operations for the service information.
+ *
+ * This class is part of the service information support, but the
+ * 1.4 API specification states that this support should be not implemented.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public abstract class ServiceInformationHelper
+{
+ /**
+ * The service information repository id.
+ */
+ private static String _id = "IDL:org/omg/CORBA/ServiceInformation:1.0";
+
+ /**
+ * The caches typecode value, computed once.
+ */
+ private static TypeCode typeCode;
+
+ /**
+ * Extract the service information from the given Any.
+ */
+ public static ServiceInformation extract(Any a)
+ {
+ return read(a.create_input_stream());
+ }
+
+ /**
+ * Get the service information repositroy id.
+ */
+ public static String id()
+ {
+ return _id;
+ }
+
+ /**
+ * Insert the service information into the given Any.
+ */
+ public static void insert(Any a, ServiceInformation that)
+ {
+ OutputStream out = a.create_output_stream();
+ a.type(type());
+ write(out, that);
+ a.read_value(out.create_input_stream(), type());
+ }
+
+ /**
+ * Read the service information from the given CDR input stream.
+ */
+ public static ServiceInformation read(InputStream istream)
+ {
+ ServiceInformation value = new ServiceInformation();
+ value.service_options = LongSeqHelper.read(istream);
+
+ int n = istream.read_ulong();
+ value.service_details = new ServiceDetail[ n ];
+
+ for (int i = 0; i < n; i++)
+ value.service_details [ i ] = ServiceDetailHelper.read(istream);
+ return value;
+ }
+
+ /**
+ * Get the service information typecode.
+ */
+ public static TypeCode type()
+ {
+ if (typeCode == null)
+ {
+ ORB orb = ORB.init();
+
+ StructMember[] members = new StructMember[ 2 ];
+ TypeCode member;
+
+ member =
+ orb.create_alias_tc("IDL:omg.org/CORBA/ServiceOptionSeq:1.0",
+ "ServiceOptionSeq", LongSeqHelper.type()
+ );
+
+ members [ 0 ] = new StructMember("service_options", member, null);
+
+ member = ServiceDetailHelper.type();
+ member = orb.create_sequence_tc(0, member);
+ member =
+ orb.create_alias_tc("IDL:omg.org/CORBA/ServiceDetailSeq:1.0",
+ "ServiceDetailSeq", member
+ );
+ members [ 1 ] = new StructMember("service_details", member, null);
+
+ typeCode =
+ orb.create_struct_tc(ServiceInformationHelper.id(),
+ "ServiceInformation", members
+ );
+ }
+ return typeCode;
+ }
+
+ /**
+ * Write the service information to the given CDR output stream.
+ */
+ public static void write(OutputStream ostream, ServiceInformation value)
+ {
+ LongSeqHelper.write(ostream, value.service_options);
+
+ ostream.write_ulong(value.service_details.length);
+
+ for (int i = 0; i < value.service_details.length; i++)
+ ServiceDetailHelper.write(ostream, value.service_details [ i ]);
+ }
+}
diff --git a/libjava/classpath/org/omg/CORBA/ServiceInformationHolder.java b/libjava/classpath/org/omg/CORBA/ServiceInformationHolder.java
new file mode 100644
index 00000000000..7b15d6f1f77
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/ServiceInformationHolder.java
@@ -0,0 +1,101 @@
+/* ServiceInformationHolder.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;
+
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+import org.omg.CORBA.portable.Streamable;
+
+/**
+ * A holder for the service information.
+ *
+ * This class is part of the service information support, but the
+ * 1.4 API specification states that this support should be not implemented.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public final class ServiceInformationHolder
+ implements Streamable
+{
+ /**
+ * A wrapped value.
+ */
+ public ServiceInformation value;
+
+ /**
+ * Create an unitialised instance.
+ */
+ public ServiceInformationHolder()
+ {
+ }
+
+ /**
+ * Create the instance where the stored service information
+ * s intialised into the given value.
+ */
+ public ServiceInformationHolder(ServiceInformation initialValue)
+ {
+ value = initialValue;
+ }
+
+ /**
+ * Read the service information from the given CDR input stream.
+ */
+ public void _read(InputStream in)
+ {
+ value = ServiceInformationHelper.read(in);
+ }
+
+ /**
+ * Get the typecode of the service information.
+ */
+ public TypeCode _type()
+ {
+ return ServiceInformationHelper.type();
+ }
+
+ /**
+ * Write the stored service information into the given
+ * CDR output stream.
+ */
+ public void _write(OutputStream out)
+ {
+ ServiceInformationHelper.write(out, value);
+ }
+}
diff --git a/libjava/classpath/org/omg/CORBA/SetOverrideType.java b/libjava/classpath/org/omg/CORBA/SetOverrideType.java
new file mode 100644
index 00000000000..ebf906cbc06
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/SetOverrideType.java
@@ -0,0 +1,136 @@
+/* SetOverrideType.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;
+
+import java.io.Serializable;
+
+import org.omg.CORBA.portable.IDLEntity;
+
+/**
+ * Defines the instruction, how the newly specified policies can be
+ * taken into consideration. The policies can be either
+ * added to the current policies or replace them.
+ *
+ * @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
+ */
+public class SetOverrideType
+ implements Serializable, IDLEntity
+{
+ /**
+ * Use v 1.4 serialVersionUID for interoperability.
+ */
+ private static final long serialVersionUID = -2761857189425106972L;
+
+ /**
+ * Add the new policies to the existing policies.
+ */
+ public static final int _ADD_OVERRIDE = 1;
+
+ /**
+ * Replace the new existing policies by the new policies.
+ */
+ public static final int _SET_OVERRIDE = 0;
+
+ /**
+ * Add the new policies to the existing policies.
+ * An instance of SetOverrideType, initialized to _ADD_OVERRIDE.
+ */
+ public static final SetOverrideType ADD_OVERRIDE =
+ new SetOverrideType(_ADD_OVERRIDE);
+
+ /**
+ * Replace the new existing policies by the new policies.
+ * An instance of SetOverrideType, initialized to _SET_OVERRIDE.
+ */
+ public static final SetOverrideType SET_OVERRIDE =
+ new SetOverrideType(_SET_OVERRIDE);
+
+ private final int _value;
+
+ /**
+ * No other instances can be created.
+ */
+ protected SetOverrideType(int a_value)
+ {
+ _value = a_value;
+ }
+
+ /**
+ * Returns the SetOverrideType, matching the given integer constant
+ * @param kind one of _ADD_OVERRIDE or _SET_OVERRIDE.
+ *
+ * @return one of ADD_OVERRIDE or SET_OVERRIDE.
+ *
+ * @throws BAD_PARAM if the parameter is not one of these two values.
+ */
+ public static SetOverrideType from_int(int kind)
+ {
+ switch (kind)
+ {
+ case _ADD_OVERRIDE :
+ return ADD_OVERRIDE;
+
+ case _SET_OVERRIDE :
+ return SET_OVERRIDE;
+
+ default :
+ throw new BAD_PARAM("invalid add/override type " + kind);
+ }
+ }
+
+ /**
+ * Returns a short string representation.
+ *
+ * @return either "add" or "replace".
+ */
+ public String toString()
+ {
+ return (_value == _ADD_OVERRIDE) ? "add" : "replace";
+ }
+
+ /**
+ * Returns the value, representing stored instruction.
+ *
+ * @return one of ADD_OVERRIDE or SET_OVERRIDE
+ */
+ public int value()
+ {
+ return _value;
+ }
+}
diff --git a/libjava/classpath/org/omg/CORBA/SetOverrideTypeHelper.java b/libjava/classpath/org/omg/CORBA/SetOverrideTypeHelper.java
new file mode 100644
index 00000000000..bfdad683e92
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/SetOverrideTypeHelper.java
@@ -0,0 +1,128 @@
+/* SetOverrideTypeHelper.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;
+
+import gnu.CORBA.SetOverrideTypeHolder;
+import gnu.CORBA.Restricted_ORB;
+
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+
+/**
+ * A helper operations for the definition kind.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public abstract class SetOverrideTypeHelper
+{
+ /**
+ * The cached typecode value, computed only once.
+ */
+ private static TypeCode typeCode;
+
+ /**
+ * Insert the definition kind into the given Any.
+ */
+ public static void insert(Any any, SetOverrideType that)
+ {
+ any.insert_Streamable(new SetOverrideTypeHolder(that));
+ }
+
+ /**
+ * Extract the definition kind from the given Any.
+ */
+ public static SetOverrideType extract(Any any)
+ {
+ return ((SetOverrideTypeHolder) any.extract_Streamable()).value;
+ }
+
+ /**
+ * Get the definition kind typecode (enumeration, named "SetOverrideType").
+ * The typecode states that the enumeration can obtain one of
+ * the following values: SET_OVERRIDE ,ADD_OVERRIDE .
+ */
+ public static TypeCode type()
+ {
+ if (typeCode == null)
+ {
+ String[] members =
+ new String[]
+ {
+ "SET_OVERRIDE" ,"ADD_OVERRIDE"
+ };
+
+ typeCode =
+ Restricted_ORB.Singleton.create_enum_tc(id(), "SetOverrideType",
+ members
+ );
+ }
+ return typeCode;
+ }
+
+ /**
+ * Get the definition kind repository id.
+ *
+ * @return "IDL:omg.org/CORBA/SetOverrideType:1.0", always.
+ */
+ public static String id()
+ {
+ return "IDL:omg.org/CORBA/SetOverrideType:1.0";
+ }
+
+ /**
+ * Read the enumeration value (as int) from the CDR intput stream.
+ *
+ * @param istream a stream to read from.*
+ */
+ public static SetOverrideType read(InputStream istream)
+ {
+ return SetOverrideType.from_int(istream.read_long());
+ }
+
+ /**
+ * Write the enumeration value (as int) to the CDR output stream.
+ *
+ * @param ostream a stream to write into.
+ * @param value a value to write.
+ */
+ public static void write(OutputStream ostream, SetOverrideType value)
+ {
+ ostream.write_long(value.value());
+ }
+}
diff --git a/libjava/classpath/org/omg/CORBA/ShortHolder.java b/libjava/classpath/org/omg/CORBA/ShortHolder.java
new file mode 100644
index 00000000000..c2e18cb2a8b
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/ShortHolder.java
@@ -0,0 +1,127 @@
+/* ShortHolder.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;
+
+import gnu.CORBA.primitiveTypeCode;
+
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+import org.omg.CORBA.portable.Streamable;
+
+/**
+ * A holder for CORBA <code>short</code> that is mapped into
+ * java <code>short</code>.
+ *
+ * The holders have several application areas. The end user usually
+ * sees them implementing CORBA methods where the primitive type
+ * is passed by reference. While CORBA (or, for example, C) supports
+ * this, the java does not and a wrapper class is required.
+ *
+ * @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
+ */
+public final class ShortHolder
+ implements Streamable
+{
+ /**
+ * The default type code for this holder.
+ */
+ private static final TypeCode t_short =
+ new primitiveTypeCode(TCKind.tk_short);
+
+ /**
+ * The <code>short</code> (CORBA <code>short</code>) value,
+ * held by this ShortHolder.
+ */
+ public short value;
+
+ /**
+ * Constructs an instance of ShortHolder,
+ * initializing {@link #value} to <code>0</code>.
+ */
+ public ShortHolder()
+ {
+ }
+
+ /**
+ * Constructs an instance of ShortHolder,
+ * initializing {@link #value} to the given <code>short</code>.
+ *
+ * @param initial_value a value that will be assigned to the
+ * {@link #value} field.
+ */
+ public ShortHolder(short initial_value)
+ {
+ value = initial_value;
+ }
+
+ /**
+ * Fill in the {@link value } field by reading the required data
+ * from the given stream. For <code>short</code>, the functionality
+ * is delegated to
+ * {@link org.omg.CORBA.portable.InputStream#read_short}.
+ *
+ * @param input the input stream to read from.
+ */
+ public void _read(InputStream input)
+ {
+ value = input.read_short();
+ }
+
+ /**
+ * Returns the TypeCode, corresponding the CORBA type that is stored
+ * using this holder.
+ */
+ public TypeCode _type()
+ {
+ return t_short;
+ }
+
+ /**
+ * Write the {@link value } field to the given stream.
+ * For <code>short</code>, the functionality
+ * is delegated to
+ * {@link org.omg.CORBA.portable.OutputStream#write_short(short) }.
+ *
+ * @param output the output stream to write into.
+ */
+ public void _write(OutputStream output)
+ {
+ output.write_short(value);
+ }
+}
diff --git a/libjava/classpath/org/omg/CORBA/ShortSeqHelper.java b/libjava/classpath/org/omg/CORBA/ShortSeqHelper.java
new file mode 100644
index 00000000000..21eda87d110
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/ShortSeqHelper.java
@@ -0,0 +1,142 @@
+/* ShortSeqHelper.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;
+
+import gnu.CORBA.primitiveArrayTypeCode;
+
+import org.omg.CORBA.TypeCodePackage.BadKind;
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+
+/**
+ * Provides static helper methods for working with
+ * CORBA sequence of <code>short</code>
+ * (<code>ShortSeq</code>).
+ *
+ * @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
+ */
+public abstract class ShortSeqHelper
+{
+ /**
+ * Extract the <code>short[]</code> from the
+ * given {@link Any}. This implementation expects the
+ * {@link Any} to hold the instance of {@link ShortSeqHolder}
+ * that is returned by {@link Any#extract_Streamable() }.
+ *
+ * @param a an Any to extract the array from.
+ *
+ * @return the extracted array.
+ *
+ * @throws ClassCastException if the Any contains something other than the
+ * the {@link ShortSeqHolder}.
+ */
+ public static short[] extract(Any a)
+ {
+ ShortSeqHolder h = (ShortSeqHolder) a.extract_Streamable();
+ return h.value;
+ }
+
+ /**
+ * Returns the agreed Id, delegating functionality to
+ * the {@link #type()}.id().
+ */
+ public static String id()
+ {
+ try
+ {
+ return type().id();
+ }
+ catch (BadKind ex)
+ {
+ // Should never happen under correct work.
+ throw new Error("Please report this bug.", ex);
+ }
+ }
+
+ /**
+ * Insert into the given <code>short[]</code> into the
+ * given {@link Any}. This implementation first creates
+ * a {@link ShortSeqHolder} and then calls
+ * {@link Any#insert_Streamable(Streamable)}.
+ *
+ * @param into the target Any.
+ * @param that the array to insert.
+ */
+ public static void insert(Any into, short[] that)
+ {
+ ShortSeqHolder holder = new ShortSeqHolder(that);
+ into.insert_Streamable(holder);
+ }
+
+ /**
+ * Reads the <code>short[]</code> from the CORBA input stream.
+ *
+ * @param input the CORBA (not java.io) stream to read from.
+ * @return the value from the stream.
+ */
+ public static short[] read(InputStream input)
+ {
+ short[] value = new short[ input.read_long() ];
+ input.read_short_array(value, 0, value.length);
+ return value;
+ }
+
+ /**
+ * Creates and returns a new instance of the TypeCode,
+ * corresponding the CORBA <code>ShortSeq</code>.
+ * The length of the sequence is left with the initial
+ * value 0.
+ */
+ public static TypeCode type()
+ {
+ return new primitiveArrayTypeCode(TCKind.tk_short);
+ }
+
+ /**
+ * Writes the <code>short[]</code> into the given stream.
+ *
+ * @param output the CORBA (not java.io) output stream to write.
+ * @param value the value that must be written.
+ */
+ public static void write(OutputStream output, short[] value)
+ {
+ output.write_long(value.length);
+ output.write_short_array(value, 0, value.length);
+ }
+}
diff --git a/libjava/classpath/org/omg/CORBA/ShortSeqHolder.java b/libjava/classpath/org/omg/CORBA/ShortSeqHolder.java
new file mode 100644
index 00000000000..183db3a5770
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/ShortSeqHolder.java
@@ -0,0 +1,126 @@
+/* ShortSeqHolder.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;
+
+import gnu.CORBA.primitiveArrayTypeCode;
+
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+import org.omg.CORBA.portable.Streamable;
+
+/**
+ * A sequence holder for CORBA <code>ShortSeq</code> that is mapped into
+ * java <code>short[]</code>.
+ *
+ * @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
+ */
+public final class ShortSeqHolder
+ implements Streamable
+{
+ /**
+ * The <code>short[]</code> (CORBA <code>ShortSeq</code>) value,
+ * held by this ShortSeqHolder.
+ */
+ public short[] value;
+
+ /**
+ * The type code for this holder. Each holder has a different instance.
+ */
+ private final primitiveArrayTypeCode typecode =
+ new primitiveArrayTypeCode(TCKind.tk_short);
+
+ /**
+ * Constructs an instance of ShortSeqHolder,
+ * initializing {@link #value} to <code>null</code>.
+ */
+ public ShortSeqHolder()
+ {
+ }
+
+ /**
+ * Constructs an instance of ShortSeqHolder,
+ * initializing {@link #value} to the given <code>short[]</code>.
+ *
+ * @param initial_value a value that will be assigned to the
+ * {@link #value} field.
+ */
+ public ShortSeqHolder(short[] initial_value)
+ {
+ value = initial_value;
+ typecode.setLength(value.length);
+ }
+
+ /**
+ * Fill in the {@link value } field by reading the required data
+ * from the given stream. This method first reads the array size
+ * (as CORBA <code>long</code>) and then calls the
+ * {@link org.omg.CORBA.portable.InputStream#read_short_array }.
+ *
+ * @param input the input stream to read from.
+ */
+ public void _read(InputStream input)
+ {
+ value = new short[ input.read_long() ];
+ input.read_short_array(value, 0, value.length);
+ typecode.setLength(value.length);
+ }
+
+ /**
+ * Returns the TypeCode, corresponding the CORBA type that is stored
+ * using this holder.
+ */
+ public TypeCode _type()
+ {
+ return typecode;
+ }
+
+ /**
+ * Write the {@link value } field to the given stream.
+ * This method first writes the array size
+ * (as CORBA <code>long</code>) and then calls the
+ * {@link org.omg.CORBA.portable.OutputStream#write_short_array }.
+ *
+ * @param output the output stream to write into.
+ */
+ public void _write(OutputStream output)
+ {
+ output.write_long(value.length);
+ output.write_short_array(value, 0, value.length);
+ }
+}
diff --git a/libjava/classpath/org/omg/CORBA/StringHolder.java b/libjava/classpath/org/omg/CORBA/StringHolder.java
new file mode 100644
index 00000000000..8a637c8e57f
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/StringHolder.java
@@ -0,0 +1,128 @@
+/* StringHolder.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;
+
+import gnu.CORBA.stringTypeCode;
+
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+import org.omg.CORBA.portable.Streamable;
+
+/**
+ * A holder for CORBA <code>string</code> that is mapped into
+ * java <code>String</code>.
+ *
+ * The holders have several application areas. The end user usually
+ * sees them implementing CORBA methods where the primitive type
+ * is passed by reference. While CORBA (or, for example, C) supports
+ * this, the java does not and a wrapper class is required.
+ *
+ * @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
+ */
+public final class StringHolder
+ implements Streamable
+{
+ /**
+ * The default type code for this holder.
+ */
+ private static final stringTypeCode t_string =
+ new stringTypeCode(TCKind.tk_string);
+
+ /**
+ * The <code>String</code> (CORBA <code>string</code>) value,
+ * held by this StringHolder.
+ */
+ public String value;
+
+ /**
+ * Constructs an instance of StringHolder,
+ * initializing {@link #value} to <code>null</code>.
+ */
+ public StringHolder()
+ {
+ }
+
+ /**
+ * Constructs an instance of StringHolder,
+ * initializing {@link #value} to the given <code>String</code>.
+ *
+ * @param initial_value a value that will be assigned to the
+ * {@link #value} field.
+ */
+ public StringHolder(String initial_value)
+ {
+ value = initial_value;
+ }
+
+ /**
+ * Fill in the {@link #value } field by reading the required data
+ * from the given stream. For <code>string</code>, the functionality
+ * is delegated to
+ * {@link org.omg.CORBA.portable.InputStream#read_string}.
+ *
+ * @param input the input stream to read from.
+ */
+ public void _read(InputStream input)
+ {
+ value = input.read_string();
+ }
+
+ /**
+ * Returns the TypeCode, corresponding the CORBA type that is stored
+ * using this holder. The {@link TypeCode#length()} method of the
+ * returned typecode always returns 0.
+ */
+ public TypeCode _type()
+ {
+ return t_string;
+ }
+
+ /**
+ * Write the {@link #value } field to the given stream.
+ * For <code>string</code>, the functionality
+ * is delegated to
+ * {@link org.omg.CORBA.portable.OutputStream#write_string(String) }.
+ *
+ * @param output the output stream to write into.
+ */
+ public void _write(OutputStream output)
+ {
+ output.write_string(value);
+ }
+}
diff --git a/libjava/classpath/org/omg/CORBA/StringSeqHelper.java b/libjava/classpath/org/omg/CORBA/StringSeqHelper.java
new file mode 100644
index 00000000000..0ae2646795a
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/StringSeqHelper.java
@@ -0,0 +1,144 @@
+/* StringSeqHelper.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;
+
+import gnu.CORBA.primitiveArrayTypeCode;
+
+import org.omg.CORBA.TypeCodePackage.BadKind;
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+
+/**
+ * Provides static helper methods for working with
+ * CORBA <code>string</code> array.
+ *
+ * @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
+ */
+public abstract class StringSeqHelper
+{
+ /**
+ * Extract the <code>String[]</code> from the
+ * given {@link Any}. This implementation expects the
+ * {@link Any} to hold the instance of {@link StringSeqHolder}
+ * that is returned by {@link Any#extract_Streamable() }.
+ *
+ * @param a an Any to extract the array from.
+ *
+ * @return the extracted array.
+ *
+ * @throws ClassCastException if the Any contains something other than the
+ * the {@link StringSeqHolder}.
+ */
+ public static String[] extract(Any a)
+ {
+ StringSeqHolder h = (StringSeqHolder) a.extract_Streamable();
+ return h.value;
+ }
+
+ /**
+ * Returns the agreed Id, delegating functionality to
+ * the {@link #type()}.id().
+ */
+ public static String id()
+ {
+ try
+ {
+ return type().id();
+ }
+ catch (BadKind ex)
+ {
+ // Should never happen under correct work.
+ throw new Error("Please report this bug.", ex);
+ }
+ }
+
+ /**
+ * Insert into the given <code>String[]</code> into the
+ * given {@link Any}. This implementation first creates
+ * a {@link StringSeqHolder} and then calls
+ * {@link Any#insert_Streamable(Streamable)}.
+ *
+ * @param into the target Any.
+ * @param that the array to insert.
+ */
+ public static void insert(Any into, String[] that)
+ {
+ StringSeqHolder holder = new StringSeqHolder(that);
+ into.insert_Streamable(holder);
+ }
+
+ /**
+ * Reads the <code>String[]</code> from the CORBA input stream.
+ *
+ * @param input the CORBA (not java.io) stream to read from.
+ * @return the value from the stream.
+ */
+ public static String[] read(InputStream input)
+ {
+ String[] value = new String[ input.read_long() ];
+ for (int i = 0; i < value.length; i++)
+ value [ i ] = input.read_string();
+ return value;
+ }
+
+ /**
+ * Creates and returns a new instance of the TypeCode,
+ * corresponding the CORBA <code>string[]</code>.
+ * The length of the sequence is left with the initial
+ * value 0.
+ */
+ public static TypeCode type()
+ {
+ return new primitiveArrayTypeCode(TCKind.tk_string);
+ }
+
+ /**
+ * Writes the <code>String[]</code> into the given stream.
+ *
+ * @param output the CORBA (not java.io) output stream to write.
+ * @param value the value that must be written.
+ */
+ public static void write(OutputStream output, String[] value)
+ {
+ output.write_long(value.length);
+
+ for (int i = 0; i < value.length; i++)
+ output.write_string(value [ i ]);
+ }
+}
diff --git a/libjava/classpath/org/omg/CORBA/StringSeqHolder.java b/libjava/classpath/org/omg/CORBA/StringSeqHolder.java
new file mode 100755
index 00000000000..8e419d23333
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/StringSeqHolder.java
@@ -0,0 +1,131 @@
+/* StringSeqHolder.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;
+
+import gnu.CORBA.primitiveArrayTypeCode;
+
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+import org.omg.CORBA.portable.Streamable;
+
+/**
+ * A sequence holder for CORBA <code>string[]</code> that is mapped into
+ * java <code>String[]</code>.
+ *
+ * @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
+ */
+public final class StringSeqHolder
+ implements Streamable
+{
+ /**
+ * The <code>String[]</code> (CORBA <code>string[]</code>) value,
+ * held by this StringSeqHolder.
+ */
+ public String[] value;
+
+ /**
+ * The type code for this holder. Each holder has a different instance.
+ */
+ private final primitiveArrayTypeCode typecode =
+ new primitiveArrayTypeCode(TCKind.tk_char);
+
+ /**
+ * Constructs an instance of StringSeqHolder,
+ * initializing {@link #value} to <code>null</code>.
+ */
+ public StringSeqHolder()
+ {
+ }
+
+ /**
+ * Constructs an instance of StringSeqHolder,
+ * initializing {@link #value} to the given <code>String</code>.
+ *
+ * @param initial_value a value that will be assigned to the
+ * {@link #value} field.
+ */
+ public StringSeqHolder(String[] initial_value)
+ {
+ value = initial_value;
+ typecode.setLength(value.length);
+ }
+
+ /**
+ * Fill in the {@link value } field by reading the required data
+ * from the given stream. This method first reads the array size
+ * (as CORBA <code>long</code>and then all strings.
+ *
+ * @param input the input stream to read from.
+ */
+ public void _read(InputStream input)
+ {
+ value = new String[ input.read_long() ];
+ for (int i = 0; i < value.length; i++)
+ {
+ value [ i ] = input.read_string();
+ }
+ typecode.setLength(value.length);
+ }
+
+ /**
+ * Returns the TypeCode, corresponding the CORBA type that is stored
+ * using this holder.
+ */
+ public TypeCode _type()
+ {
+ return typecode;
+ }
+
+ /**
+ * Write the {@link value } field to the given stream.
+ * This method first writes the array size
+ * (as CORBA <code>long</code> and then all strings.
+ *
+ * @param output the output stream to write into.
+ */
+ public void _write(OutputStream output)
+ {
+ output.write_long(value.length);
+
+ for (int i = 0; i < value.length; i++)
+ {
+ output.write_string(value [ i ]);
+ }
+ }
+}
diff --git a/libjava/classpath/org/omg/CORBA/StringValueHelper.java b/libjava/classpath/org/omg/CORBA/StringValueHelper.java
new file mode 100644
index 00000000000..97d0e7a5d06
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/StringValueHelper.java
@@ -0,0 +1,198 @@
+/* StringValueHelper.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;
+
+import gnu.CORBA.Restricted_ORB;
+import gnu.CORBA.gnuAny;
+
+import org.omg.CORBA.TypeCodePackage.BadKind;
+import org.omg.CORBA.portable.BoxedValueHelper;
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+
+import java.io.Serializable;
+
+/**
+ * Provides helper operations for the String value type, treating a
+ * String as a CORBA value type rather than as a primitive type. The OMG
+ * specification states this may be convenient in some specific
+ * cases. The typecode is different, but the reading/writing format in
+ * this implementation is the same as for the ordinary string. This is
+ * that Sun's IDL compiler (v1.4) would generate.
+ *
+ * @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
+ */
+public class StringValueHelper
+ implements BoxedValueHelper
+{
+ /**
+ * The String value helper repository Id.
+ */
+ private static final String id = "IDL:omg.org/CORBA/StringValue:1.0";
+
+ /**
+ * The cached typecode value, computed once.
+ */
+ private static TypeCode typecode;
+
+ /**
+ * The String typecode.
+ */
+ private static final TypeCode tString =
+ Restricted_ORB.Singleton.create_string_tc(0);
+
+ /**
+ * Returns the String Value repository Id.
+ * @return "IDL:omg.org/CORBA/StringValue:1.0", always.
+ */
+ public String get_id()
+ {
+ return id;
+ }
+
+ /**
+ * Returns the String Value repository Id.
+ * @return "IDL:omg.org/CORBA/StringValue:1.0", always.
+ */
+ public static String id()
+ {
+ return id;
+ }
+
+ /**
+ * Read the string value from the input stream.
+ *
+ * @param istream a stream to read from.
+ *
+ * @return a string (delegates to read_string()).
+ */
+ public Serializable read_value(InputStream istream)
+ {
+ return istream.read_string();
+ }
+
+ /**
+ * Write the given string value into the output stream.
+ *
+ * @param ostream a stream to write into.
+ * @param a_string a string to write.
+ */
+ public void write_value(OutputStream ostream, Serializable a_string)
+ {
+ try
+ {
+ ostream.write_string((String) a_string);
+ }
+ catch (ClassCastException ex)
+ {
+ throw new MARSHAL("String expected");
+ }
+ }
+
+ /**
+ * Extract the string from the given Any. The operation
+ * requires Any to hold a String value and not a String.
+ *
+ * @param an_any an Any to extract from.
+ *
+ * @return the extracted string.
+ */
+ public static String extract(Any an_any)
+ {
+ if (an_any.type().equal(type()))
+ {
+ an_any.type(tString);
+ return an_any.extract_string();
+ }
+ else
+ throw new BAD_OPERATION("Contains not a string value type");
+ }
+
+ /**
+ * Insert the string into the given Any. After the operation,
+ * the Any will have a String Value typecode and not a
+ * String typecode.
+ *
+ * @param an_any an Any to insert into.
+ *
+ * @param that a string to insert.
+ */
+ public static void insert(Any an_any, String that)
+ {
+ an_any.insert_string(that);
+ an_any.type(type());
+ }
+
+ /**
+ * Reads a string as a value type.
+ *
+ * @param in a stream to read value from.
+ */
+ public static String read(InputStream in)
+ {
+ return in.read_string();
+ }
+
+ /**
+ * Create and return the value box typecode, named "StringValue",
+ * with the content typecode being unbounded string.
+ */
+ public static TypeCode type()
+ {
+ if (typecode == null)
+ {
+ ORB orb = Restricted_ORB.Singleton;
+ typecode =
+ orb.create_value_box_tc(id(), "StringValue", tString);
+ }
+ return typecode;
+ }
+
+ /**
+ * Writes a string as a value type.
+ *
+ * @param out a stream to write value into.
+ *
+ * @param a_string a string to write.
+ */
+ public static void write(OutputStream out, String a_string)
+ {
+ out.write_string(a_string);
+ }
+} \ No newline at end of file
diff --git a/libjava/classpath/org/omg/CORBA/StructMember.java b/libjava/classpath/org/omg/CORBA/StructMember.java
new file mode 100644
index 00000000000..9e05a2260d1
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/StructMember.java
@@ -0,0 +1,94 @@
+/* StructMember.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;
+
+import java.io.Serializable;
+
+import org.omg.CORBA.portable.IDLEntity;
+
+/**
+ * The component, describing the member of CORBA IDL <code>struct</code>.
+ *
+ * @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
+ */
+public final class StructMember
+ implements IDLEntity, Serializable
+{
+ /**
+ * Use 1.4 version serialVersionUID for interoperability.
+ */
+ private static final long serialVersionUID = 2762280796480753206L;
+
+ /**
+ * The IDL type of the structure member.
+ */
+ public IDLType type_def;
+
+ /**
+ * The name of the structure member.
+ */
+ public String name;
+
+ /**
+ * The typecode of the structure member.
+ */
+ public TypeCode type;
+
+ /**
+ * Creates a structure member with all fields
+ * left with the default value <code>null</code>.
+ */
+ public StructMember()
+ {
+ }
+
+ /**
+ * Creates a structure member.
+ *
+ * @param a_name member name.
+ * @param a_type member type code.
+ * @param a_type_def member IDL type definition.
+ */
+ public StructMember(String a_name, TypeCode a_type, IDLType a_type_def)
+ {
+ name = a_name;
+ type = a_type;
+ type_def = a_type_def;
+ }
+}
diff --git a/libjava/classpath/org/omg/CORBA/StructMemberHelper.java b/libjava/classpath/org/omg/CORBA/StructMemberHelper.java
new file mode 100644
index 00000000000..72d66fa912f
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/StructMemberHelper.java
@@ -0,0 +1,177 @@
+/* StructMemberHelper.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;
+
+import gnu.CORBA.Restricted_ORB;
+import gnu.CORBA.TypeCodeHelper;
+
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+
+/**
+ * Defines a helper operations for StructMember.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public abstract class StructMemberHelper
+{
+ /**
+ * The cached typecode value, computed once.
+ */
+ private static TypeCode typeCode;
+
+ /**
+ * This flag is used when creating typecodes for the recursive structures.
+ */
+ private static boolean active;
+
+ /**
+ * Insert the structure member into the given Any.
+ */
+ public static void insert(Any a, StructMember that)
+ {
+ OutputStream out = a.create_output_stream();
+ a.type(type());
+ write(out, that);
+ a.read_value(out.create_input_stream(), type());
+ }
+
+ /**
+ * Extract the structure member from the given Any.
+ */
+ public static StructMember extract(Any a)
+ {
+ return read(a.create_input_stream());
+ }
+
+ /**
+ * Get a typecode for the StructMember.
+ */
+ public static synchronized TypeCode type()
+ {
+ if (typeCode == null)
+ {
+ ORB orb = Restricted_ORB.Singleton;
+
+ synchronized (TypeCode.class)
+ {
+ if (typeCode == null)
+ {
+ if (active)
+ {
+ return orb.create_recursive_tc(id());
+ }
+ active = true;
+
+ StructMember[] members = new StructMember[ 3 ];
+ TypeCode member = null;
+
+ member = orb.create_string_tc(0);
+ member =
+ orb.create_alias_tc(IdentifierHelper.id(), "Identifier",
+ member
+ );
+ members [ 0 ] = new StructMember("name", member, null);
+
+ member = orb.get_primitive_tc(TCKind.tk_TypeCode);
+
+ members [ 1 ] = new StructMember("type", member, null);
+ members [ 2 ] =
+ new StructMember("type_def", IDLTypeHelper.type(), null);
+ typeCode =
+ orb.create_struct_tc(StructMemberHelper.id(), "StructMember",
+ members
+ );
+ active = false;
+ }
+ }
+ }
+ return typeCode;
+ }
+
+ /**
+ * Return the StructMember repository id.
+ *
+ * @return "IDL:omg.org/CORBA/StructMember:1.0", always.
+ */
+ public static String id()
+ {
+ return "IDL:omg.org/CORBA/StructMember:1.0";
+ }
+
+ /**
+ * Read the StructMember from the input stream.
+ */
+ public static StructMember read(InputStream istream)
+ {
+ try
+ {
+ StructMember value = new StructMember();
+ value.name = istream.read_string();
+ value.type = TypeCodeHelper.read(istream);
+ value.type_def = IDLTypeHelper.read(istream);
+ return value;
+ }
+ catch (UserException ex)
+ {
+ MARSHAL m = new MARSHAL();
+ m.initCause(ex);
+ throw m;
+ }
+ }
+
+ /**
+ * Write the StructMember to the input stream.
+ */
+ public static void write(OutputStream ostream, StructMember value)
+ {
+ try
+ {
+ ostream.write_string(value.name);
+ TypeCodeHelper.write(ostream, value.type);
+ IDLTypeHelper.write(ostream, value.type_def);
+ }
+ catch (UserException ex)
+ {
+ MARSHAL m = new MARSHAL();
+ m.initCause(ex);
+ throw m;
+ }
+ }
+} \ No newline at end of file
diff --git a/libjava/classpath/org/omg/CORBA/SystemException.java b/libjava/classpath/org/omg/CORBA/SystemException.java
new file mode 100644
index 00000000000..85396ee534f
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/SystemException.java
@@ -0,0 +1,82 @@
+/* SystemException.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;
+
+import java.io.Serializable;
+
+/**
+ * The root class for all CORBA standard exceptions.
+ * @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
+ */
+public class SystemException
+ extends RuntimeException
+ implements Serializable
+{
+ /**
+ * Use serialVersionUID for interoperability.
+ * Using the version 1.4 UID.
+ */
+ private static final long serialVersionUID = -8486391734674855519L;
+
+ /**
+ * The status of the operation that have thrown this exception.
+ */
+ public CompletionStatus completed;
+
+ /**
+ * The additional exception error code ("minor").
+ */
+ public int minor;
+
+ /**
+ * Constructs an instance of the CORBA standard exception.
+ * @param a_reason a string, explaining the reason why the
+ * exceptions has been thrown.
+ * @param a_minor an additional error code (known as the "minor")
+ * @param a_completed the task completion status.
+ */
+ protected SystemException(String a_reason, int a_minor,
+ CompletionStatus a_completed
+ )
+ {
+ super(a_reason);
+ minor = a_minor;
+ completed = a_completed;
+ }
+}
diff --git a/libjava/classpath/org/omg/CORBA/TCKind.java b/libjava/classpath/org/omg/CORBA/TCKind.java
new file mode 100644
index 00000000000..0ad2d528421
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/TCKind.java
@@ -0,0 +1,504 @@
+/* TCKind.java -- java to IDL mapping constants.
+ 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;
+
+
+/**
+ * The basic constants, used in java to IDL mapping.
+ * @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
+ */
+public class TCKind
+{
+ /**
+ * The integer constant, indicating IDL data type
+ * <code>null</code>.
+ */
+ public static final int _tk_null = 0;
+
+ /**
+ * The integer constant, indicating IDL data type
+ * <code>void</code>.
+ */
+ public static final int _tk_void = 1;
+
+ /**
+ * The integer constant, indicating IDL data type
+ * <code>short</code>.
+ */
+ public static final int _tk_short = 2;
+
+ /**
+ * The integer constant, indicating IDL data type
+ * <code>long</code>.
+ */
+ public static final int _tk_long = 3;
+
+ /**
+ * The integer constant, indicating IDL data type
+ * <code>ushort</code>.
+ */
+ public static final int _tk_ushort = 4;
+
+ /**
+ * The integer constant, indicating IDL data type
+ * <code>ulong</code>.
+ */
+ public static final int _tk_ulong = 5;
+
+ /**
+ * The integer constant, indicating IDL data type
+ * <code>float</code>.
+ */
+ public static final int _tk_float = 6;
+
+ /**
+ * The integer constant, indicating IDL data type
+ * <code>double</code>.
+ */
+ public static final int _tk_double = 7;
+
+ /**
+ * The integer constant, indicating IDL data type
+ * <code>boolean</code>.
+ */
+ public static final int _tk_boolean = 8;
+
+ /**
+ * The integer constant, indicating IDL data type
+ * <code>char</code>.
+ */
+ public static final int _tk_char = 9;
+
+ /**
+ * The integer constant, indicating IDL data type
+ * <code>octet</code>.
+ */
+ public static final int _tk_octet = 10;
+
+ /**
+ * The integer constant, indicating IDL data type
+ * <code>any</code>.
+ */
+ public static final int _tk_any = 11;
+
+ /**
+ * The integer constant, indicating IDL data type
+ * <code>TypeCode</code>.
+ */
+ public static final int _tk_TypeCode = 12;
+
+ /**
+ * The integer constant, indicating IDL data type
+ * <code>Principal</code>.
+ */
+ public static final int _tk_Principal = 13;
+
+ /**
+ * The integer constant, indicating IDL data type
+ * <code>objref</code>.
+ */
+ public static final int _tk_objref = 14;
+
+ /**
+ * The integer constant, indicating IDL data type
+ * <code>struct</code>.
+ */
+ public static final int _tk_struct = 15;
+
+ /**
+ * The integer constant, indicating IDL data type
+ * <code>union</code>.
+ */
+ public static final int _tk_union = 16;
+
+ /**
+ * The integer constant, indicating IDL data type
+ * <code>enum</code>.
+ */
+ public static final int _tk_enum = 17;
+
+ /**
+ * The integer constant, indicating IDL data type
+ * <code>string</code>.
+ */
+ public static final int _tk_string = 18;
+
+ /**
+ * The integer constant, indicating IDL data type
+ * <code>sequence</code>.
+ */
+ public static final int _tk_sequence = 19;
+
+ /**
+ * The integer constant, indicating IDL data type
+ * <code>array</code>.
+ */
+ public static final int _tk_array = 20;
+
+ /**
+ * The integer constant, indicating IDL data type
+ * <code>alias</code>.
+ */
+ public static final int _tk_alias = 21;
+
+ /**
+ * The integer constant, indicating IDL data type
+ * <code>except</code>.
+ */
+ public static final int _tk_except = 22;
+
+ /**
+ * The integer constant, indicating IDL data type
+ * <code>longlong</code>.
+ */
+ public static final int _tk_longlong = 23;
+
+ /**
+ * The integer constant, indicating IDL data type
+ * <code>ulonglong</code>.
+ */
+ public static final int _tk_ulonglong = 24;
+
+ /**
+ * The integer constant, indicating IDL data type
+ * <code>longdouble</code>.
+ */
+ public static final int _tk_longdouble = 25;
+
+ /**
+ * The integer constant, indicating IDL data type
+ * <code>wchar</code>.
+ */
+ public static final int _tk_wchar = 26;
+
+ /**
+ * The integer constant, indicating IDL data type
+ * <code>wstring</code>.
+ */
+ public static final int _tk_wstring = 27;
+
+ /**
+ * The integer constant, indicating IDL data type
+ * <code>fixed</code>.
+ */
+ public static final int _tk_fixed = 28;
+
+ /**
+ * The integer constant, indicating IDL data type
+ * <code>value</code>.
+ */
+ public static final int _tk_value = 29;
+
+ /**
+ * The integer constant, indicating IDL data type
+ * <code>value_box</code>.
+ */
+ public static final int _tk_value_box = 30;
+
+ /**
+ * The integer constant, indicating IDL data type
+ * <code>native</code>.
+ */
+ public static final int _tk_native = 31;
+
+ /**
+ * The integer constant, indicating IDL data type
+ * <code>abstract_interface</code>.
+ */
+ public static final int _tk_abstract_interface = 32;
+
+ /**
+ * The TCKind constant, indicating IDL data type
+ * <code>null</code>
+ */
+ public static final TCKind tk_null = new TCKind(_tk_null);
+
+ /**
+ * The TCKind constant, indicating IDL data type
+ * <code>void</code>
+ */
+ public static final TCKind tk_void = new TCKind(_tk_void);
+
+ /**
+ * The TCKind constant, indicating IDL data type
+ * <code>short</code>
+ */
+ public static final TCKind tk_short = new TCKind(_tk_short);
+
+ /**
+ * The TCKind constant, indicating IDL data type
+ * <code>long</code>
+ */
+ public static final TCKind tk_long = new TCKind(_tk_long);
+
+ /**
+ * The TCKind constant, indicating IDL data type
+ * <code>ushort</code>
+ */
+ public static final TCKind tk_ushort = new TCKind(_tk_ushort);
+
+ /**
+ * The TCKind constant, indicating IDL data type
+ * <code>ulong</code>
+ */
+ public static final TCKind tk_ulong = new TCKind(_tk_ulong);
+
+ /**
+ * The TCKind constant, indicating IDL data type
+ * <code>float</code>
+ */
+ public static final TCKind tk_float = new TCKind(_tk_float);
+
+ /**
+ * The TCKind constant, indicating IDL data type
+ * <code>double</code>
+ */
+ public static final TCKind tk_double = new TCKind(_tk_double);
+
+ /**
+ * The TCKind constant, indicating IDL data type
+ * <code>boolean</code>
+ */
+ public static final TCKind tk_boolean = new TCKind(_tk_boolean);
+
+ /**
+ * The TCKind constant, indicating IDL data type
+ * <code>char</code>
+ */
+ public static final TCKind tk_char = new TCKind(_tk_char);
+
+ /**
+ * The TCKind constant, indicating IDL data type
+ * <code>octet</code>
+ */
+ public static final TCKind tk_octet = new TCKind(_tk_octet);
+
+ /**
+ * The TCKind constant, indicating IDL data type
+ * <code>any</code>
+ */
+ public static final TCKind tk_any = new TCKind(_tk_any);
+
+ /**
+ * The TCKind constant, indicating IDL data type
+ * <code>TypeCode</code>
+ */
+ public static final TCKind tk_TypeCode = new TCKind(_tk_TypeCode);
+
+ /**
+ * The TCKind constant, indicating IDL data type
+ * <code>Principal</code>
+ */
+ public static final TCKind tk_Principal = new TCKind(_tk_Principal);
+
+ /**
+ * The TCKind constant, indicating IDL data type
+ * <code>objref</code>
+ */
+ public static final TCKind tk_objref = new TCKind(_tk_objref);
+
+ /**
+ * The TCKind constant, indicating IDL data type
+ * <code>struct</code>
+ */
+ public static final TCKind tk_struct = new TCKind(_tk_struct);
+
+ /**
+ * The TCKind constant, indicating IDL data type
+ * <code>union</code>
+ */
+ public static final TCKind tk_union = new TCKind(_tk_union);
+
+ /**
+ * The TCKind constant, indicating IDL data type
+ * <code>enum</code>
+ */
+ public static final TCKind tk_enum = new TCKind(_tk_enum);
+
+ /**
+ * The TCKind constant, indicating IDL data type
+ * <code>string</code>
+ */
+ public static final TCKind tk_string = new TCKind(_tk_string);
+
+ /**
+ * The TCKind constant, indicating IDL data type
+ * <code>sequence</code>
+ */
+ public static final TCKind tk_sequence = new TCKind(_tk_sequence);
+
+ /**
+ * The TCKind constant, indicating IDL data type
+ * <code>array</code>
+ */
+ public static final TCKind tk_array = new TCKind(_tk_array);
+
+ /**
+ * The TCKind constant, indicating IDL data type
+ * <code>alias</code>
+ */
+ public static final TCKind tk_alias = new TCKind(_tk_alias);
+
+ /**
+ * The TCKind constant, indicating IDL data type
+ * <code>except</code>
+ */
+ public static final TCKind tk_except = new TCKind(_tk_except);
+
+ /**
+ * The TCKind constant, indicating IDL data type
+ * <code>longlong</code>
+ */
+ public static final TCKind tk_longlong = new TCKind(_tk_longlong);
+
+ /**
+ * The TCKind constant, indicating IDL data type
+ * <code>ulonglong</code>
+ */
+ public static final TCKind tk_ulonglong = new TCKind(_tk_ulonglong);
+
+ /**
+ * The TCKind constant, indicating IDL data type
+ * <code>longdouble</code>
+ */
+ public static final TCKind tk_longdouble = new TCKind(_tk_longdouble);
+
+ /**
+ * The TCKind constant, indicating IDL data type
+ * <code>wchar</code>
+ */
+ public static final TCKind tk_wchar = new TCKind(_tk_wchar);
+
+ /**
+ * The TCKind constant, indicating IDL data type
+ * <code>wstring</code>
+ */
+ public static final TCKind tk_wstring = new TCKind(_tk_wstring);
+
+ /**
+ * The TCKind constant, indicating IDL data type
+ * <code>fixed</code>
+ */
+ public static final TCKind tk_fixed = new TCKind(_tk_fixed);
+
+ /**
+ * The TCKind constant, indicating IDL data type
+ * <code>value</code>
+ */
+ public static final TCKind tk_value = new TCKind(_tk_value);
+
+ /**
+ * The TCKind constant, indicating IDL data type
+ * <code>value_box</code>
+ */
+ public static final TCKind tk_value_box = new TCKind(_tk_value_box);
+
+ /**
+ * The TCKind constant, indicating IDL data type
+ * <code>native</code>
+ */
+ public static final TCKind tk_native = new TCKind(_tk_native);
+
+ /**
+ * The TCKind constant, indicating IDL data type
+ * <code>abstract_interface</code>
+ */
+ public static final TCKind tk_abstract_interface =
+ new TCKind(_tk_abstract_interface);
+
+ /**
+ * The kind value for this instance.
+ */
+ private final int _value;
+
+ /**
+ * The array of all tk_... instances, sorted by the kind number.
+ *
+ * As long as the kind numbers make the continuos sequence, starting from 0,
+ * the members can be found just by direct indexing.
+ */
+ private static final TCKind[] tk =
+ new TCKind[]
+ {
+ tk_null, tk_void, tk_short, tk_long, tk_ushort, tk_ulong, tk_float,
+ tk_double, tk_boolean, tk_char, tk_octet, tk_any, tk_TypeCode,
+ tk_Principal, tk_objref, tk_struct, tk_union, tk_enum, tk_string,
+ tk_sequence, tk_array, tk_alias, tk_except, tk_longlong, tk_ulonglong,
+ tk_longdouble, tk_wchar, tk_wstring, tk_fixed, tk_value, tk_value_box,
+ tk_native, tk_abstract_interface
+ };
+
+ /**
+ * Creates a new TCKind instance with the given integer constant value.
+ * @deprecated it is recommended to use {@link #from_int(int)} that
+ * reuses existing TCKind object instead of allocating the new instance.
+ * @param kind one of the <code>_tk_..</code> constants.
+ */
+ protected TCKind(int kind)
+ {
+ _value = kind;
+ }
+
+ /**
+ * Returns the integer value, corresponding this instance of TCKind.
+ * @return the <code>_tk_..</code> value, matching this instance.
+ */
+ public int value()
+ {
+ return _value;
+ }
+
+ /**
+ * Return a TCKind object, matching the given integer code.
+ * @param _tk_nnn the TCKind code, one of <code>_tk_..</code> constants.
+ * @return the matching instance of TCKind, on of tk_.. constants.
+ * @throws BAD_PARAM if the given integer constant is not one of the
+ * valid <code>_tk_..</code> constants.
+ */
+ public static TCKind from_int(int _tk_nnn)
+ {
+ try {
+ return tk[_tk_nnn];
+ }
+ catch (ArrayIndexOutOfBoundsException aex) {
+ throw new BAD_PARAM("Invalid _tk_ code "+_tk_nnn);
+ }
+ }
+
+}
diff --git a/libjava/classpath/org/omg/CORBA/TRANSACTION_REQUIRED.java b/libjava/classpath/org/omg/CORBA/TRANSACTION_REQUIRED.java
new file mode 100644
index 00000000000..66eedf4b937
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/TRANSACTION_REQUIRED.java
@@ -0,0 +1,96 @@
+/* TRANSACTION_REQUIRED.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;
+
+import java.io.Serializable;
+
+/**
+ * Means that request carried a null transaction context, but an
+ * active transaction is required.
+ * @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
+ */
+public class TRANSACTION_REQUIRED
+ extends SystemException
+ implements Serializable
+{
+ /**
+ * Use serialVersionUID for interoperability.
+ */
+ private static final long serialVersionUID = -1900254548742148576L;
+
+ /**
+ * Creates a TRANSACTION_REQUIRED with the default minor code of 0,
+ * completion state COMPLETED_NO and the given explaining message.
+ * @param reasom the explaining message.
+ */
+ public TRANSACTION_REQUIRED(String message)
+ {
+ super(message, 0, CompletionStatus.COMPLETED_NO);
+ }
+
+ /**
+ * Creates TRANSACTION_REQUIRED with the default minor code of 0 and a
+ * completion state COMPLETED_NO.
+ */
+ public TRANSACTION_REQUIRED()
+ {
+ super("", 0, CompletionStatus.COMPLETED_NO);
+ }
+
+ /** Creates a TRANSACTION_REQUIRED exception with the specified minor
+ * code and completion status.
+ * @param minor additional error code.
+ * @param completed the method completion status.
+ */
+ public TRANSACTION_REQUIRED(int minor, CompletionStatus completed)
+ {
+ super("", minor, completed);
+ }
+
+ /**
+ * Created TRANSACTION_REQUIRED exception, providing full information.
+ * @param reason explaining message.
+ * @param minor additional error code (the "minor").
+ * @param completed the method completion status.
+ */
+ public TRANSACTION_REQUIRED(String reason, int minor, CompletionStatus completed)
+ {
+ super(reason, minor, completed);
+ }
+}
diff --git a/libjava/classpath/org/omg/CORBA/TRANSACTION_ROLLEDBACK.java b/libjava/classpath/org/omg/CORBA/TRANSACTION_ROLLEDBACK.java
new file mode 100644
index 00000000000..ce115c8ac4a
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/TRANSACTION_ROLLEDBACK.java
@@ -0,0 +1,97 @@
+/* TRANSACTION_ROLLEDBACK.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;
+
+import java.io.Serializable;
+
+/**
+ * Means that transaction associated with the request has already
+ * been rolled back or marked to roll back.
+ *
+ * @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
+ */
+public class TRANSACTION_ROLLEDBACK
+ extends SystemException
+ implements Serializable
+{
+ /**
+ * Use serialVersionUID for interoperability.
+ */
+ private static final long serialVersionUID = -343903462439281571L;
+
+ /**
+ * Creates a TRANSACTION_ROLLEDBACK with the default minor code of 0,
+ * completion state COMPLETED_NO and the given explaining message.
+ * @param reasom the explaining message.
+ */
+ public TRANSACTION_ROLLEDBACK(String message)
+ {
+ super(message, 0, CompletionStatus.COMPLETED_NO);
+ }
+
+ /**
+ * Creates TRANSACTION_ROLLEDBACK with the default minor code of 0 and a
+ * completion state COMPLETED_NO.
+ */
+ public TRANSACTION_ROLLEDBACK()
+ {
+ super("", 0, CompletionStatus.COMPLETED_NO);
+ }
+
+ /** Creates a TRANSACTION_ROLLEDBACK exception with the specified minor
+ * code and completion status.
+ * @param minor additional error code.
+ * @param completed the method completion status.
+ */
+ public TRANSACTION_ROLLEDBACK(int minor, CompletionStatus completed)
+ {
+ super("", minor, completed);
+ }
+
+ /**
+ * Created TRANSACTION_ROLLEDBACK exception, providing full information.
+ * @param reason explaining message.
+ * @param minor additional error code (the "minor").
+ * @param completed the method completion status.
+ */
+ public TRANSACTION_ROLLEDBACK(String reason, int minor, CompletionStatus completed)
+ {
+ super(reason, minor, completed);
+ }
+}
diff --git a/libjava/classpath/org/omg/CORBA/TRANSIENT.java b/libjava/classpath/org/omg/CORBA/TRANSIENT.java
new file mode 100644
index 00000000000..c2aa5cb3154
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/TRANSIENT.java
@@ -0,0 +1,97 @@
+/* TRANSIENT.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;
+
+import java.io.Serializable;
+
+/**
+ * Means that the ORB cannot <i>reach</i> the object. It is not an
+ * indication that this object does not exist.
+ *
+ * @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
+ */
+public class TRANSIENT
+ extends SystemException
+ implements Serializable
+{
+ /**
+ * Creates a TRANSIENT with the default minor code of 0,
+ * completion state COMPLETED_NO and the given explaining message.
+ * @param reasom the explaining message.
+ */
+ public TRANSIENT(String message)
+ {
+ super(message, 0, CompletionStatus.COMPLETED_NO);
+ }
+
+ /**
+ * Use serialVersionUID (v1.4) for interoperability.
+ */
+ private static final long serialVersionUID = 8168539547719791425L;
+
+ /**
+ * Creates TRANSIENT with the default minor code of 0 and a
+ * completion state COMPLETED_NO.
+ */
+ public TRANSIENT()
+ {
+ super("", 0, CompletionStatus.COMPLETED_NO);
+ }
+
+ /** Creates a TRANSIENT exception with the specified minor
+ * code and completion status.
+ * @param minor additional error code.
+ * @param completed the method completion status.
+ */
+ public TRANSIENT(int minor, CompletionStatus completed)
+ {
+ super("", minor, completed);
+ }
+
+ /**
+ * Created TRANSIENT exception, providing full information.
+ * @param reason explaining message.
+ * @param minor additional error code (the "minor").
+ * @param completed the method completion status.
+ */
+ public TRANSIENT(String reason, int minor, CompletionStatus completed)
+ {
+ super(reason, minor, completed);
+ }
+} \ No newline at end of file
diff --git a/libjava/classpath/org/omg/CORBA/TypeCode.java b/libjava/classpath/org/omg/CORBA/TypeCode.java
new file mode 100644
index 00000000000..38fb0564fc9
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/TypeCode.java
@@ -0,0 +1,271 @@
+/* TypeCode.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;
+
+import java.io.Serializable;
+
+import org.omg.CORBA.TypeCodePackage.BadKind;
+import org.omg.CORBA.portable.IDLEntity;
+
+/**
+ * An information about a CORBA data type.
+ * @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
+ */
+public abstract class TypeCode
+ implements IDLEntity, Serializable
+{
+ /**
+ * Use serialVersionUID for interoperability.
+ * Using the version 1.4 UID.
+ */
+ private static final long serialVersionUID = -6521025782489515676L;
+
+ /**
+ * Returns the concrete base type for this TypeCode.
+ * @return a TypeCode, defining the concrete base type for this
+ * Typecode.
+ * @throws org.omg.CORBA.TypeCodePackage.BadKind
+ */
+ public abstract TypeCode concrete_base_type()
+ throws BadKind;
+
+ /**
+ * For sequences, arrays, aliases and value boxes, returns the IDL type for
+ * the members of the object.
+ * @return a TypeCode of the memebers of this type.
+ * @throws org.omg.CORBA.TypeCodePackage.BadKind for types other than
+ * sequences, arrays, aliases and value boxes.
+ */
+ public abstract TypeCode content_type()
+ throws BadKind;
+
+ /**
+ * For unions, returs the index of the default member.
+ * @return the index of the default member, -1 if there is
+ * no default member.
+ * @throws org.omg.CORBA.TypeCodePackage.BadKind if this type is not
+ * a union.
+ */
+ public abstract int default_index()
+ throws BadKind;
+
+ /**
+ * Returs definition of member labels for untions
+ * @return a TypeCode, describing all non-default member labels.
+ * @throws org.omg.CORBA.TypeCodePackage.BadKind if this type is not a
+ * union.
+ */
+ public abstract TypeCode discriminator_type()
+ throws BadKind;
+
+ /**
+ * Test two types for equality. The default implementation
+ * returs true of the types of the same kind.
+ * @param other the other type to compere with
+ * @return true if the types are interchangeable.
+ */
+ public abstract boolean equal(TypeCode other);
+
+ /**
+ * Following the current 1.4 API specifcation, this should just throw
+ * NO_IMPLEMENT.
+ * @throws org.omg.CORBA.NO_IMPLEMENT, always.
+ */
+ public abstract boolean equivalent(TypeCode other);
+
+ /**
+ * For the fixed type, returns the number of digits.
+ * @return the number of digits for the fixed type
+ * @throws org.omg.CORBA.TypeCodePackage.BadKind if this is not a fixed
+ * type.
+ */
+ public abstract short fixed_digits()
+ throws BadKind;
+
+ /**
+ * Returns the scale for the fixed type. The returned value can be either
+ * positive (the number of digits to the right of the decimal point) or
+ * negative (adds zeros to the left of the decimal point).
+ * @return the scale.
+ * @throws org.omg.CORBA.TypeCodePackage.BadKind if this is not a fixed
+ * type.
+ */
+ public abstract short fixed_scale()
+ throws BadKind;
+
+ /**
+ * Returns a version of this instance without the optional memeber and
+ * member name fields.
+ * @return the truncated version.
+ */
+ public abstract TypeCode get_compact_typecode();
+
+ /**
+ * Returns the RepositoryId globally identifying the type, defined by
+ * this TypeCode.
+ * @return tje RepositoryId. In some cases, it may be an empty string.
+ * @throws org.omg.CORBA.TypeCodePackage.BadKind if the type is other than
+ * reference, structure, union, enumeration, alias, exception, valuetype,
+ * boxed valuetype and also native and abstract interfaces.
+ */
+ public abstract String id()
+ throws BadKind;
+
+ /**
+ * Return the kind of this type code object.
+ * @return one of the <code>TCKind.t_..</code> fields.
+ */
+ public abstract TCKind kind();
+
+ /**
+ * Returns the number of elements in the type. For arrays, this
+ * method returns the length of the array. For strings and sequences,
+ * it returns the bound of the type, zero indicating the unbounded
+ * type.
+ *
+ * @return length or bound
+ *
+ * @throws org.omg.CORBA.TypeCodePackage.BadKind for types other than
+ * string, sequence and array.
+ */
+ public abstract int length()
+ throws BadKind;
+
+ /**
+ * Returns the number of type memebers.
+ *
+ * @return the number of memebers
+ * @throws org.omg.CORBA.TypeCodePackage.BadKind for types other than
+ * structure, union, enumeration or exception.
+ */
+ public abstract int member_count()
+ throws BadKind;
+
+ /**
+ * Retrieves the label of the union member at the given index.
+ * For the default member, this label is the zero octet.
+ *
+ * @param index the index of the union memeber.
+ *
+ * @return the label
+ *
+ * @throws org.omg.CORBA.TypeCodePackage.BadKind if this is not a union
+ * type.
+ * @throws org.omg.CORBA.TypeCodePackage.Bounds if the index is out of
+ * valid bounds.
+ */
+ public abstract Any member_label(int index)
+ throws BadKind,
+ org.omg.CORBA.TypeCodePackage.Bounds;
+
+ /**
+ * Retrieves the simple name of the member identified by the given index.
+ *
+ * @param index the index of the memeber.
+ *
+ * @return the member name that in some cases can be an empty string.
+ *
+ * @throws org.omg.CORBA.TypeCodePackage.BadKind for types other than
+ * structure, union or enumeration.
+ * @throws org.omg.CORBA.TypeCodePackage.Bounds if the index is out of
+ * valid bounds.
+ */
+ public abstract String member_name(int index)
+ throws BadKind,
+ org.omg.CORBA.TypeCodePackage.Bounds;
+
+ /**
+ * Retrieves the member type of the member identified by the given index.
+ *
+ * @param index the index of the memeber.
+ *
+ * @return the member type.
+ *
+ * @throws org.omg.CORBA.TypeCodePackage.BadKind for types other than
+ * structure, union, enumeration or exception.
+ * @throws org.omg.CORBA.TypeCodePackage.Bounds if the index is out of
+ * valid bounds.
+ */
+ public abstract TypeCode member_type(int index)
+ throws BadKind,
+ org.omg.CORBA.TypeCodePackage.Bounds;
+
+ /**
+ * Returns the visibility scope of the member at the given index.
+ * This operation can only be invoked on non-boxed value types.
+ *
+ * @param index the index of the member
+ *
+ * @return either PRIVATE_MEMBER.value or PUBLIC_MEMBER.value
+ *
+ * @throws org.omg.CORBA.TypeCodePackage.BadKind if this is not a non boxed
+ * value type.
+ *
+ * @throws org.omg.CORBA.TypeCodePackage.Bounds if the index is out of
+ * valid bounds.
+ */
+ public abstract short member_visibility(int index)
+ throws BadKind,
+ org.omg.CORBA.TypeCodePackage.Bounds;
+
+
+ /**
+ * Retrieves the simple name identifying this TypeCode object
+ * within its enclosing scope.
+ * @return the name, can be an empty string.
+ * @throws org.omg.CORBA.TypeCodePackage.BadKind for typer other than
+ * reference, structure, union, enumeration, alias, exception,
+ * valuetype, boxed valuetype, native, and abstract interface
+ */
+ public abstract String name()
+ throws BadKind;
+
+ /**
+ * Returns a constant indicating the modifier of the value type.
+ *
+ * @return one of the following constants:
+ * VM_NONE.value, VM_ABSTRACT.value, VM_CUSTOM.value, or
+ * VM_TRUNCATABLE.value,
+ *
+ * @throws org.omg.CORBA.TypeCodePackage.BadKind for types other than
+ * value type.
+ */
+ public abstract short type_modifier()
+ throws BadKind;
+}
diff --git a/libjava/classpath/org/omg/CORBA/TypeCodeHolder.java b/libjava/classpath/org/omg/CORBA/TypeCodeHolder.java
new file mode 100644
index 00000000000..276e8bf16e3
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/TypeCodeHolder.java
@@ -0,0 +1,123 @@
+/* TypeCodeHolder.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;
+
+import gnu.CORBA.primitiveTypeCode;
+
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+import org.omg.CORBA.portable.Streamable;
+
+/**
+ * A holder for CORBA <code>TypeCode</code> that is mapped into
+ * java <code>TypeCode</code>.
+ *
+ *
+ * @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
+ */
+public class TypeCodeHolder
+ implements Streamable
+{
+ /**
+ * The default type code for this holder.
+ */
+ private static final TypeCode t_TypeCode =
+ new primitiveTypeCode(TCKind.tk_TypeCode);
+
+ /**
+ * The <code>TypeCode</code> (CORBA <code>TypeCode</code>) value,
+ * held by this TypeCodeHolder.
+ */
+ public TypeCode value;
+
+ /**
+ * Constructs an instance of TypeCodeHolder,
+ * initializing {@link #value} to <code>null</code>.
+ */
+ public TypeCodeHolder()
+ {
+ }
+
+ /**
+ * Constructs an instance of TypeCodeHolder,
+ * initializing {@link #value} to the given <code>TypeCode</code>.
+ *
+ * @param initial_value a value that will be assigned to the
+ * {@link #value} field.
+ */
+ public TypeCodeHolder(TypeCode initial_value)
+ {
+ value = initial_value;
+ }
+
+ /**
+ * Fill in the {@link value } field by reading the required data
+ * from the given stream. For <code>TypeCode</code>, the functionality
+ * is delegated to
+ * {@link org.omg.CORBA.portable.InputStream#read_TypeCode}.
+ *
+ * @param input the input stream to read from.
+ */
+ public void _read(InputStream input)
+ {
+ value = input.read_TypeCode();
+ }
+
+ /**
+ * Returns the TypeCode, corresponding the CORBA type that is stored
+ * using this holder.
+ */
+ public TypeCode _type()
+ {
+ return t_TypeCode;
+ }
+
+ /**
+ * Write the {@link value } field to the given stream.
+ * For <code>TypeCode</code>, the functionality
+ * is delegated to
+ * {@link org.omg.CORBA.portable.OutputStream#write_TypeCode(TypeCode) }.
+ *
+ * @param output the output stream to write into.
+ */
+ public void _write(OutputStream output)
+ {
+ output.write_TypeCode(value);
+ }
+}
diff --git a/libjava/classpath/org/omg/CORBA/TypeCodePackage/BadKind.java b/libjava/classpath/org/omg/CORBA/TypeCodePackage/BadKind.java
new file mode 100644
index 00000000000..88192f6ad8e
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/TypeCodePackage/BadKind.java
@@ -0,0 +1,76 @@
+/* BadKind.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.TypeCodePackage;
+
+import java.io.Serializable;
+
+import org.omg.CORBA.IDLEntity;
+import org.omg.CORBA.UserException;
+
+/**
+ * This exception is thrown when an inappropriate operation is invoked on
+ * a {@link org.omg.CORBA.TypeCode} object.
+ *
+ * @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
+ */
+public class BadKind
+ extends UserException
+ implements IDLEntity, Serializable
+{
+ /**
+ * Use serialVersionUID for interoperability.
+ */
+ private static final long serialVersionUID = 1030443154456771956L;
+
+ /**
+ * Constructs a the exception.
+ */
+ public BadKind()
+ {
+ }
+
+ /**
+ * Constructs the exception, explaining the reason of throwing it.
+ * @param reason a string, explaining, why the exception has been thrown.
+ */
+ public BadKind(String reason)
+ {
+ super(reason);
+ }
+}
diff --git a/libjava/classpath/org/omg/CORBA/TypeCodePackage/Bounds.java b/libjava/classpath/org/omg/CORBA/TypeCodePackage/Bounds.java
new file mode 100644
index 00000000000..cd48706bce5
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/TypeCodePackage/Bounds.java
@@ -0,0 +1,79 @@
+/* Bounds.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.TypeCodePackage;
+
+import java.io.Serializable;
+
+import org.omg.CORBA.IDLEntity;
+import org.omg.CORBA.UserException;
+
+/**
+ * The {@link org.omg.CORBA.TypeCode#member_name(int) },
+ * {@link org.omg.CORBA.TypeCode#member_type(int) } and
+ * {@link org.omg.CORBA.TypeCode#member_label(int) } raise Bounds when
+ * the parameter is larger than the index of the last member,
+ * constituting the type.
+ *
+ * @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
+ */
+public class Bounds
+ extends UserException
+ implements IDLEntity, Serializable
+{
+ /**
+ * Use serialVersionUID for interoperability.
+ */
+ private static final long serialVersionUID = -5418177951071152101L;
+
+ /**
+ * Constructs a the exception.
+ */
+ public Bounds()
+ {
+ }
+
+ /**
+ * Constructs the exception, explaining the reason of throwing it.
+ * @param reason a string, explaining, why the exception has been thrown.
+ */
+ public Bounds(String reason)
+ {
+ super(reason);
+ }
+}
diff --git a/libjava/classpath/org/omg/CORBA/TypeCodePackage/package.html b/libjava/classpath/org/omg/CORBA/TypeCodePackage/package.html
new file mode 100644
index 00000000000..f8c476e6f03
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/TypeCodePackage/package.html
@@ -0,0 +1,46 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
+<!-- package.html - describes classes in javax.sql 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.TypeCodePackage</title></head>
+
+<body>
+<p>Provides a couple of exceptions, thrown by methods in the <code>TypeCode</code> class.</p>
+
+</body>
+</html>
diff --git a/libjava/classpath/org/omg/CORBA/ULongLongSeqHelper.java b/libjava/classpath/org/omg/CORBA/ULongLongSeqHelper.java
new file mode 100644
index 00000000000..e92409bb0c4
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/ULongLongSeqHelper.java
@@ -0,0 +1,142 @@
+/* ULongLongSeqHelper.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;
+
+import gnu.CORBA.primitiveArrayTypeCode;
+
+import org.omg.CORBA.TypeCodePackage.BadKind;
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+
+/**
+ * Provides static helper methods for working with
+ * CORBA sequence of <code>long</code>
+ * (<code>ULongLongSeq</code>).
+ *
+ * @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
+ */
+public abstract class ULongLongSeqHelper
+{
+ /**
+ * Extract the <code>long[]</code> from the
+ * given {@link Any}. This implementation expects the
+ * {@link Any} to hold the instance of {@link ULongLongSeqHolder}
+ * that is returned by {@link Any#extract_Streamable() }.
+ *
+ * @param a an Any to extract the array from.
+ *
+ * @return the extracted array.
+ *
+ * @throws ClassCastException if the Any contains something other than the
+ * the {@link ULongLongSeqHolder}.
+ */
+ public static long[] extract(Any a)
+ {
+ ULongLongSeqHolder h = (ULongLongSeqHolder) a.extract_Streamable();
+ return h.value;
+ }
+
+ /**
+ * Returns the agreed Id, delegating functionality to
+ * the {@link #type()}.id().
+ */
+ public static String id()
+ {
+ try
+ {
+ return type().id();
+ }
+ catch (BadKind ex)
+ {
+ // Should never happen under correct work.
+ throw new Error("Please report this bug.", ex);
+ }
+ }
+
+ /**
+ * Insert into the given <code>long[]</code> into the
+ * given {@link Any}. This implementation first creates
+ * a {@link ULongLongSeqHolder} and then calls
+ * {@link Any#insert_Streamable(Streamable)}.
+ *
+ * @param into the target Any.
+ * @param that the array to insert.
+ */
+ public static void insert(Any into, long[] that)
+ {
+ ULongLongSeqHolder holder = new ULongLongSeqHolder(that);
+ into.insert_Streamable(holder);
+ }
+
+ /**
+ * Reads the <code>long[]</code> from the CORBA input stream.
+ *
+ * @param input the CORBA (not java.io) stream to read from.
+ * @return the value from the stream.
+ */
+ public static long[] read(InputStream input)
+ {
+ long[] value = new long[ input.read_long() ];
+ input.read_ulonglong_array(value, 0, value.length);
+ return value;
+ }
+
+ /**
+ * Creates and returns a new instance of the TypeCode,
+ * corresponding the CORBA <code>ULongLongSeq</code>.
+ * The length of the sequence is left with the initial
+ * value 0.
+ */
+ public static TypeCode type()
+ {
+ return new primitiveArrayTypeCode(TCKind.tk_ulong);
+ }
+
+ /**
+ * Writes the <code>long[]</code> into the given stream.
+ *
+ * @param output the CORBA (not java.io) output stream to write.
+ * @param value the value that must be written.
+ */
+ public static void write(OutputStream output, long[] value)
+ {
+ output.write_long(value.length);
+ output.write_ulonglong_array(value, 0, value.length);
+ }
+}
diff --git a/libjava/classpath/org/omg/CORBA/ULongLongSeqHolder.java b/libjava/classpath/org/omg/CORBA/ULongLongSeqHolder.java
new file mode 100644
index 00000000000..2d0fcf0b371
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/ULongLongSeqHolder.java
@@ -0,0 +1,126 @@
+/* ULongLongSeqHolder.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;
+
+import gnu.CORBA.primitiveArrayTypeCode;
+
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+import org.omg.CORBA.portable.Streamable;
+
+/**
+ * A sequence holder for CORBA <code>ULongLongSeq</code> that is mapped into
+ * java <code>long[]</code>.
+ *
+ * @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
+ */
+public final class ULongLongSeqHolder
+ implements Streamable
+{
+ /**
+ * The <code>long[]</code> (CORBA <code>ULongLongSeq</code>) value,
+ * held by this ULongLongSeqHolder.
+ */
+ public long[] value;
+
+ /**
+ * The type code for this holder. Each holder has a different instance.
+ */
+ private final primitiveArrayTypeCode typecode =
+ new primitiveArrayTypeCode(TCKind.tk_ulonglong);
+
+ /**
+ * Constructs an instance of ULongLongSeqHolder,
+ * initializing {@link #value} to <code>null</code>.
+ */
+ public ULongLongSeqHolder()
+ {
+ }
+
+ /**
+ * Constructs an instance of ULongLongSeqHolder,
+ * initializing {@link #value} to the given <code>long[]</code>.
+ *
+ * @param initial_value a value that will be assigned to the
+ * {@link #value} field.
+ */
+ public ULongLongSeqHolder(long[] initial_value)
+ {
+ value = initial_value;
+ typecode.setLength(value.length);
+ }
+
+ /**
+ * Fill in the {@link value } field by reading the required data
+ * from the given stream. This method first reads the array size
+ * (as CORBA <code>long</code>) and then calls the
+ * {@link org.omg.CORBA.portable.InputStream#read_ulonglong_array }.
+ *
+ * @param input the input stream to read from.
+ */
+ public void _read(InputStream input)
+ {
+ value = new long[ input.read_long() ];
+ input.read_ulonglong_array(value, 0, value.length);
+ typecode.setLength(value.length);
+ }
+
+ /**
+ * Returns the TypeCode, corresponding the CORBA type that is stored
+ * using this holder.
+ */
+ public TypeCode _type()
+ {
+ return typecode;
+ }
+
+ /**
+ * Write the {@link value } field to the given stream.
+ * This method first writes the array size
+ * (as CORBA <code>long</code>) and then calls the
+ * {@link org.omg.CORBA.portable.OutputStream#write_ulonglong_array }.
+ *
+ * @param output the output stream to write into.
+ */
+ public void _write(OutputStream output)
+ {
+ output.write_long(value.length);
+ output.write_ulonglong_array(value, 0, value.length);
+ }
+}
diff --git a/libjava/classpath/org/omg/CORBA/ULongSeqHelper.java b/libjava/classpath/org/omg/CORBA/ULongSeqHelper.java
new file mode 100644
index 00000000000..846833c2a89
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/ULongSeqHelper.java
@@ -0,0 +1,142 @@
+/* ULongSeqHelper.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;
+
+import gnu.CORBA.primitiveArrayTypeCode;
+
+import org.omg.CORBA.TypeCodePackage.BadKind;
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+
+/**
+ * Provides static helper methods for working with
+ * CORBA sequence of <code>int</code>
+ * (<code>ULongSeq</code>).
+ *
+ * @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
+ */
+public abstract class ULongSeqHelper
+{
+ /**
+ * Extract the <code>int[]</code> from the
+ * given {@link Any}. This implementation expects the
+ * {@link Any} to hold the instance of {@link ULongSeqHolder}
+ * that is returned by {@link Any#extract_Streamable() }.
+ *
+ * @param a an Any to extract the array from.
+ *
+ * @return the extracted array.
+ *
+ * @throws ClassCastException if the Any contains something other than the
+ * the {@link ULongSeqHolder}.
+ */
+ public static int[] extract(Any a)
+ {
+ ULongSeqHolder h = (ULongSeqHolder) a.extract_Streamable();
+ return h.value;
+ }
+
+ /**
+ * Returns the agreed Id, delegating functionality to
+ * the {@link #type()}.id().
+ */
+ public static String id()
+ {
+ try
+ {
+ return type().id();
+ }
+ catch (BadKind ex)
+ {
+ // Should never happen under correct work.
+ throw new Error("Please report this bug.", ex);
+ }
+ }
+
+ /**
+ * Insert into the given <code>int[]</code> into the
+ * given {@link Any}. This implementation first creates
+ * a {@link ULongSeqHolder} and then calls
+ * {@link Any#insert_Streamable(Streamable)}.
+ *
+ * @param into the target Any.
+ * @param that the array to insert.
+ */
+ public static void insert(Any into, int[] that)
+ {
+ ULongSeqHolder holder = new ULongSeqHolder(that);
+ into.insert_Streamable(holder);
+ }
+
+ /**
+ * Reads the <code>int[]</code> from the CORBA input stream.
+ *
+ * @param input the CORBA (not java.io) stream to read from.
+ * @return the value from the stream.
+ */
+ public static int[] read(InputStream input)
+ {
+ int[] value = new int[ input.read_long() ];
+ input.read_ulong_array(value, 0, value.length);
+ return value;
+ }
+
+ /**
+ * Creates and returns a new instance of the TypeCode,
+ * corresponding the CORBA <code>ULongSeq</code>.
+ * The length of the sequence is left with the initial
+ * value 0.
+ */
+ public static TypeCode type()
+ {
+ return new primitiveArrayTypeCode(TCKind.tk_long);
+ }
+
+ /**
+ * Writes the <code>int[]</code> into the given stream.
+ *
+ * @param output the CORBA (not java.io) output stream to write.
+ * @param value the value that must be written.
+ */
+ public static void write(OutputStream output, int[] value)
+ {
+ output.write_long(value.length);
+ output.write_ulong_array(value, 0, value.length);
+ }
+}
diff --git a/libjava/classpath/org/omg/CORBA/ULongSeqHolder.java b/libjava/classpath/org/omg/CORBA/ULongSeqHolder.java
new file mode 100644
index 00000000000..8810e2159fc
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/ULongSeqHolder.java
@@ -0,0 +1,126 @@
+/* ULongSeqHolder.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;
+
+import gnu.CORBA.primitiveArrayTypeCode;
+
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+import org.omg.CORBA.portable.Streamable;
+
+/**
+ * A sequence holder for CORBA <code>ULongSeq</code> that is mapped into
+ * java <code>int[]</code>.
+ *
+ * @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
+ */
+public final class ULongSeqHolder
+ implements Streamable
+{
+ /**
+ * The <code>int[]</code> (CORBA <code>ULongSeq</code>) value,
+ * held by this ULongSeqHolder.
+ */
+ public int[] value;
+
+ /**
+ * The type code for this holder. Each holder has a different instance.
+ */
+ private final primitiveArrayTypeCode typecode =
+ new primitiveArrayTypeCode(TCKind.tk_ulong);
+
+ /**
+ * Constructs an instance of ULongSeqHolder,
+ * initializing {@link #value} to <code>null</code>.
+ */
+ public ULongSeqHolder()
+ {
+ }
+
+ /**
+ * Constructs an instance of ULongSeqHolder,
+ * initializing {@link #value} to the given <code>int[]</code>.
+ *
+ * @param initial_value a value that will be assigned to the
+ * {@link #value} field.
+ */
+ public ULongSeqHolder(int[] initial_value)
+ {
+ value = initial_value;
+ typecode.setLength(value.length);
+ }
+
+ /**
+ * Fill in the {@link value } field by reading the required data
+ * from the given stream. This method first reads the array size
+ * (as CORBA <code>long</code>) and then calls the
+ * {@link org.omg.CORBA.portable.InputStream#read_ulong_array }.
+ *
+ * @param input the input stream to read from.
+ */
+ public void _read(InputStream input)
+ {
+ value = new int[ input.read_long() ];
+ input.read_ulong_array(value, 0, value.length);
+ typecode.setLength(value.length);
+ }
+
+ /**
+ * Returns the TypeCode, corresponding the CORBA type that is stored
+ * using this holder.
+ */
+ public TypeCode _type()
+ {
+ return typecode;
+ }
+
+ /**
+ * Write the {@link value } field to the given stream.
+ * This method first writes the array size
+ * (as CORBA <code>long</code>) and then calls the
+ * {@link org.omg.CORBA.portable.OutputStream#write_ulong_array }.
+ *
+ * @param output the output stream to write into.
+ */
+ public void _write(OutputStream output)
+ {
+ output.write_long(value.length);
+ output.write_ulong_array(value, 0, value.length);
+ }
+}
diff --git a/libjava/classpath/org/omg/CORBA/UNKNOWN.java b/libjava/classpath/org/omg/CORBA/UNKNOWN.java
new file mode 100644
index 00000000000..60d3fc0b5c7
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/UNKNOWN.java
@@ -0,0 +1,95 @@
+/* UNKNOWN.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;
+
+import java.io.Serializable;
+
+/**
+ * Means that the operation implementation has thrown a non-CORBA exception.
+ * @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
+ */
+public class UNKNOWN
+ extends SystemException
+ implements Serializable
+{
+ /**
+ * Use serialVersionUID for interoperability.
+ */
+ private static final long serialVersionUID = -3556426185741898205L;
+
+ /**
+ * Creates a UNKNOWN with the default minor code of 0,
+ * completion state COMPLETED_NO and the given explaining message.
+ * @param reasom the explaining message.
+ */
+ public UNKNOWN(String message)
+ {
+ super(message, 0, CompletionStatus.COMPLETED_NO);
+ }
+
+ /**
+ * Creates UNKNOWN with the default minor code of 0 and a
+ * completion state COMPLETED_NO.
+ */
+ public UNKNOWN()
+ {
+ super("", 0, CompletionStatus.COMPLETED_NO);
+ }
+
+ /** Creates a UNKNOWN exception with the specified minor
+ * code and completion status.
+ * @param minor additional error code.
+ * @param completed the method completion status.
+ */
+ public UNKNOWN(int minor, CompletionStatus completed)
+ {
+ super("", minor, completed);
+ }
+
+ /**
+ * Created UNKNOWN exception, providing full information.
+ * @param reason explaining message.
+ * @param minor additional error code (the "minor").
+ * @param completed the method completion status.
+ */
+ public UNKNOWN(String reason, int minor, CompletionStatus completed)
+ {
+ super(reason, minor, completed);
+ }
+}
diff --git a/libjava/classpath/org/omg/CORBA/UNSUPPORTED_POLICY.java b/libjava/classpath/org/omg/CORBA/UNSUPPORTED_POLICY.java
new file mode 100644
index 00000000000..007df5c8c7f
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/UNSUPPORTED_POLICY.java
@@ -0,0 +1,56 @@
+/* UNSUPPORTED_POLICY.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;
+
+/**
+ * Holds a single constant, specifying, that
+ * while the requested {@link Policy} is valid, it is not supported by
+ * this ORB. One of the PolicyErrorCodes, others being
+ * {@link UNSUPPORTED_POLICY_VALUE}, {@link BAD_POLICY},
+ * {@link BAD_POLICY_TYPE}, {@link BAD_POLICY_VALUE}.
+ *
+ * @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
+ */
+public interface UNSUPPORTED_POLICY
+{
+ /**
+ * States that while the requested {@link Policy} is valid,
+ * it is not supported by this ORB.
+ */
+ short value = 1;
+}
diff --git a/libjava/classpath/org/omg/CORBA/UNSUPPORTED_POLICY_VALUE.java b/libjava/classpath/org/omg/CORBA/UNSUPPORTED_POLICY_VALUE.java
new file mode 100644
index 00000000000..a05dd9d3467
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/UNSUPPORTED_POLICY_VALUE.java
@@ -0,0 +1,56 @@
+/* UNSUPPORTED_POLICY_VALUE.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;
+
+/**
+ * Holds a single constant, specifying, that
+ * while the requested {@link Policy} value is valid, it is not
+ * supported by this ORB. One of the PolicyErrorCodes, others being
+ * {@link UNSUPPORTED_POLICY}, {@link BAD_POLICY}, {@link BAD_POLICY_TYPE} ,
+ * {@link BAD_POLICY_VALUE}.
+ *
+ * @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
+ */
+public interface UNSUPPORTED_POLICY_VALUE
+{
+ /**
+ * States that while the requested {@link Policy} value is valid,
+ * it is not supported by this ORB.
+ */
+ short value = 4;
+}
diff --git a/libjava/classpath/org/omg/CORBA/UShortSeqHelper.java b/libjava/classpath/org/omg/CORBA/UShortSeqHelper.java
new file mode 100644
index 00000000000..76371bc308a
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/UShortSeqHelper.java
@@ -0,0 +1,142 @@
+/* UShortSeqHelper.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;
+
+import gnu.CORBA.primitiveArrayTypeCode;
+
+import org.omg.CORBA.TypeCodePackage.BadKind;
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+
+/**
+ * Provides static helper methods for working with
+ * CORBA sequence of <code>short</code>
+ * (<code>UShortSeq</code>).
+ *
+ * @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
+ */
+public abstract class UShortSeqHelper
+{
+ /**
+ * Extract the <code>short[]</code> from the
+ * given {@link Any}. This implementation expects the
+ * {@link Any} to hold the instance of {@link UShortSeqHolder}
+ * that is returned by {@link Any#extract_Streamable() }.
+ *
+ * @param a an Any to extract the array from.
+ *
+ * @return the extracted array.
+ *
+ * @throws ClassCastException if the Any contains something other than the
+ * the {@link UShortSeqHolder}.
+ */
+ public static short[] extract(Any a)
+ {
+ UShortSeqHolder h = (UShortSeqHolder) a.extract_Streamable();
+ return h.value;
+ }
+
+ /**
+ * Returns the agreed Id, delegating functionality to
+ * the {@link #type()}.id().
+ */
+ public static String id()
+ {
+ try
+ {
+ return type().id();
+ }
+ catch (BadKind ex)
+ {
+ // Should never happen under correct work.
+ throw new Error("Please report this bug.", ex);
+ }
+ }
+
+ /**
+ * Insert into the given <code>short[]</code> into the
+ * given {@link Any}. This implementation first creates
+ * a {@link UShortSeqHolder} and then calls
+ * {@link Any#insert_Streamable(Streamable)}.
+ *
+ * @param into the target Any.
+ * @param that the array to insert.
+ */
+ public static void insert(Any into, short[] that)
+ {
+ UShortSeqHolder holder = new UShortSeqHolder(that);
+ into.insert_Streamable(holder);
+ }
+
+ /**
+ * Reads the <code>short[]</code> from the CORBA input stream.
+ *
+ * @param input the CORBA (not java.io) stream to read from.
+ * @return the value from the stream.
+ */
+ public static short[] read(InputStream input)
+ {
+ short[] value = new short[ input.read_long() ];
+ input.read_ushort_array(value, 0, value.length);
+ return value;
+ }
+
+ /**
+ * Creates and returns a new instance of the TypeCode,
+ * corresponding the CORBA <code>UShortSeq</code>.
+ * The length of the sequence is left with the initial
+ * value 0.
+ */
+ public static TypeCode type()
+ {
+ return new primitiveArrayTypeCode(TCKind.tk_short);
+ }
+
+ /**
+ * Writes the <code>short[]</code> into the given stream.
+ *
+ * @param output the CORBA (not java.io) output stream to write.
+ * @param value the value that must be written.
+ */
+ public static void write(OutputStream output, short[] value)
+ {
+ output.write_long(value.length);
+ output.write_ushort_array(value, 0, value.length);
+ }
+}
diff --git a/libjava/classpath/org/omg/CORBA/UShortSeqHolder.java b/libjava/classpath/org/omg/CORBA/UShortSeqHolder.java
new file mode 100644
index 00000000000..8c6f7d19075
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/UShortSeqHolder.java
@@ -0,0 +1,126 @@
+/* UShortSeqHolder.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;
+
+import gnu.CORBA.primitiveArrayTypeCode;
+
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+import org.omg.CORBA.portable.Streamable;
+
+/**
+ * A sequence holder for CORBA <code>UShortSeq</code> that is mapped into
+ * java <code>short[]</code>.
+ *
+ * @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
+ */
+public final class UShortSeqHolder
+ implements Streamable
+{
+ /**
+ * The <code>short[]</code> (CORBA <code>UShortSeq</code>) value,
+ * held by this UShortSeqHolder.
+ */
+ public short[] value;
+
+ /**
+ * The type code for this holder. Each holder has a different instance.
+ */
+ private final primitiveArrayTypeCode typecode =
+ new primitiveArrayTypeCode(TCKind.tk_ushort);
+
+ /**
+ * Constructs an instance of UShortSeqHolder,
+ * initializing {@link #value} to <code>null</code>.
+ */
+ public UShortSeqHolder()
+ {
+ }
+
+ /**
+ * Constructs an instance of UShortSeqHolder,
+ * initializing {@link #value} to the given <code>short[]</code>.
+ *
+ * @param initial_value a value that will be assigned to the
+ * {@link #value} field.
+ */
+ public UShortSeqHolder(short[] initial_value)
+ {
+ value = initial_value;
+ typecode.setLength(value.length);
+ }
+
+ /**
+ * Fill in the {@link value } field by reading the required data
+ * from the given stream. This method first reads the array size
+ * (as CORBA <code>long</code>) and then calls the
+ * {@link org.omg.CORBA.portable.InputStream#read_ushort_array }.
+ *
+ * @param input the input stream to read from.
+ */
+ public void _read(InputStream input)
+ {
+ value = new short[ input.read_long() ];
+ input.read_ushort_array(value, 0, value.length);
+ typecode.setLength(value.length);
+ }
+
+ /**
+ * Returns the TypeCode, corresponding the CORBA type that is stored
+ * using this holder.
+ */
+ public TypeCode _type()
+ {
+ return typecode;
+ }
+
+ /**
+ * Write the {@link value } field to the given stream.
+ * This method first writes the array size
+ * (as CORBA <code>long</code>) and then calls the
+ * {@link org.omg.CORBA.portable.OutputStream#write_ushort_array }.
+ *
+ * @param output the output stream to write into.
+ */
+ public void _write(OutputStream output)
+ {
+ output.write_long(value.length);
+ output.write_ushort_array(value, 0, value.length);
+ }
+}
diff --git a/libjava/classpath/org/omg/CORBA/UnionMember.java b/libjava/classpath/org/omg/CORBA/UnionMember.java
new file mode 100644
index 00000000000..41afeb7da24
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/UnionMember.java
@@ -0,0 +1,102 @@
+/* UnionMember.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;
+
+import java.io.Serializable;
+
+import org.omg.CORBA.portable.IDLEntity;
+
+/**
+ * The component, describing the member of CORBA IDL <code>union</code>.
+ *
+ * @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
+ */
+public class UnionMember
+ implements IDLEntity, Serializable
+{
+ /**
+ * Use 1.4 version serialVersionUID for interoperability.
+ */
+ private static final long serialVersionUID = 5506049694216071974L;
+
+ /**
+ * The label of the union member.
+ */
+ public Any label;
+
+ /**
+ * The IDL type of the union member.
+ */
+ public IDLType type_def;
+
+ /**
+ * The name of the union member.
+ */
+ public String name;
+
+ /**
+ * The typecode of the union member.
+ */
+ public TypeCode type;
+
+ /**
+ * Creates a union member with all fields
+ * left with the default value <code>null</code>.
+ */
+ public UnionMember()
+ {
+ }
+
+ /**
+ * Creates a union member.
+ *
+ * @param a_name member name.
+ * @param a_type member type code.
+ * @param a_type_def member IDL type definition.
+ */
+ public UnionMember(String a_name, Any a_label, TypeCode a_type,
+ IDLType a_type_def
+ )
+ {
+ name = a_name;
+ label = a_label;
+ type = a_type;
+ type_def = a_type_def;
+ }
+}
diff --git a/libjava/classpath/org/omg/CORBA/UnionMemberHelper.java b/libjava/classpath/org/omg/CORBA/UnionMemberHelper.java
new file mode 100644
index 00000000000..a4943564489
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/UnionMemberHelper.java
@@ -0,0 +1,179 @@
+/* UnionMemberHelper.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;
+
+import gnu.CORBA.Restricted_ORB;
+import gnu.CORBA.TypeCodeHelper;
+
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+
+/**
+ * A helper operations for the union member.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public abstract class UnionMemberHelper
+{
+ /**
+ * The cached typecode value (computed once).
+ */
+ private static TypeCode typeCode;
+
+ /**
+ * Used in creating recursive unions.
+ */
+ private static boolean active;
+
+ /**
+ * Inset the union member into the given Any.
+ */
+ public static void insert(Any a, UnionMember that)
+ {
+ OutputStream out = a.create_output_stream();
+ a.type(type());
+ write(out, that);
+ a.read_value(out.create_input_stream(), type());
+ }
+
+ /**
+ * Extract the union member from the given Any.
+ */
+ public static UnionMember extract(Any a)
+ {
+ return read(a.create_input_stream());
+ }
+
+ /**
+ * Create and return the typecode for this union member.
+ */
+ public static synchronized TypeCode type()
+ {
+ if (typeCode == null)
+ {
+ synchronized (TypeCode.class)
+ {
+ if (typeCode == null)
+ {
+ if (active)
+ {
+ return ORB.init().create_recursive_tc(id());
+ }
+ active = true;
+
+ ORB orb = Restricted_ORB.Singleton;
+
+ StructMember[] members = new StructMember[ 4 ];
+ TypeCode member;
+ member = orb.create_string_tc(0);
+ member =
+ orb.create_alias_tc(IdentifierHelper.id(), "Identifier",
+ member
+ );
+ members [ 0 ] = new StructMember("name", member, null);
+ member = orb.get_primitive_tc(TCKind.tk_any);
+ members [ 1 ] = new StructMember("label", member, null);
+ member = orb.create_string_tc(0);
+ member = orb.get_primitive_tc(TCKind.tk_TypeCode);
+ members [ 2 ] = new StructMember("type", member, null);
+ member = IDLTypeHelper.type();
+ members [ 3 ] = new StructMember("type_def", member, null);
+ typeCode =
+ orb.create_struct_tc(UnionMemberHelper.id(), "UnionMember",
+ members
+ );
+ active = false;
+ }
+ }
+ }
+ return typeCode;
+ }
+
+ /**
+ * Return the UnionMember repository id.
+ *
+ * @return "IDL:omg.org/CORBA/UnionMember:1.0", always.
+ */
+ public static String id()
+ {
+ return "IDL:omg.org/CORBA/UnionMember:1.0";
+ }
+
+ /**
+ * Read the union member from the given stream.
+ */
+ public static UnionMember read(InputStream istream)
+ {
+ try
+ {
+ UnionMember value = new UnionMember();
+ value.name = istream.read_string();
+ value.label = istream.read_any();
+ value.type = TypeCodeHelper.read(istream);
+ value.type_def = IDLTypeHelper.read(istream);
+ return value;
+ }
+ catch (UserException ex)
+ {
+ MARSHAL m = new MARSHAL();
+ m.initCause(ex);
+ throw m;
+ }
+ }
+
+ /**
+ * Write the union member to the given stream.
+ */
+ public static void write(OutputStream ostream, UnionMember value)
+ {
+ try
+ {
+ ostream.write_string(value.name);
+ ostream.write_any(value.label);
+ TypeCodeHelper.write(ostream, value.type);
+ IDLTypeHelper.write(ostream, value.type_def);
+ }
+ catch (UserException ex)
+ {
+ MARSHAL m = new MARSHAL();
+ m.initCause(ex);
+ throw m;
+ }
+ }
+} \ No newline at end of file
diff --git a/libjava/classpath/org/omg/CORBA/UnknownUserException.java b/libjava/classpath/org/omg/CORBA/UnknownUserException.java
new file mode 100644
index 00000000000..19efc0e3f30
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/UnknownUserException.java
@@ -0,0 +1,87 @@
+/* UnknownUserException.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;
+
+import org.omg.CORBA.portable.IDLEntity;
+
+import java.io.Serializable;
+
+/**
+ * A wrapper against an unknown user exception that has been thrown
+ * on remote side and returned by the server. The instance of this
+ * class is returned by {@link Request#env()}.
+ *
+ * @see Environment#exception().
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public class UnknownUserException
+ extends UserException
+ implements IDLEntity, Serializable
+{
+ /**
+ * The Any, holding the actual exception, that has been thrown
+ * by the server.
+ */
+ public Any except;
+
+ /**
+ * Use serialVersionUID (v1.4) for interoperability.
+ */
+ private static final long serialVersionUID = 3106202258203879281L;
+
+ /**
+ * Create an unitialised instance of the unknown user exception.
+ */
+ public UnknownUserException()
+ {
+ }
+
+ /**
+ * Create the instance of the unknow user exception, initialised
+ * to the given value.
+ *
+ * @param an_exception the exception, that has actually been thrown
+ * by the server.
+ */
+ public UnknownUserException(Any an_exception)
+ {
+ except = an_exception;
+ }
+} \ No newline at end of file
diff --git a/libjava/classpath/org/omg/CORBA/UserException.java b/libjava/classpath/org/omg/CORBA/UserException.java
new file mode 100644
index 00000000000..ac9b9fb3d02
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/UserException.java
@@ -0,0 +1,74 @@
+/* UserException.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;
+
+import java.io.Serializable;
+
+import org.omg.CORBA.portable.IDLEntity;
+
+/**
+ * The root class for CORBA IDL-defined user exceptions.
+ * @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
+ */
+public class UserException
+ extends Exception
+ implements IDLEntity, Serializable
+{
+ /**
+ * Use serialVersionUID for interoperability.
+ * Using the version 1.4 UID.
+ */
+ private static final long serialVersionUID = -6594940734566091244L;
+
+ /**
+ * Constructs a the exception.
+ */
+ public UserException()
+ {
+ }
+
+ /**
+ * Constructs the exception, explaining the reason of throwing it.
+ * @param reason a string, explaining, why the exception has been thrown.
+ */
+ public UserException(String reason)
+ {
+ super(reason);
+ }
+}
diff --git a/libjava/classpath/org/omg/CORBA/VM_ABSTRACT.java b/libjava/classpath/org/omg/CORBA/VM_ABSTRACT.java
new file mode 100644
index 00000000000..ffaeed879eb
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/VM_ABSTRACT.java
@@ -0,0 +1,52 @@
+/* VM_ABSTRACT.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;
+
+/**
+ * Specifies that the object is an abstract interface. One of the possible
+ * values, returned by {@link TypeCode#type_modifier()}.
+ *
+ * @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
+ */
+public interface VM_ABSTRACT
+{
+ /**
+ * States the abstract interface in a typecode.
+ */
+ short value = 2;
+}
diff --git a/libjava/classpath/org/omg/CORBA/VM_CUSTOM.java b/libjava/classpath/org/omg/CORBA/VM_CUSTOM.java
new file mode 100644
index 00000000000..40c64feafad
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/VM_CUSTOM.java
@@ -0,0 +1,53 @@
+/* VM_CUSTOM.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;
+
+/**
+ * Indicates a custom marshalled value type. One of the possible
+ * values, returned by {@link TypeCode#type_modifier()}.
+ *
+ * @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
+ */
+public interface VM_CUSTOM
+{
+ /**
+ * States that the code used to represent a custom
+ * marshalled value type in a typecode.
+ */
+ short value = 1;
+}
diff --git a/libjava/classpath/org/omg/CORBA/VM_NONE.java b/libjava/classpath/org/omg/CORBA/VM_NONE.java
new file mode 100644
index 00000000000..f8ef8b51c90
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/VM_NONE.java
@@ -0,0 +1,52 @@
+/* VM_NONE.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;
+
+/**
+ * One of the possible values, returned by {@link TypeCode#type_modifier()}.
+ *
+ * @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
+ */
+public interface VM_NONE
+{
+ /**
+ * States that the code used to represent the one of
+ * the values of a value type in a typecode.
+ */
+ short value = 0;
+}
diff --git a/libjava/classpath/org/omg/CORBA/VM_TRUNCATABLE.java b/libjava/classpath/org/omg/CORBA/VM_TRUNCATABLE.java
new file mode 100644
index 00000000000..6b70770bed9
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/VM_TRUNCATABLE.java
@@ -0,0 +1,53 @@
+/* VM_TRUNCATABLE.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;
+
+/**
+ * Indicates a truncatable value type. One of the possible
+ * values, returned by {@link TypeCode#type_modifier()}.
+ *
+ * @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
+ */
+public interface VM_TRUNCATABLE
+{
+ /**
+ * States that the code used to represent a truncatable
+ * value type in a typecode.
+ */
+ short value = 3;
+}
diff --git a/libjava/classpath/org/omg/CORBA/ValueBaseHelper.java b/libjava/classpath/org/omg/CORBA/ValueBaseHelper.java
new file mode 100644
index 00000000000..941e9d740fe
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/ValueBaseHelper.java
@@ -0,0 +1,135 @@
+/* ValueBaseHelper.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;
+
+import gnu.CORBA.CDR.Vio;
+import gnu.CORBA.recordTypeCode;
+
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+
+import java.io.Serializable;
+
+/**
+ * A helper operations for the value base type ({@link ValueBase}).
+ *
+ * @since 1.3
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public abstract class ValueBaseHelper
+{
+ /**
+ * Extract the value type from the given Any.
+ *
+ * @param a the Any to extract from.
+ *
+ * @return the extracted value type.
+ */
+ public static Serializable extract(Any a)
+ {
+ return a.extract_Value();
+ }
+
+ /**
+ * Return the value base helper repository id.
+ *
+ * @return IDL:omg.org/CORBA/ValueBase:1.0, always.
+ */
+ public static String id()
+ {
+ return "IDL:omg.org/CORBA/ValueBase:1.0";
+ }
+
+ /**
+ * Insert the value base that is Serializable into
+ * the given Any.
+ *
+ * @param a the Any to insert into.
+ * @param that the value base to insert.
+ */
+ public static void insert(Any a, Serializable that)
+ {
+ a.insert_Value(that);
+ }
+
+ /**
+ * Read the value base from the given input stream.
+ *
+ * @param input a stream to read from.
+ *
+ * @return the loaded value.
+ *
+ * @throws MARSHAL if the reading has failed due any reason.
+ */
+ public static Serializable read(InputStream input)
+ {
+ return Vio.read(input);
+ }
+
+ /**
+ * Get the typecode of the value type.
+ * @return
+ */
+ public static TypeCode type()
+ {
+ recordTypeCode r = new recordTypeCode(TCKind.tk_value);
+ return r;
+ }
+
+ /**
+ * Write the value base into the given stream.
+ *
+ * If the passed value implements the {@link CustomMarshal},
+ * the helper uses {@link CustomMarshal#marshal}
+ * to write the content in a user defined way. Otherwise,
+ * this implementation initialises the {@link ObjectOutputStream}
+ * and writes through it.
+ *
+ * @param output a stream to write to.
+ *
+ * @param value a value to write.
+ *
+ * @throws MARSHAL if the writing failed due any reason.
+ */
+ public static void write(OutputStream output, Serializable value)
+ {
+ Vio.write(output, value);
+ }
+} \ No newline at end of file
diff --git a/libjava/classpath/org/omg/CORBA/ValueBaseHolder.java b/libjava/classpath/org/omg/CORBA/ValueBaseHolder.java
new file mode 100644
index 00000000000..c6efed5eb04
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/ValueBaseHolder.java
@@ -0,0 +1,109 @@
+/* ValueBaseHolder.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;
+
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+import org.omg.CORBA.portable.Streamable;
+
+import java.io.Serializable;
+
+/**
+ * A holder to store a {@link ValueBase} that is handled as
+ * {@link Serializable} here.
+ *
+ * @since 1.3
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public class ValueBaseHolder
+ implements Streamable
+{
+ /**
+ * A stored value of the value base type.
+ */
+ public Serializable value;
+
+ /**
+ * Create an unitialised instance.
+ */
+ public ValueBaseHolder()
+ {
+ }
+
+ /**
+ * Create an instance, initialised into the given value.
+ *
+ * @param initial an initial value.
+ */
+ public ValueBaseHolder(Serializable initial)
+ {
+ value = initial;
+ }
+
+ /**
+ * Read fill in the value field by reading an instance from the
+ * given input stream. Uses {@link ValueBaseHelper.}
+ *
+ * @param input a stream to read from.
+ */
+ public void _read(InputStream input)
+ {
+ value = ValueBaseHelper.read(input);
+ }
+
+ /**
+ * Get the typecode of the stored instance. Uses {@link ValueBaseHelper.}
+ */
+ public TypeCode _type()
+ {
+ return ValueBaseHelper.type();
+ }
+
+ /**
+ * Write the stored instance to the given input stream.
+ * Uses {@link ValueBaseHelper.}
+ *
+ * @param input a stream to read from.
+ */
+ public void _write(OutputStream output)
+ {
+ ValueBaseHelper.write(output, value);
+ }
+} \ No newline at end of file
diff --git a/libjava/classpath/org/omg/CORBA/ValueMember.java b/libjava/classpath/org/omg/CORBA/ValueMember.java
new file mode 100644
index 00000000000..f6bb70d3c8e
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/ValueMember.java
@@ -0,0 +1,124 @@
+/* ValueMember.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;
+
+import org.omg.CORBA.portable.IDLEntity;
+
+import java.io.Serializable;
+
+/**
+ * The class, defining properties of the value member.
+ *
+ * @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
+ */
+public class ValueMember
+ implements Serializable, IDLEntity
+{
+ /**
+ * Use serialVersionUID (v1.4) for interoperability.
+ */
+ private static final long serialVersionUID = -2507594168537449114L;
+
+ /**
+ * The typedef that represents the IDL type of the value member.
+ */
+ public IDLType type_def;
+
+ /**
+ * The repository ID of the value for that this member is defined
+ */
+ public String defined_in;
+
+ /**
+ * The repository ID of this value member itself.
+ */
+ public String id;
+
+ /** The name of the value member. */
+ public String name;
+
+ /**
+ * The version of the value in which this member is defined.
+ */
+ public String version;
+
+ /** The type of of this value member. */
+ public TypeCode type;
+
+ /**
+ * The type of access (public, private) of this value member.
+ * This field can be equal to either {@link PUBLIC_MEMBER#value} or
+ * {@link PRIVATE_MEMBER#value}.
+ */
+ public short access;
+
+ /**
+ * Create the value member with all fields initialised to default values
+ * (0 and <code>null</code>).
+ */
+ public ValueMember()
+ {
+ }
+
+ /**
+ * Create the value member, specifying the field values.
+ *
+ * @param a_name name.
+ * @param an_id id .
+ * @param is_defined_in id of the value where the member is defined.
+ * @param a_version version.
+ * @param a_type tye.
+ * @param a_type_def {@link IDLType} (typeded).
+ * @param an_access accessibility scope. Can be equal to either
+ * {@link PUBLIC_MEMBER#value} or {@link PRIVATE_MEMBER#value}.
+ */
+ public ValueMember(String a_name, String an_id, String is_defined_in,
+ String a_version, TypeCode a_type, IDLType a_type_def,
+ short an_access
+ )
+ {
+ name = a_name;
+ id = an_id;
+ defined_in = is_defined_in;
+ version = a_version;
+ type = a_type;
+ type_def = a_type_def;
+ access = an_access;
+ }
+}
diff --git a/libjava/classpath/org/omg/CORBA/ValueMemberHelper.java b/libjava/classpath/org/omg/CORBA/ValueMemberHelper.java
new file mode 100644
index 00000000000..208623c2e7b
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/ValueMemberHelper.java
@@ -0,0 +1,207 @@
+/* ValueMemberHelper.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;
+
+import gnu.CORBA.Restricted_ORB;
+import gnu.CORBA.TypeCodeHelper;
+
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+
+/**
+ * The helper operations for the value member.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public abstract class ValueMemberHelper
+{
+ /**
+ * The cached typecode value, computed once.
+ */
+ private static TypeCode typeCode = null;
+
+ /**
+ * Used when creating typecodes with recursive value members.
+ */
+ private static boolean active = false;
+
+ /**
+ * Insert the value member into the given Any.
+ */
+ public static void insert(Any a, ValueMember that)
+ {
+ OutputStream out = a.create_output_stream();
+ a.type(type());
+ write(out, that);
+ a.read_value(out.create_input_stream(), type());
+ }
+
+ /**
+ * Extract the value member from the given Any.
+ */
+ public static ValueMember extract(Any a)
+ {
+ return read(a.create_input_stream());
+ }
+
+ /**
+ * Create a typecode for this value member.
+ */
+ public static synchronized TypeCode type()
+ {
+ if (typeCode == null)
+ {
+ synchronized (TypeCode.class)
+ {
+ if (typeCode == null)
+ {
+ ORB orb = Restricted_ORB.Singleton;
+
+ if (active)
+ {
+ return orb.create_recursive_tc(id());
+ }
+ active = true;
+
+ StructMember[] members = new StructMember[ 7 ];
+ TypeCode member;
+ member = orb.create_string_tc(0);
+ member =
+ orb.create_alias_tc(IdentifierHelper.id(), "Identifier",
+ member
+ );
+ members [ 0 ] = new StructMember("name", member, null);
+ member = orb.create_string_tc(0);
+ member =
+ orb.create_alias_tc(RepositoryIdHelper.id(), "RepositoryId",
+ member
+ );
+ members [ 1 ] = new StructMember("id", member, null);
+ member = orb.create_string_tc(0);
+ member =
+ orb.create_alias_tc(RepositoryIdHelper.id(), "RepositoryId",
+ member
+ );
+ members [ 2 ] = new StructMember("defined_in", member, null);
+ member = orb.create_string_tc(0);
+ member =
+ orb.create_alias_tc(VersionSpecHelper.id(), "VersionSpec",
+ member
+ );
+ members [ 3 ] = new StructMember("version", member, null);
+ member = orb.create_string_tc(0);
+ member = orb.get_primitive_tc(TCKind.tk_TypeCode);
+ members [ 4 ] = new StructMember("type", member, null);
+ member = IDLTypeHelper.type();
+ members [ 5 ] = new StructMember("type_def", member, null);
+ member = orb.get_primitive_tc(TCKind.tk_short);
+ member =
+ orb.create_alias_tc(VisibilityHelper.id(), "Visibility",
+ member
+ );
+ members [ 6 ] = new StructMember("access", member, null);
+ typeCode =
+ orb.create_struct_tc(ValueMemberHelper.id(), "ValueMember",
+ members
+ );
+ active = false;
+ }
+ }
+ }
+ return typeCode;
+ }
+
+ /**
+ * Return the ValueMember repository id.
+ *
+ * @return "IDL:omg.org/CORBA/ValueMember:1.0", always.
+ */
+ public static String id()
+ {
+ return "IDL:omg.org/CORBA/ValueMember:1.0";
+ }
+
+ /**
+ * Reads the value member from the given stream.
+ */
+ public static ValueMember read(InputStream istream)
+ {
+ try
+ {
+ ValueMember value = new ValueMember();
+ value.name = istream.read_string();
+ value.id = istream.read_string();
+ value.defined_in = istream.read_string();
+ value.version = istream.read_string();
+ value.type = TypeCodeHelper.read(istream);
+ value.type_def = IDLTypeHelper.read(istream);
+ value.access = istream.read_short();
+ return value;
+ }
+ catch (UserException ex)
+ {
+ MARSHAL m = new MARSHAL();
+ m.initCause(ex);
+ throw m;
+ }
+ }
+
+ /**
+ * Writes the value member to the given stream.
+ */
+ public static void write(OutputStream ostream, ValueMember value)
+ {
+ try
+ {
+ ostream.write_string(value.name);
+ ostream.write_string(value.id);
+ ostream.write_string(value.defined_in);
+ ostream.write_string(value.version);
+ TypeCodeHelper.write(ostream, value.type);
+ IDLTypeHelper.write(ostream, value.type_def);
+ ostream.write_short(value.access);
+ }
+ catch (UserException ex)
+ {
+ MARSHAL m = new MARSHAL();
+ m.initCause(ex);
+ throw m;
+ }
+ }
+} \ No newline at end of file
diff --git a/libjava/classpath/org/omg/CORBA/VersionSpecHelper.java b/libjava/classpath/org/omg/CORBA/VersionSpecHelper.java
new file mode 100644
index 00000000000..dcdad34e4f5
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/VersionSpecHelper.java
@@ -0,0 +1,116 @@
+/* VersionSpecHelper.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;
+
+import gnu.CORBA.Restricted_ORB;
+
+import org.omg.CORBA.Any;
+import org.omg.CORBA.ORB;
+import org.omg.CORBA.TypeCode;
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+
+/**
+ * A formal helper for the CORBA VersionSpec that is identical to the
+ * narrow string.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public abstract class VersionSpecHelper
+{
+ /**
+ * Insert the VersionSpec into Any (uses {@link Any.insert_string}).
+ *
+ * @param a the Any to insert into.
+ * @param that the string to insert.
+ */
+ public static void insert(Any a, String that)
+ {
+ a.insert_string(that);
+ }
+
+ /**
+ * Extract the VersionSpec from Any ((uses {@link Any.extract_string}).
+ *
+ * @param a the Any to extract from.
+ */
+ public static String extract(Any a)
+ {
+ return a.extract_string();
+ }
+
+ /**
+ * Return an string alias typecode, named "VersionSpec".
+ */
+ public static TypeCode type()
+ {
+ ORB orb = Restricted_ORB.Singleton;
+ return orb.create_alias_tc(id(), "VersionSpec", orb.create_string_tc(0));
+ }
+
+ /**
+ * Return the VersionSpec repository id.
+ * @return "IDL:omg.org/CORBA/VersionSpec:1.0", always.
+ */
+ public static String id()
+ {
+ return "IDL:omg.org/CORBA/VersionSpec:1.0";
+ }
+
+ /**
+ * Calls {@link InputStream#read_string()}.
+ *
+ * @param istream the stream to read from.
+ */
+ public static String read(InputStream istream)
+ {
+ return istream.read_string();
+ }
+
+ /**
+ * Calls {@link OutputStream#write_string()}.
+ *
+ * @param ostream the stream to write into.
+ * @param value the string (VersionSpec) value to write.
+ */
+ public static void write(OutputStream ostream, String value)
+ {
+ ostream.write_string(value);
+ }
+} \ No newline at end of file
diff --git a/libjava/classpath/org/omg/CORBA/VisibilityHelper.java b/libjava/classpath/org/omg/CORBA/VisibilityHelper.java
new file mode 100644
index 00000000000..f2ed32f6371
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/VisibilityHelper.java
@@ -0,0 +1,127 @@
+/* VisibilityHelper.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;
+
+import gnu.CORBA.Restricted_ORB;
+
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+
+/**
+ * A helper operations for a Visibility that is mapped into java and CORBA
+ * <code>short</code>. The Visibility normally takes one of the two values,
+ * {@link PUBLIC_MEMBER#value} or {@link PRIVATE_MEMBER#value}.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public abstract class VisibilityHelper
+{
+ /**
+ * The cached typecode value, computed only once.
+ */
+ private static TypeCode typeCode;
+
+ /**
+ * Insert the Visibility into the given Any.
+ * Uses {@link Any.insert_short}.
+ */
+ public static void insert(Any any, short that)
+ {
+ any.insert_short(that);
+ }
+
+ /**
+ * Extract the Visibility from the given Any.
+ * Uses {@link Any.extract_short}.
+ */
+ public static short extract(Any any)
+ {
+ return any.extract_short();
+ }
+
+ /**
+ * Return an alias of short, named "Visibility".
+ */
+ public static TypeCode type()
+ {
+ if (typeCode == null)
+ {
+ TypeCode tshort =
+ Restricted_ORB.Singleton.get_primitive_tc(TCKind.tk_short);
+ typeCode =
+ Restricted_ORB.Singleton.create_alias_tc(id(), "Visibility", tshort);
+ }
+ return typeCode;
+ }
+
+ /**
+ * Get the Visibility repository id.
+ *
+ * @return "IDL:omg.org/CORBA/Visibility:1.0", always.
+ */
+ public static String id()
+ {
+ return "IDL:omg.org/CORBA/Visibility:1.0";
+ }
+
+ /**
+ * Read the visibility value (as short) from the CDR intput stream.
+ *
+ * Uses {@link InputStream.read_short()}.
+ *
+ * @param istream a stream to read from.
+ */
+ public static short read(InputStream istream)
+ {
+ return istream.read_short();
+ }
+
+ /**
+ * Write the visibility value (as short) to the CDR output stream.
+ *
+ * USes {@link OutputStream.write_short(short)}.
+ *
+ * @param ostream a stream to write into.
+ * @param value a value to write.
+ */
+ public static void write(OutputStream ostream, short value)
+ {
+ ostream.write_short(value);
+ }
+} \ No newline at end of file
diff --git a/libjava/classpath/org/omg/CORBA/WCharSeqHelper.java b/libjava/classpath/org/omg/CORBA/WCharSeqHelper.java
new file mode 100644
index 00000000000..c12c3de1c78
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/WCharSeqHelper.java
@@ -0,0 +1,142 @@
+/* WCharSeqHelper.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;
+
+import gnu.CORBA.primitiveArrayTypeCode;
+
+import org.omg.CORBA.TypeCodePackage.BadKind;
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+
+/**
+ * Provides static helper methods for working with
+ * CORBA sequence of <code>char</code>
+ * (<code>WCharSeq</code>).
+ *
+ * @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
+ */
+public abstract class WCharSeqHelper
+{
+ /**
+ * Extract the <code>char[]</code> from the
+ * given {@link Any}. This implementation expects the
+ * {@link Any} to hold the instance of {@link WCharSeqHolder}
+ * that is returned by {@link Any#extract_Streamable() }.
+ *
+ * @param a an Any to extract the array from.
+ *
+ * @return the extracted array.
+ *
+ * @throws ClassCastException if the Any contains something other than the
+ * the {@link WCharSeqHolder}.
+ */
+ public static char[] extract(Any a)
+ {
+ WCharSeqHolder h = (WCharSeqHolder) a.extract_Streamable();
+ return h.value;
+ }
+
+ /**
+ * Returns the agreed Id, delegating functionality to
+ * the {@link #type()}.id().
+ */
+ public static String id()
+ {
+ try
+ {
+ return type().id();
+ }
+ catch (BadKind ex)
+ {
+ // Should never happen under correct work.
+ throw new Error("Please report this bug.", ex);
+ }
+ }
+
+ /**
+ * Insert into the given <code>char[]</code> into the
+ * given {@link Any}. This implementation first creates
+ * a {@link WCharSeqHolder} and then calls
+ * {@link Any#insert_Streamable(Streamable)}.
+ *
+ * @param into the target Any.
+ * @param that the array to insert.
+ */
+ public static void insert(Any into, char[] that)
+ {
+ WCharSeqHolder holder = new WCharSeqHolder(that);
+ into.insert_Streamable(holder);
+ }
+
+ /**
+ * Reads the <code>char[]</code> from the CORBA input stream.
+ *
+ * @param input the CORBA (not java.io) stream to read from.
+ * @return the value from the stream.
+ */
+ public static char[] read(InputStream input)
+ {
+ char[] value = new char[ input.read_long() ];
+ input.read_wchar_array(value, 0, value.length);
+ return value;
+ }
+
+ /**
+ * Creates and returns a new instance of the TypeCode,
+ * corresponding the CORBA <code>WCharSeq</code>.
+ * The length of the sequence is left with the initial
+ * value 0.
+ */
+ public static TypeCode type()
+ {
+ return new primitiveArrayTypeCode(TCKind.tk_char);
+ }
+
+ /**
+ * Writes the <code>char[]</code> into the given stream.
+ *
+ * @param output the CORBA (not java.io) output stream to write.
+ * @param value the value that must be written.
+ */
+ public static void write(OutputStream output, char[] value)
+ {
+ output.write_long(value.length);
+ output.write_wchar_array(value, 0, value.length);
+ }
+}
diff --git a/libjava/classpath/org/omg/CORBA/WCharSeqHolder.java b/libjava/classpath/org/omg/CORBA/WCharSeqHolder.java
new file mode 100644
index 00000000000..1b11506a298
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/WCharSeqHolder.java
@@ -0,0 +1,126 @@
+/* WCharSeqHolder.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;
+
+import gnu.CORBA.primitiveArrayTypeCode;
+
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+import org.omg.CORBA.portable.Streamable;
+
+/**
+ * A sequence holder for CORBA <code>WCharSeq</code> that is mapped into
+ * java <code>char[]</code>.
+ *
+ * @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
+ */
+public final class WCharSeqHolder
+ implements Streamable
+{
+ /**
+ * The <code>char[]</code> (CORBA <code>WCharSeq</code>) value,
+ * held by this WCharSeqHolder.
+ */
+ public char[] value;
+
+ /**
+ * The type code for this holder. Each holder has a different instance.
+ */
+ private final primitiveArrayTypeCode typecode =
+ new primitiveArrayTypeCode(TCKind.tk_wchar);
+
+ /**
+ * Constructs an instance of WCharSeqHolder,
+ * initializing {@link #value} to <code>null</code>.
+ */
+ public WCharSeqHolder()
+ {
+ }
+
+ /**
+ * Constructs an instance of WCharSeqHolder,
+ * initializing {@link #value} to the given <code>char[]</code>.
+ *
+ * @param initial_value a value that will be assigned to the
+ * {@link #value} field.
+ */
+ public WCharSeqHolder(char[] initial_value)
+ {
+ value = initial_value;
+ typecode.setLength(value.length);
+ }
+
+ /**
+ * Fill in the {@link value } field by reading the required data
+ * from the given stream. This method first reads the array size
+ * (as CORBA <code>long</code>) and then calls the
+ * {@link org.omg.CORBA.portable.InputStream#input.read_wchar_array }.
+ *
+ * @param input the input stream to read from.
+ */
+ public void _read(InputStream input)
+ {
+ value = new char[ input.read_long() ];
+ input.read_wchar_array(value, 0, value.length);
+ typecode.setLength(value.length);
+ }
+
+ /**
+ * Returns the TypeCode, corresponding the CORBA type that is stored
+ * using this holder.
+ */
+ public TypeCode _type()
+ {
+ return typecode;
+ }
+
+ /**
+ * Write the {@link value } field to the given stream.
+ * This method first writes the array size
+ * (as CORBA <code>long</code>) and then calls the
+ * {@link org.omg.CORBA.portable.OutputStream#input.write_wchar_array }.
+ *
+ * @param output the output stream to write into.
+ */
+ public void _write(OutputStream output)
+ {
+ output.write_long(value.length);
+ output.write_wchar_array(value, 0, value.length);
+ }
+}
diff --git a/libjava/classpath/org/omg/CORBA/WStringSeqHelper.java b/libjava/classpath/org/omg/CORBA/WStringSeqHelper.java
new file mode 100644
index 00000000000..916c6a250da
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/WStringSeqHelper.java
@@ -0,0 +1,148 @@
+/* WStringSeqHelper.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;
+
+import gnu.CORBA.primitiveArrayTypeCode;
+
+import org.omg.CORBA.TypeCodePackage.BadKind;
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+
+/**
+ * Provides static helper methods for working with
+ * CORBA <code>wstring</code> array.
+ *
+ * @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
+ */
+public abstract class WStringSeqHelper
+{
+ /**
+ * Extract the <code>String[]</code> from the
+ * given {@link Any}. This implementation expects the
+ * {@link Any} to hold the instance of {@link WStringSeqHolder}
+ * that is returned by {@link Any#extract_Streamable() }.
+ *
+ * @param a an Any to extract the array from.
+ *
+ * @return the extracted array.
+ *
+ * @throws ClassCastException if the Any contains something other than the
+ * the {@link WStringSeqHolder}.
+ */
+ public static String[] extract(Any a)
+ {
+ WStringSeqHolder h = (WStringSeqHolder) a.extract_Streamable();
+ return h.value;
+ }
+
+ /**
+ * Returns the agreed Id, delegating functionality to
+ * the {@link #type()}.id().
+ */
+ public static String id()
+ {
+ try
+ {
+ return type().id();
+ }
+ catch (BadKind ex)
+ {
+ // Should never happen under correct work.
+ throw new Error("Please report this bug.", ex);
+ }
+ }
+
+ /**
+ * Insert into the given <code>String[]</code> into the
+ * given {@link Any}. This implementation first creates
+ * a {@link WStringSeqHolder} and then calls
+ * {@link Any#insert_Streamable(Streamable)}.
+ *
+ * @param into the target Any.
+ * @param that the array to insert.
+ */
+ public static void insert(Any into, String[] that)
+ {
+ WStringSeqHolder holder = new WStringSeqHolder(that);
+ into.insert_Streamable(holder);
+ }
+
+ /**
+ * Reads the <code>String[]</code> from the CORBA input stream.
+ *
+ * @param input the CORBA (not java.io) stream to read from.
+ * @return the value from the stream.
+ */
+ public static String[] read(InputStream input)
+ {
+ String[] value = new String[ input.read_long() ];
+ for (int i = 0; i < value.length; i++)
+ {
+ value [ i ] = input.read_wstring();
+ }
+ return value;
+ }
+
+ /**
+ * Creates and returns a new instance of the TypeCode,
+ * corresponding the CORBA <code>wstring[]</code>.
+ * The length of the sequence is left with the initial
+ * value 0.
+ */
+ public static TypeCode type()
+ {
+ return new primitiveArrayTypeCode(TCKind.tk_string);
+ }
+
+ /**
+ * Writes the <code>String[]</code> into the given stream.
+ *
+ * @param output the CORBA (not java.io) output stream to write.
+ * @param value the value that must be written.
+ */
+ public static void write(OutputStream output, String[] value)
+ {
+ output.write_long(value.length);
+
+ for (int i = 0; i < value.length; i++)
+ {
+ output.write_wstring(value [ i ]);
+ }
+ }
+}
diff --git a/libjava/classpath/org/omg/CORBA/WStringSeqHolder.java b/libjava/classpath/org/omg/CORBA/WStringSeqHolder.java
new file mode 100755
index 00000000000..474d69a47ad
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/WStringSeqHolder.java
@@ -0,0 +1,131 @@
+/* WStringSeqHolder.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;
+
+import gnu.CORBA.primitiveArrayTypeCode;
+
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+import org.omg.CORBA.portable.Streamable;
+
+/**
+ * A sequence holder for CORBA <code>wstring[]</code> that is mapped into
+ * java <code>String[]</code>.
+ *
+ * @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
+ */
+public final class WStringSeqHolder
+ implements Streamable
+{
+ /**
+ * The <code>String[]</code> (CORBA <code>wstring[]</code>) value,
+ * held by this WStringSeqHolder.
+ */
+ public String[] value;
+
+ /**
+ * The type code for this holder. Each holder has a different instance.
+ */
+ private final primitiveArrayTypeCode typecode =
+ new primitiveArrayTypeCode(TCKind.tk_wchar);
+
+ /**
+ * Constructs an instance of WStringSeqHolder,
+ * initializing {@link #value} to <code>null</code>.
+ */
+ public WStringSeqHolder()
+ {
+ }
+
+ /**
+ * Constructs an instance of WStringSeqHolder,
+ * initializing {@link #value} to the given <code>String</code>.
+ *
+ * @param initial_value a value that will be assigned to the
+ * {@link #value} field.
+ */
+ public WStringSeqHolder(String[] initial_value)
+ {
+ value = initial_value;
+ typecode.setLength(value.length);
+ }
+
+ /**
+ * Fill in the {@link value } field by reading the required data
+ * from the given stream. This method first reads the array size
+ * (as CORBA <code>long</code>and then all strings.
+ *
+ * @param input the input stream to read from.
+ */
+ public void _read(InputStream input)
+ {
+ value = new String[ input.read_long() ];
+ for (int i = 0; i < value.length; i++)
+ {
+ value [ i ] = input.read_wstring();
+ }
+ typecode.setLength(value.length);
+ }
+
+ /**
+ * Returns the TypeCode, corresponding the CORBA type that is stored
+ * using this holder.
+ */
+ public TypeCode _type()
+ {
+ return typecode;
+ }
+
+ /**
+ * Write the {@link value } field to the given stream.
+ * This method first writes the array size
+ * (as CORBA <code>long</code> and then all strings.
+ *
+ * @param output the output stream to write into.
+ */
+ public void _write(OutputStream output)
+ {
+ output.write_long(value.length);
+
+ for (int i = 0; i < value.length; i++)
+ {
+ output.write_wstring(value [ i ]);
+ }
+ }
+}
diff --git a/libjava/classpath/org/omg/CORBA/WStringValueHelper.java b/libjava/classpath/org/omg/CORBA/WStringValueHelper.java
new file mode 100644
index 00000000000..7748a6c782d
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/WStringValueHelper.java
@@ -0,0 +1,198 @@
+/* WStringValueHelper.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;
+
+import gnu.CORBA.Restricted_ORB;
+import gnu.CORBA.gnuAny;
+
+import org.omg.CORBA.TypeCodePackage.BadKind;
+import org.omg.CORBA.portable.BoxedValueHelper;
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+
+import java.io.Serializable;
+
+/**
+ * Provides helper operations for the Wide String value type, treating a
+ * Wide String as a CORBA value type rather than as a primitive type. The OMG
+ * specification states this may be convenient in some specific
+ * cases. The typecode is different, but the reading/writing format in
+ * this implementation is the same as for the ordinary wide string. This is
+ * that Sun's IDL compiler (v1.4) would generate.
+ *
+ * @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
+ */
+public class WStringValueHelper
+ implements BoxedValueHelper
+{
+ /**
+ * The Wide String value helper repository Id.
+ */
+ private static final String id = "IDL:omg.org/CORBA/WStringValue:1.0";
+
+ /**
+ * The cached typecode value, computed once.
+ */
+ private static TypeCode typecode;
+
+ /**
+ * The Wide String typecode.
+ */
+ private static final TypeCode twString =
+ Restricted_ORB.Singleton.create_wstring_tc(0);
+
+ /**
+ * Returns the String Value repository Id.
+ * @return "IDL:omg.org/CORBA/WStringValue:1.0", always.
+ */
+ public String get_id()
+ {
+ return id;
+ }
+
+ /**
+ * Returns the String Value repository Id.
+ * @return "IDL:omg.org/CORBA/WStringValue:1.0", always.
+ */
+ public static String id()
+ {
+ return id;
+ }
+
+ /**
+ * Read the wide string value from the input stream.
+ *
+ * @param istream a stream to read from.
+ *
+ * @return a string (delegates to read_wstring()).
+ */
+ public Serializable read_value(InputStream istream)
+ {
+ return istream.read_wstring();
+ }
+
+ /**
+ * Write the given wide string value into the output stream.
+ *
+ * @param ostream a stream to write into.
+ * @param a_string a string to write.
+ */
+ public void write_value(OutputStream ostream, Serializable a_string)
+ {
+ try
+ {
+ ostream.write_wstring((String) a_string);
+ }
+ catch (ClassCastException ex)
+ {
+ throw new MARSHAL("String expected");
+ }
+ }
+
+ /**
+ * Extract the wide string from the given Any. The operation
+ * requires Any to hold a String value and not a String.
+ *
+ * @param an_any an Any to extract from.
+ *
+ * @return the extracted string.
+ */
+ public static String extract(Any an_any)
+ {
+ if (an_any.type().equal(type()))
+ {
+ an_any.type(twString);
+ return an_any.extract_wstring();
+ }
+ else
+ throw new BAD_OPERATION("Contains not a wide string value type");
+ }
+
+ /**
+ * Insert the wide string into the given Any. After the operation,
+ * the Any will have a Wide String Value typecode and not a
+ * String or WString typecode.
+ *
+ * @param an_any an Any to insert into.
+ *
+ * @param that a string to insert.
+ */
+ public static void insert(Any an_any, String that)
+ {
+ an_any.insert_wstring(that);
+ an_any.type(type());
+ }
+
+ /**
+ * Reads a wide string as a value type.
+ *
+ * @param in a stream to read value from.
+ */
+ public static String read(InputStream in)
+ {
+ return in.read_wstring();
+ }
+
+ /**
+ * Create and return the value box typecode, named "WStringValue",
+ * with the content typecode being unbounded string.
+ */
+ public static TypeCode type()
+ {
+ if (typecode == null)
+ {
+ ORB orb = Restricted_ORB.Singleton;
+ typecode =
+ orb.create_value_box_tc(id(), "WStringValue", twString);
+ }
+ return typecode;
+ }
+
+ /**
+ * Writes a wide string as a value type.
+ *
+ * @param out a stream to write value into.
+ *
+ * @param a_string a string to write.
+ */
+ public static void write(OutputStream out, String a_string)
+ {
+ out.write_wstring(a_string);
+ }
+} \ No newline at end of file
diff --git a/libjava/classpath/org/omg/CORBA/WrongTransaction.java b/libjava/classpath/org/omg/CORBA/WrongTransaction.java
new file mode 100644
index 00000000000..fc869a267e8
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/WrongTransaction.java
@@ -0,0 +1,70 @@
+/* WrongTransaction.java -- Exception thrown due to out-of-bounds parameter
+ 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;
+
+/**
+ * Thrown when the transaction scope mismatches.
+ *
+ * @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
+ */
+public final class WrongTransaction
+ extends UserException
+{
+
+ /**
+ * Constructs a default <code>WrongTransaction</code> exception, with
+ * no detail message.
+ */
+ public WrongTransaction()
+ {
+ super();
+ }
+
+ /**
+ * Constructs a <code>WrongTransaction</code> exception using the specified
+ * message as the reason for throwing it.
+ *
+ * @param reason the reason, why the exception has been thrown.
+ */
+ public WrongTransaction(String reason)
+ {
+ super(reason);
+ }
+
+}
diff --git a/libjava/classpath/org/omg/CORBA/_IDLTypeStub.java b/libjava/classpath/org/omg/CORBA/_IDLTypeStub.java
new file mode 100644
index 00000000000..db36fa78016
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/_IDLTypeStub.java
@@ -0,0 +1,197 @@
+/* _IDLTypeStub.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;
+
+import gnu.CORBA.TypeCodeHelper;
+
+import org.omg.CORBA.portable.ApplicationException;
+import org.omg.CORBA.portable.Delegate;
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.ObjectImpl;
+import org.omg.CORBA.portable.OutputStream;
+import org.omg.CORBA.portable.RemarshalException;
+
+import java.io.Serializable;
+
+/**
+ * The stub for the IDL type. This stub can be used to access the
+ * remote IDL type object, if its IOR is known. To create the
+ * working instance with the known IOR, pass {@link gnu.CORBA.IOR_Delegate}
+ * to the constructor.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public class _IDLTypeStub
+ extends ObjectImpl
+ implements IDLType, Serializable
+{
+ /**
+ * Use serialVersionUID (v1.4) for interoperability.
+ */
+ private static final long serialVersionUID = 9150293942452453626L;
+
+ /**
+ * Create the instance of the IDL type stub without
+ * the set delegate. The delegate must be set anyway before calling
+ * any remote method.
+ */
+ public _IDLTypeStub()
+ {
+ }
+
+ /**
+ * Create an instance with the given delegate.
+ *
+ * @see gnu.CORBA.IOR_Delegate
+ */
+ public _IDLTypeStub(Delegate delegate)
+ {
+ _set_delegate(delegate);
+ }
+
+ /**
+ * Get the typecode of the remote IDL type object. The method is
+ * written following OMG specification, treating the typecode
+ * as a read only attribute rather than a method. This means,
+ * the operation name is "_get_type".
+ *
+ * @return a typecode, returned by the remote IDL type object.
+ */
+ public TypeCode type()
+ {
+ InputStream in = null;
+ try
+ {
+ OutputStream out = _request("_get_type", true);
+ in = _invoke(out);
+ return TypeCodeHelper.read(in);
+ }
+ catch (ApplicationException ex)
+ {
+ in = ex.getInputStream();
+ throw new org.omg.CORBA.MARSHAL(ex.getId());
+ }
+ catch (RemarshalException rex)
+ {
+ return type();
+ }
+ catch (UserException ex)
+ {
+ MARSHAL m = new MARSHAL();
+ m.initCause(ex);
+ throw m;
+ }
+ finally
+ {
+ _releaseReply(in);
+ }
+ }
+
+ /**
+ * Get the definition kind of the remote IDL type object. The method is
+ * written following OMG specification, treating the typecode
+ * as a read only attribute rather than a method. This means,
+ * the operation name is "_get_def_kind".
+ *
+ * @return a definition kind, returned by remote IDL type object.
+ */
+ public DefinitionKind def_kind()
+ {
+ InputStream in = null;
+ try
+ {
+ OutputStream out = _request("_get_def_kind", true);
+ in = _invoke(out);
+ return DefinitionKindHelper.read(in);
+ }
+ catch (ApplicationException ex)
+ {
+ in = ex.getInputStream();
+ throw new org.omg.CORBA.MARSHAL(ex.getId());
+ }
+ catch (RemarshalException rex)
+ {
+ return def_kind();
+ }
+ finally
+ {
+ _releaseReply(in);
+ }
+ }
+
+ /**
+ * Destroy the remote IDL type object.
+ */
+ public void destroy()
+ {
+ InputStream in = null;
+ try
+ {
+ OutputStream out = _request("destroy", true);
+ in = _invoke(out);
+ }
+ catch (ApplicationException ex)
+ {
+ in = ex.getInputStream();
+ throw new org.omg.CORBA.MARSHAL(ex.getId());
+ }
+ catch (RemarshalException rex)
+ {
+ destroy();
+ }
+ finally
+ {
+ _releaseReply(in);
+ }
+ }
+
+ /**
+ * Return the array of repository ids of the IDL type.
+ *
+ * @return "IDL:omg.org/CORBA/IDLType:1.0" and
+ * "IDL:omg.org/CORBA/IRObject:1.0", always.
+ */
+ public String[] _ids()
+ {
+ return new String[]
+ {
+ "IDL:omg.org/CORBA/IDLType:1.0", "IDL:omg.org/CORBA/IRObject:1.0"
+ };
+ }
+} \ No newline at end of file
diff --git a/libjava/classpath/org/omg/CORBA/_PolicyStub.java b/libjava/classpath/org/omg/CORBA/_PolicyStub.java
new file mode 100644
index 00000000000..50481fe17a0
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/_PolicyStub.java
@@ -0,0 +1,176 @@
+/* _PolicyStub.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;
+
+import org.omg.CORBA.MARSHAL;
+import org.omg.CORBA.ORB;
+import org.omg.CORBA.ObjectHelper;
+import org.omg.CORBA.portable.ApplicationException;
+import org.omg.CORBA.portable.Delegate;
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.ObjectImpl;
+import org.omg.CORBA.portable.OutputStream;
+import org.omg.CORBA.portable.RemarshalException;
+
+import java.io.Serializable;
+
+/**
+ * The Policy stub (proxy), used on the client side.
+ * The {@link Policy} methods contain the code for remote
+ * invocaton.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public class _PolicyStub
+ extends ObjectImpl
+ implements Policy, Serializable
+{
+ /**
+ * Use serialVersionUID (v1.4) for interoperability.
+ */
+ private static final long serialVersionUID = 2453656196708903849L;
+
+ /**
+ * Create the Policy stub. To get the stub working,
+ * you must later set the delegate with
+ * {@link ObjectImpl#_set_delegate(Delegate)}.
+ */
+ public _PolicyStub()
+ {
+ }
+
+ /**
+ * Create the naming context stub with the given delegate.
+ */
+ public _PolicyStub(Delegate delegate)
+ {
+ _set_delegate(delegate);
+ }
+
+ /**
+ * Return the array of repository ids for this object.
+ */
+ public String[] _ids()
+ {
+ return new String[] { PolicyHelper.id() };
+ }
+
+ /** {@inheritDoc} */
+ public void destroy()
+ {
+ InputStream input = null;
+ try
+ {
+ OutputStream output = _request("destroy", true);
+ input = _invoke(output);
+ }
+ catch (ApplicationException ex)
+ {
+ input = ex.getInputStream();
+
+ String id = ex.getId();
+ throw new MARSHAL(id);
+ }
+ catch (RemarshalException remarsh)
+ {
+ destroy();
+ }
+ finally
+ {
+ _releaseReply(input);
+ }
+ }
+
+ /** {@inheritDoc} */
+ public Policy copy()
+ {
+ InputStream input = null;
+ try
+ {
+ OutputStream output = _request("copy", true);
+ input = _invoke(output);
+ return PolicyHelper.read(input);
+ }
+ catch (ApplicationException ex)
+ {
+ input = ex.getInputStream();
+
+ String id = ex.getId();
+ throw new MARSHAL(id);
+ }
+ catch (RemarshalException remarsh)
+ {
+ return copy();
+ }
+ finally
+ {
+ _releaseReply(input);
+ }
+ }
+
+ /** {@inheritDoc} */
+ public int policy_type()
+ {
+ InputStream input = null;
+ try
+ {
+ OutputStream output = _request("policy_type", true);
+ input = _invoke(output);
+
+ int returns = input.read_long();
+
+ return returns;
+ }
+ catch (ApplicationException ex)
+ {
+ input = ex.getInputStream();
+
+ String id = ex.getId();
+ throw new MARSHAL(id);
+ }
+ catch (RemarshalException remarsh)
+ {
+ return policy_type();
+ }
+ finally
+ {
+ _releaseReply(input);
+ }
+ }
+} \ No newline at end of file
diff --git a/libjava/classpath/org/omg/CORBA/package.html b/libjava/classpath/org/omg/CORBA/package.html
new file mode 100644
index 00000000000..8fe9acf5d3d
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/package.html
@@ -0,0 +1,82 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
+<!-- package.html
+ 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</title></head>
+
+<body>
+This package provides the support of <a href="www.omg.org">OMG</a>
+<a href="www.CORBA.org">CORBA</a>; see <a href="#overview">overview</a>
+of the implemented functionality. CORBA is an open, vendor independent
+system that applications use to work together over networks. Thie purpose
+of this package is to provide CORBA APIs to java programming language,
+including the fully functional Object Request Broker ({@link org.omg.CORBA.ORB}).
+
+<a name="overview">
+<h4>Overview of the currently implemented CORBA functionality</h4>
+<p>The CORBA implementation in the Classpath project is now a working prototype.
+ This prototype is interoperable with Sun's implementation v 1.4, transferring
+ object references, primitive types, narrow and wide strings, arrays, structures
+ and trees between these two platforms. The thrown exceptions are also transferred
+ and handled. The support for stringified object references (IORs) is implemented.
+ The redirection commands works, LOCATION_FORWARD_PERM changing the target address
+ until the application is restarted and LOCATION_FORWARD redirecting for the
+ current session only. Both Little and Big Endian encoded messages
+ are accepted. The encoding of the sent messages is the same as used in the
+ stringified IOR reference of that object or Big Endian, if no such data
+ available.
+ </p>
+ <p>
+ The current release supports the Value types that appeared since v 1.3 and are
+ something between CORBA structures (no methods, data local) and CORBA objects
+ (both methods and data remote). Value type has local data, can have
+ local methods and is transferred by value, not by IOR reference.
+ </p>
+ <p>
+ You can use both request-oriented (based on {@link org.omg.CORBA.Request})
+ and stream-oriented (based on {@link org.omg.CORBA.portable.ObjectImpl})
+ invocation models. The current release includes the working examples, demonstrating
+ the client-server communication using both methods. These examples also show,
+ how to use the Classpath naming service. The IDL compiler is not yet written,
+ but as a side effect of the required compatibility, the implementation seems
+ accepting the output of the Sun's 1.3 idlj.</p>
+
+ @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+</body>
+</html>
+
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 00000000000..83a8aa8d1e2
--- /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 00000000000..0113ff3e031
--- /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 00000000000..d869bdc1851
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/portable/BoxedValueHelper.java
@@ -0,0 +1,79 @@
+/* BoxedValueHelper.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;
+
+/**
+ * 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 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 os a stream to write to.
+ * @param value a value to write.
+ */
+ void write_value(OutputStream ostream, Serializable value);
+} \ No newline at end of file
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 00000000000..89701c73a02
--- /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
+{
+} \ No newline at end of file
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 00000000000..fce04887e91
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/portable/Delegate.java
@@ -0,0 +1,433 @@
+/* Delegate.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.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(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.
+ */
+ 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;
+ StringBuffer b = new StringBuffer(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 00000000000..1e67a883510
--- /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 00000000000..7fa46a1f6d2
--- /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 00000000000..2f6a487b836
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/portable/InputStream.java
@@ -0,0 +1,286 @@
+/* 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.
+ */
+ 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 00000000000..d4381204a1e
--- /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 00000000000..c3f30cf948f
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/portable/ObjectImpl.java
@@ -0,0 +1,402 @@
+/* ObjectImpl.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.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 vendor - dependent delegate, responsible for the method implementations.
+ */
+ private 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 type)
+ {
+ return delegate.get_policy(this, 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 maximum the maximal value to return.
+ *
+ * @return the hashcode.
+ */
+ public int _hash(int max)
+ {
+ return delegate.hash(this, max);
+ }
+
+ /**
+ * 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.
+ */
+ 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 repositoryIdentifer 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.
+ *
+ * @param self the object to check.
+ *
+ * @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 input the stream, normally returned by {@link #invoke} or
+ * {@link ApplicationException#getInputStream()}, can be null.
+ *
+ * @throws NO_IMPLEMENT, always (following the 1.4 specification).
+ */
+ public void _releaseReply(InputStream stream)
+ {
+ delegate.releaseReply(this, stream);
+ }
+
+ /**
+ * Create a request to invoke the method of this CORBA object.
+ *
+ * @param operation 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 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(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 self the object.
+ * @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 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.
+ */
+ 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 set_add
+ )
+ {
+ return delegate.set_policy_override(this, policies, set_add);
+ }
+
+ /**
+ * 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)
+ {
+ 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 00000000000..f40be23656f
--- /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 00000000000..7e6dbfee9fb
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/portable/RemarshalException.java
@@ -0,0 +1,59 @@
+/* RemarshalException.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 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 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 00000000000..1715b01b3c4
--- /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 00000000000..b35dedc3529
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/portable/ServantObject.java
@@ -0,0 +1,61 @@
+/* ServantObject.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;
+
+
+/**
+ * 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 operation, 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 00000000000..c59ee2a0259
--- /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 00000000000..ce9b2ca2840
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA/portable/StreamableValue.java
@@ -0,0 +1,57 @@
+/* StreamableValue.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;
+
+/**
+ * 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
+{
+} \ No newline at end of file
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 00000000000..a9b754b2127
--- /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 00000000000..b89d5c544ce
--- /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();
+} \ No newline at end of file
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 00000000000..339bcddb3f5
--- /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);
+} \ No newline at end of file
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 00000000000..8104136e00e
--- /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>
diff --git a/libjava/classpath/org/omg/CORBA_2_3/ORB.java b/libjava/classpath/org/omg/CORBA_2_3/ORB.java
new file mode 100644
index 00000000000..7a9dc6a1a57
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA_2_3/ORB.java
@@ -0,0 +1,130 @@
+/* ORB.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_2_3;
+
+import org.omg.CORBA.BAD_PARAM;
+import org.omg.CORBA.NO_IMPLEMENT;
+import org.omg.CORBA.portable.ValueFactory;
+
+/**
+ * This class should provide the {@link org.omg.CORBA.ORB) ORB extensions,
+ * defined in the OMG CORBA version 2.3 specification. However in the
+ * Sun's API specification is written that this functionality is not
+ * implemented at least at least till 1.4 inclusive.
+ *
+ * @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
+ */
+public abstract class ORB
+ extends org.omg.CORBA.ORB
+{
+ /**
+ * Should return a defintion of the value type as described
+ * in the interface repository.
+ *
+ * @param repository_id a value type repository id.
+ *
+ * @return never
+ * @throws BAD_PARAM never
+ * @throws NO_IMPLEMENT, always.
+ *
+ * @see org.omg.CORBA.portable.ValueBase
+ */
+ public org.omg.CORBA.Object get_value_def(String repository_id)
+ throws BAD_PARAM
+ {
+ throw new NO_IMPLEMENT();
+ }
+
+ /**
+ * This should register the given value factory under the given
+ * repository id.
+ *
+ * @param repository_id a repository id
+ *
+ * @return never
+ * @throws NO_IMPLEMENT, always.
+ */
+ public ValueFactory register_value_factory(String repository_id,
+ ValueFactory factory
+ )
+ {
+ throw new NO_IMPLEMENT();
+ }
+
+ /**
+ * This should unregister the given value factory under the given
+ * repository id.
+ *
+ * @param repository_id a repository id
+ *
+ * @return never
+ * @throws NO_IMPLEMENT, always.
+ */
+ public void unregister_value_factory(String id)
+ {
+ throw new NO_IMPLEMENT();
+ }
+
+ /**
+ * This should find a suitable value factory to create an instance
+ * of the value type when is being read (unmarshaled) from the
+ * stream.
+ *
+ * @param repository_id a repository id
+ *
+ * @return never
+ * @throws NO_IMPLEMENT, always.
+ */
+ public ValueFactory lookup_value_factory(String repository_id)
+ {
+ throw new NO_IMPLEMENT();
+ }
+
+ /**
+ * Up till OMG 3.0.3 inclusive and also in Suns API till 1.4
+ * inclusive this is totally undocumented. No problem, though,
+ * because is in addition not implemented.
+ *
+ * @throws NO_IMPLEMENT, always.
+ */
+ public void set_delegate(java.lang.Object wrapper)
+ {
+ throw new NO_IMPLEMENT();
+ }
+} \ No newline at end of file
diff --git a/libjava/classpath/org/omg/CORBA_2_3/package.html b/libjava/classpath/org/omg/CORBA_2_3/package.html
new file mode 100644
index 00000000000..254e6409a67
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA_2_3/package.html
@@ -0,0 +1,46 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
+<!-- package.html -
+ 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_2_3</title></head>
+
+<body>
+<p>This package supports the ORB extendsions that appeared since CORBA 2_3.</p>
+
+</body>
+</html>
diff --git a/libjava/classpath/org/omg/CORBA_2_3/portable/Delegate.java b/libjava/classpath/org/omg/CORBA_2_3/portable/Delegate.java
new file mode 100644
index 00000000000..d20a88544a6
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA_2_3/portable/Delegate.java
@@ -0,0 +1,67 @@
+/* Delegate.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_2_3.portable;
+
+/**
+ * Extends the previous version of the Delegate by one additional method,
+ * defined in CORBA 2_3 .
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public abstract class Delegate
+ extends org.omg.CORBA.portable.Delegate
+{
+ /**
+ * Returns the codebase for the provided object reference.
+ * A codebase is a location information (for instance, URL), specifying,
+ * where the missing parts of the object code can be downloaded. This
+ * is important for the value type objects that handle they method calls
+ * locally and hence must have the local copy of the implementing code.
+ *
+ * This method must be overridden to get functionality, the default method
+ * always returns an empty string.
+ *
+ * @return normally, an agreed location information, specifying, where
+ * the supporting code (like java classes) can be found.
+ */
+ public String get_codebase(org.omg.CORBA.Object self)
+ {
+ return "";
+ }
+} \ No newline at end of file
diff --git a/libjava/classpath/org/omg/CORBA_2_3/portable/InputStream.java b/libjava/classpath/org/omg/CORBA_2_3/portable/InputStream.java
new file mode 100644
index 00000000000..3ab264f6081
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA_2_3/portable/InputStream.java
@@ -0,0 +1,208 @@
+/* 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_2_3.portable;
+
+import gnu.CORBA.CDR.Vio;
+
+import org.omg.CORBA.portable.BoxedValueHelper;
+
+import java.io.Serializable;
+
+/**
+ * This class defines a new CDR input stream methods, added since
+ * CORBA 2.3.
+ *
+ * This class is abstract; no direct instances can be instantiated.
+ * Also, up till v 1.4 inclusive there are no methods that would
+ * return it, and only one unimplemented interface,
+ * {@link org.omg.CORBA.portable.ValueFactory }, needs it as a parameter.
+ *
+ * However since 1.3 all methods, declared as returning an
+ * org.omg.CORBA.portable.InputStream actually return the instance of this
+ * derived class and the new methods are accessible after the casting
+ * operation.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public abstract class InputStream
+ extends org.omg.CORBA.portable.InputStream
+{
+ /**
+ * Read the abstract interface. An abstract interface can be either
+ * CORBA value type or CORBA object and is returned as an abstract
+ * java.lang.Object.
+ *
+ * As specified in OMG specification, this reads a single
+ * boolean and then delegates either to {@link #read_Object()} (for false)
+ * or to {@link #read_Value()} (for true).
+ *
+ * @return an abstract interface, unmarshaled from the stream.
+ */
+ public Object read_abstract_interface()
+ {
+ boolean isValue = read_boolean();
+
+ if (isValue)
+ return read_value();
+ else
+ return read_Object();
+ }
+
+ /**
+ * Read the abstract interface, corresponding to the passed type.
+ * An abstract interface can be either CORBA value type or CORBA
+ * object and is returned as an abstract java.lang.Object.
+ *
+ * As specified in OMG specification, this reads a single
+ * boolean and then delegates either to {@link #read_Object(Class)} (for false)
+ * or to {@link #read_Value(Class)} (for true).
+ *
+ * @param clz a base class for the abstract interface.
+ *
+ * @return an abstract interface, unmarshaled from the stream
+ */
+ public Object read_abstract_interface(Class clz)
+ {
+ boolean isValue = read_boolean();
+
+ if (isValue)
+ return read_value(clz);
+ else
+ return read_Object(clz);
+ }
+
+ /**
+ * Read a value type structure, extracting the repository id
+ * from the input stream itself. The repository id is optional
+ * in the value type record, but it must be present for this
+ * method to succeed. The {@link OutputStream} of this
+ * implementation always stores the repository id.
+ *
+ * The casts the streams ORB into a CORBA 2.3 ORB and then
+ * searched for a suitable value factory, where it delegates
+ * the functionality.
+ *
+ * If you know the exact class or can create an unitialised instance
+ * of the value type, it is recommended (faster) to use
+ * {@link #read_value(Class)} or {@link #read_value(Serializable)}
+ * instead.
+ *
+ * @param repository_id a repository id of the value type.
+ *
+ * @return an value type structure, unmarshaled from the stream
+ */
+ public Serializable read_value()
+ {
+ return Vio.read(this);
+ }
+
+ /**
+ * Read a value type structure, corresponing to the passed type.
+ * As the type is known, the repository Id in the input stream is
+ * optional an not required. The codebase, if present, is also ignored.
+ *
+ * The passed class must implement either {@link CustomMarshal}
+ * for the user-defined reading operations or {@link StreamableValue}
+ * for the standard (generated by IDL compiler) reading operations.
+ * Also, it must have the parameterless constructor to create a new
+ * instance.
+ *
+ * @param clz a base class for a value type.
+ *
+ * @return an value type structure, unmarshaled from the stream
+ */
+ public Serializable read_value(Class clz)
+ {
+ return Vio.read(this, clz);
+ }
+
+ /**
+ * Read a value type structure content, when the unitialised
+ * instance is passed as a parameter. It is a fastest method to read
+ * a value type.
+ *
+ * As the type is known, the repository Id in the input stream is
+ * optional an not required. The codebase, if present, is also ignored.
+ *
+ * The passed instance must implement either {@link CustomMarshal}
+ * for the user-defined reading operations or {@link StreamableValue}
+ * for the standard (generated by IDL compiler) reading operations.
+ *
+ * @param unitialised_value the unitialised value.
+ *
+ * @return same value, filled in by the stream content.
+ */
+ public Serializable read_value(Serializable unitialised_value)
+ {
+ return Vio.read(this, unitialised_value);
+ }
+
+ /**
+ * Read a value type structure, having the given repository id.
+ * The casts the streams ORB into a CORBA 2.3 ORB and then
+ * searched for a suitable value factory, where it delegates
+ * the functionality.
+ *
+ * If you know the exact class or can create an unitialised instance
+ * of the value type, it is recommended (faster) to use
+ * {@link #read_value(Class)} or {@link #read_value(Serializable)}
+ * instead.
+ *
+ * @param repository_id a repository id of the value type.
+ *
+ * @return an value type structure, unmarshaled from the stream
+ */
+ public Serializable read_value(String repository_id)
+ {
+ return ((org.omg.CORBA_2_3.ORB) orb()).lookup_value_factory(repository_id)
+ .read_value(this);
+ }
+
+ /**
+ * Use the provided boxed value helper to read the value.
+ *
+ * @param helper a helper for reading the value from the stream.
+ *
+ * @return an value type structure, unmarshaled from the stream.
+ */
+ public Serializable read_value(BoxedValueHelper helper)
+ {
+ return helper.read_value(this);
+ }
+} \ No newline at end of file
diff --git a/libjava/classpath/org/omg/CORBA_2_3/portable/ObjectImpl.java b/libjava/classpath/org/omg/CORBA_2_3/portable/ObjectImpl.java
new file mode 100644
index 00000000000..49d92df3b19
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA_2_3/portable/ObjectImpl.java
@@ -0,0 +1,82 @@
+/* ObjectImpl.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_2_3.portable;
+
+import org.omg.CORBA.BAD_OPERATION;
+
+/**
+ * Extends the previous version of the CORBA object by one additional method,
+ * defined in CORBA 2_3 . See ancestor for details about the CORBA object.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public abstract class ObjectImpl
+ extends org.omg.CORBA.portable.ObjectImpl
+{
+ /**
+ * Returns the codebase for the provided object reference.
+ * A codebase is a location information (for instance, URL), specifying,
+ * where the missing parts of the object code can be downloaded. This
+ * is important for the value type objects that handle they method calls
+ * locally and hence must have the local copy of the implementing code.
+ *
+ * This implementation expects that the object delegate is set and is
+ * an instance of the org.omg.CORBA_2_3.portable.Delegate. If casts
+ * the set delegate to the given type and invokes
+ * {@link org.omg.CORBA_2_3.portable.Delegate#get_codebase}.
+ *
+ * @return normally, an agreed location information, specifying, where
+ * the supporting code (like java classes) can be found.
+ *
+ * @throws BAD_OPERATION if the object delegate is not an instance
+ * of org.omg.CORBA_2_3.portable.Delegate.
+ */
+ public String _get_codebase()
+ {
+ Object delegate = _get_delegate();
+ if (delegate instanceof org.omg.CORBA_2_3.portable.Delegate)
+ return ((org.omg.CORBA_2_3.portable.Delegate) delegate).get_codebase(this);
+ else if (delegate != null)
+ throw new BAD_OPERATION(delegate.getClass().getName() +
+ " is not a org.omg.CORBA_2_3.portable.Delegate"
+ );
+ else
+ throw new BAD_OPERATION("The delegate not set.");
+ }
+} \ No newline at end of file
diff --git a/libjava/classpath/org/omg/CORBA_2_3/portable/OutputStream.java b/libjava/classpath/org/omg/CORBA_2_3/portable/OutputStream.java
new file mode 100644
index 00000000000..2f83a939fda
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA_2_3/portable/OutputStream.java
@@ -0,0 +1,156 @@
+/* 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_2_3.portable;
+
+import gnu.CORBA.CDR.Vio;
+
+import org.omg.CORBA.portable.BoxedValueHelper;
+import org.omg.CORBA.portable.ValueBase;
+
+import java.io.Serializable;
+
+/**
+ * This class defines a new CDR input stream methods, added since
+ * CORBA 2.3.
+ *
+ * This class is abstract; no direct instances can be instantiated.
+ * Also, up till v 1.4 inclusive there are no methods that would
+ * return it directly.
+ *
+ * However since 1.3 all methods, declared as returning an
+ * org.omg.CORBA.portable.InputStream actually return the instance of this
+ * derived class and the new methods are accessible after the casting
+ * operation.
+ *
+ * @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
+ */
+public abstract class OutputStream
+ extends org.omg.CORBA.portable.OutputStream
+{
+ /**
+ * Writes an abstract interface to the stream. An abstract interface can
+ * be eithe CORBA object or value type and is written as a union with
+ * the boolean discriminator (false for objects, true for value types).
+ *
+ * The object from value is separated by fact that all values implement
+ * the {@link ValueBase} interface. Also, the passed parameter is treated
+ * as value it it does not implement CORBA Object.
+ *
+ * @param an_interface an abstract interface to write.
+ */
+ public void write_abstract_interface(java.lang.Object an_interface)
+ {
+ boolean isValue =
+ an_interface instanceof ValueBase ||
+ (!(an_interface instanceof org.omg.CORBA.Object));
+
+ write_boolean(isValue);
+
+ if (isValue)
+ write_value((ValueBase) an_interface);
+ else
+ write_Object((org.omg.CORBA.Object) an_interface);
+ }
+
+ /**
+ * Writes a value type into the output stream.
+ *
+ * The value type must implement either {@link CustomValue}
+ * (for user-defined writing method) or {@link StramableValue}
+ * (for standard writing using code, generated by IDL compiler).
+ *
+ * The written record will have a repository id, matching the
+ * class of the passed object. The codebase will not be written.
+ *
+ * @param value a value type object to write.
+ */
+ public void write_value(Serializable value)
+ {
+ Vio.write(this, value);
+ }
+
+ /**
+ * Write value to the stream using the boxed value helper.
+ *
+ * The value type must implement either {@link CustomValue}
+ * (for user-defined writing method) or {@link StramableValue}
+ * (for standard writing using code, generated by IDL compiler).
+ *
+ * @param value a value to write.
+ * @param helper a helper, responsible for the writing operation.
+ */
+ public void write_value(Serializable value, BoxedValueHelper helper)
+ {
+ helper.write_value(this, value);
+ }
+
+ /**
+ * Writes a value type into the output stream, stating it is an
+ * instance of the given class. The written record
+ * will have a repository id, matching the passed class.
+ * The codebase will not be written.
+ *
+ * The value type must implement either {@link CustomValue}
+ * (for user-defined writing method) or {@link StramableValue}
+ * (for standard writing using code, generated by IDL compiler).
+ *
+ * @param value a value type object to write.
+ */
+ public void write_value(Serializable value, Class clz)
+ {
+ Vio.write(this, value, clz);
+ }
+
+ /**
+ * Writes a value type into the output stream,
+ * stating it has the given repository id.
+ *
+ * The value type must implement either {@link CustomValue}
+ * (for user-defined writing method) or {@link StramableValue}
+ * (for standard writing using code, generated by IDL compiler).
+ *
+ * @param repository_id a repository id of the value type.
+ *
+ * @param value a value type object to write.
+ */
+ public void write_value(Serializable value, String repository_id)
+ {
+ Vio.write(this, value, repository_id);
+ }
+} \ No newline at end of file
diff --git a/libjava/classpath/org/omg/CORBA_2_3/portable/package.html b/libjava/classpath/org/omg/CORBA_2_3/portable/package.html
new file mode 100644
index 00000000000..edf9eb73138
--- /dev/null
+++ b/libjava/classpath/org/omg/CORBA_2_3/portable/package.html
@@ -0,0 +1,47 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
+<!-- package.html -
+ 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_2_3.portable</title></head>
+
+<body>
+<p>This package supports the communication extensions that appeared since CORBA 2_3.
+It mainly provides methods for input and output of value types. </p>
+
+</body>
+</html>
diff --git a/libjava/classpath/org/omg/CosNaming/Binding.java b/libjava/classpath/org/omg/CosNaming/Binding.java
new file mode 100644
index 00000000000..8f6e9973b2d
--- /dev/null
+++ b/libjava/classpath/org/omg/CosNaming/Binding.java
@@ -0,0 +1,81 @@
+/* Binding.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.CosNaming;
+
+import org.omg.CORBA.portable.IDLEntity;
+
+/**
+ * Defines the binding with the given name and type.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public final class Binding
+ implements IDLEntity
+{
+ /**
+ * The binding type holds value ncontext for bindings,
+ * created with operations bind_context, rebind_context or
+ * bind_new_context. It holds value nobject of all other
+ * possible bindings.
+ */
+ public BindingType binding_type;
+
+ /**
+ * The binding name, consisting of the number of the name components.
+ */
+ public NameComponent[] binding_name;
+
+ /**
+ * Create an empty binding.
+ */
+ public Binding()
+ {
+ }
+
+ /**
+ * Create the binding, initialised to the given values.
+ * @param a_name the binding name.
+ * @param a_type the binding type.
+ */
+ public Binding(NameComponent[] a_name, BindingType a_type)
+ {
+ binding_name = a_name;
+ binding_type = a_type;
+ }
+}
diff --git a/libjava/classpath/org/omg/CosNaming/BindingHelper.java b/libjava/classpath/org/omg/CosNaming/BindingHelper.java
new file mode 100644
index 00000000000..1665464ec7e
--- /dev/null
+++ b/libjava/classpath/org/omg/CosNaming/BindingHelper.java
@@ -0,0 +1,138 @@
+/* BindingHelper.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.CosNaming;
+
+import org.omg.CORBA.Any;
+import org.omg.CORBA.BAD_OPERATION;
+import org.omg.CORBA.ORB;
+import org.omg.CORBA.StructMember;
+import org.omg.CORBA.TypeCode;
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+
+/**
+ * The helper operations for {@link Binding}.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public abstract class BindingHelper
+{
+ /**
+ * The {@link Binding} repository id.
+ */
+ private static String _id = "IDL:omg.org/CosNaming/Binding:1.0";
+
+ /**
+ * The cached type code value.
+ */
+ private static TypeCode typeCode;
+
+ /**
+ * Extract the binding from the given {@link Any}.
+ */
+ public static Binding extract(Any a)
+ {
+ try
+ {
+ return ((BindingHolder) a.extract_Streamable()).value;
+ }
+ catch (ClassCastException ex)
+ {
+ throw new BAD_OPERATION("Binding expected");
+ }
+ }
+
+ /**
+ * Return the binding repository id.
+ */
+ public static String id()
+ {
+ return _id;
+ }
+
+ /**
+ * Insert the binding into the given {@link Any}.
+ */
+ public static void insert(Any a, Binding that)
+ {
+ a.insert_Streamable(new BindingHolder(that));
+ }
+
+ /**
+ * Read the binding from the given CDR stream.
+ */
+ public static Binding read(InputStream istream)
+ {
+ Binding value = new Binding();
+ value.binding_name = NameHelper.read(istream);
+ value.binding_type = BindingTypeHelper.read(istream);
+ return value;
+ }
+
+ /**
+ * Create the type code for this exception.
+ */
+ public static TypeCode type()
+ {
+ if (typeCode == null)
+ {
+ ORB orb = ORB.init();
+
+ StructMember[] members = new StructMember[ 2 ];
+ TypeCode member;
+ member = NameComponentHelper.type();
+ member = orb.create_sequence_tc(0, member);
+ member = orb.create_alias_tc(NameHelper.id(), "Name", member);
+ members [ 0 ] = new StructMember("binding_name", member, null);
+ member = BindingTypeHelper.type();
+ members [ 1 ] = new StructMember("binding_type", member, null);
+ typeCode = orb.create_struct_tc(id(), "Binding", members);
+ }
+ return typeCode;
+ }
+
+ /**
+ * Write the exception to the CDR output stream.
+ */
+ public static void write(OutputStream ostream, Binding value)
+ {
+ NameHelper.write(ostream, value.binding_name);
+ BindingTypeHelper.write(ostream, value.binding_type);
+ }
+}
diff --git a/libjava/classpath/org/omg/CosNaming/BindingHolder.java b/libjava/classpath/org/omg/CosNaming/BindingHolder.java
new file mode 100644
index 00000000000..d57d9030f71
--- /dev/null
+++ b/libjava/classpath/org/omg/CosNaming/BindingHolder.java
@@ -0,0 +1,94 @@
+/* BindingHolder.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.CosNaming;
+
+import org.omg.CORBA.portable.Streamable;
+
+/**
+ * A holder for the binding type.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public final class BindingHolder
+ implements Streamable
+{
+ /**
+ * The stored binding type.
+ */
+ public Binding value;
+
+ /**
+ * Create an empty instance.
+ */
+ public BindingHolder()
+ {
+ }
+
+ /**
+ * Create the intialised holder.
+ */
+ public BindingHolder(Binding initialValue)
+ {
+ value = initialValue;
+ }
+
+ /**
+ * Read the holder value from the CDR stream.
+ */
+ public void _read(org.omg.CORBA.portable.InputStream i)
+ {
+ value = BindingHelper.read(i);
+ }
+
+ /**
+ * Return the binding type code.
+ */
+ public org.omg.CORBA.TypeCode _type()
+ {
+ return BindingHelper.type();
+ }
+
+ /**
+ * Write the holder value to the CDR stream.
+ */
+ public void _write(org.omg.CORBA.portable.OutputStream o)
+ {
+ BindingHelper.write(o, value);
+ }
+}
diff --git a/libjava/classpath/org/omg/CosNaming/BindingIterator.java b/libjava/classpath/org/omg/CosNaming/BindingIterator.java
new file mode 100644
index 00000000000..6627a8f8279
--- /dev/null
+++ b/libjava/classpath/org/omg/CosNaming/BindingIterator.java
@@ -0,0 +1,87 @@
+/* BindingIterator.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.CosNaming;
+
+import org.omg.CORBA.portable.IDLEntity;
+
+import java.io.Serializable;
+
+/**
+ * The iterator for seing the available bindings.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public interface BindingIterator
+ extends BindingIteratorOperations, org.omg.CORBA.Object, Serializable,
+ IDLEntity
+{
+ /**
+ * Destroy the iterator on the server side. This must always be
+ * called, as otherwise the iterator will remain on the server even
+ * after the client application terminates.
+ *
+ * @specnote since 1.3 this method has moved into BindingIteratorOperations.
+ */
+ void destroy();
+
+ /**
+ * Return the desired amount of bindings.
+ *
+ * @param amount the maximal number of bindings to return.
+ * @param a_list a holder to store the returned bindings.
+ *
+ * @return false if there are no more bindings available,
+ * true otherwise.
+ *
+ * @specnote since 1.3 this method has moved into BindingIteratorOperations.
+ */
+ boolean next_n(int amount, BindingListHolder a_list);
+
+ /**
+ * Return the next binding.
+ *
+ * @param a_binding a holder, where the next binding will be stored.
+ *
+ * @return false if there are no more bindings available, true
+ * otherwise.
+ *
+ * @specnote since 1.3 this method has moved into BindingIteratorOperations.
+ */
+ boolean next_one(BindingHolder a_binding);
+} \ No newline at end of file
diff --git a/libjava/classpath/org/omg/CosNaming/BindingIteratorHelper.java b/libjava/classpath/org/omg/CosNaming/BindingIteratorHelper.java
new file mode 100644
index 00000000000..204d9f05872
--- /dev/null
+++ b/libjava/classpath/org/omg/CosNaming/BindingIteratorHelper.java
@@ -0,0 +1,150 @@
+/* BindingIteratorHelper.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.CosNaming;
+
+import org.omg.CORBA.Any;
+import org.omg.CORBA.BAD_OPERATION;
+import org.omg.CORBA.BAD_PARAM;
+import org.omg.CORBA.ORB;
+import org.omg.CORBA.TypeCode;
+import org.omg.CORBA.portable.Delegate;
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.ObjectImpl;
+import org.omg.CORBA.portable.OutputStream;
+
+/**
+ * The helper operations for {@link BindingIterator}
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public abstract class BindingIteratorHelper
+{
+ /**
+ * The {@link BindingIterator} repository id.
+ */
+ private static String _id = "IDL:omg.org/CosNaming/BindingIterator:1.0";
+
+ /**
+ * The cached type code value.
+ */
+ private static TypeCode typeCode = null;
+
+ /**
+ * Extract the binding iterator from the given {@link Any}.
+ */
+ public static BindingIterator extract(Any a)
+ {
+ try
+ {
+ return ((BindingIteratorHolder) a.extract_Streamable()).value;
+ }
+ catch (ClassCastException ex)
+ {
+ BAD_OPERATION bad = new BAD_OPERATION("Binding iterator expected");
+ bad.initCause(ex);
+ throw bad;
+ }
+ }
+
+ /**
+ * Return the binding iterator repository id.
+ */
+ public static String id()
+ {
+ return _id;
+ }
+
+ /**
+ * Insert the binding iterator into the given {@link Any}.
+ */
+ public static void insert(Any a, BindingIterator that)
+ {
+ a.insert_Streamable(new BindingIteratorHolder(that));
+ }
+
+ /**
+ * Narrow the given object to the BindingIterator. The narrowing
+ * means either direct casting or re-instantiating with the same
+ * delegate.
+ *
+ * @param obj the object to cast.
+ *
+ * @return the casted binding iterator.
+ */
+ public static BindingIterator narrow(org.omg.CORBA.Object obj)
+ {
+ if (obj == null)
+ return null;
+ else if (obj instanceof BindingIterator)
+ return (BindingIterator) obj;
+ else if (!obj._is_a(id()))
+ throw new BAD_PARAM();
+ else
+ {
+ Delegate delegate = ((ObjectImpl) obj)._get_delegate();
+ return new _BindingIteratorStub(delegate);
+ }
+ }
+
+ /**
+ * Read the exception from the given CDR stream.
+ */
+ public static BindingIterator read(InputStream istream)
+ {
+ return narrow(istream.read_Object(_BindingIteratorStub.class));
+ }
+
+ /**
+ * Create the type code for the BindingIterator.
+ */
+ public static TypeCode type()
+ {
+ if (typeCode == null)
+ typeCode = ORB.init().create_interface_tc(id(), "BindingIterator");
+ return typeCode;
+ }
+
+ /**
+ * Write the exception to the CDR output stream.
+ */
+ public static void write(OutputStream ostream, BindingIterator value)
+ {
+ ostream.write_Object((org.omg.CORBA.Object) value);
+ }
+}
diff --git a/libjava/classpath/org/omg/CosNaming/BindingIteratorHolder.java b/libjava/classpath/org/omg/CosNaming/BindingIteratorHolder.java
new file mode 100644
index 00000000000..195e97e3fb3
--- /dev/null
+++ b/libjava/classpath/org/omg/CosNaming/BindingIteratorHolder.java
@@ -0,0 +1,97 @@
+/* BindingIteratorHolder.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.CosNaming;
+
+import org.omg.CORBA.TypeCode;
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+import org.omg.CORBA.portable.Streamable;
+
+/**
+ * The holder to store the binding iterator.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public final class BindingIteratorHolder
+ implements Streamable
+{
+ /**
+ * The stored binding iterator.
+ */
+ public BindingIterator value;
+
+ /**
+ * Create an empty instance of this holder.
+ */
+ public BindingIteratorHolder()
+ {
+ }
+
+ /**
+ * Create the intialised instance.
+ */
+ public BindingIteratorHolder(BindingIterator initialValue)
+ {
+ value = initialValue;
+ }
+
+ /**
+ * Read the holder value from the CDR stream.
+ */
+ public void _read(InputStream in)
+ {
+ value = BindingIteratorHelper.read(in);
+ }
+
+ /**
+ * Returen the type code of the binding iterator.
+ */
+ public TypeCode _type()
+ {
+ return BindingIteratorHelper.type();
+ }
+
+ /**
+ * Write the intialised value to the CDR stream.
+ */
+ public void _write(OutputStream out)
+ {
+ BindingIteratorHelper.write(out, value);
+ }
+}
diff --git a/libjava/classpath/org/omg/CosNaming/BindingIteratorOperations.java b/libjava/classpath/org/omg/CosNaming/BindingIteratorOperations.java
new file mode 100644
index 00000000000..c775b11ec0c
--- /dev/null
+++ b/libjava/classpath/org/omg/CosNaming/BindingIteratorOperations.java
@@ -0,0 +1,78 @@
+/* BindingIterator.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.CosNaming;
+
+/**
+ * The operations, applicable for an iterator for seing the available
+ * bindings.
+ *
+ * @since 1.3
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public interface BindingIteratorOperations
+{
+ /**
+ * Destroy the iterator on the server side. This must always be
+ * called, as otherwise the iterator will remain on the server even
+ * after the client application terminates.
+ */
+ void destroy();
+
+ /**
+ * Return the desired amount of bindings.
+ *
+ * @param amount the maximal number of bindings to return.
+ * @param a_list a holder to store the returned bindings.
+ *
+ * @return false if there are no more bindings available,
+ * true otherwise.
+ */
+ boolean next_n(int amount, BindingListHolder a_list);
+
+ /**
+ * Return the next binding.
+ *
+ * @param a_binding a holder, where the next binding will be stored.
+ *
+ * @return false if there are no more bindings available, true
+ * otherwise.
+ */
+ boolean next_one(BindingHolder a_binding);
+} \ No newline at end of file
diff --git a/libjava/classpath/org/omg/CosNaming/BindingListHelper.java b/libjava/classpath/org/omg/CosNaming/BindingListHelper.java
new file mode 100644
index 00000000000..44fe39dcad2
--- /dev/null
+++ b/libjava/classpath/org/omg/CosNaming/BindingListHelper.java
@@ -0,0 +1,134 @@
+/* BindingListHelper.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.CosNaming;
+
+import org.omg.CORBA.Any;
+import org.omg.CORBA.BAD_OPERATION;
+import org.omg.CORBA.ORB;
+import org.omg.CORBA.TypeCode;
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+
+/**
+ * The helper operations for the binding list.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public abstract class BindingListHelper
+{
+ /**
+ * The binding list repository id.
+ */
+ private static String _id = "IDL:omg.org/CosNaming/BindingList:1.0";
+
+ /**
+ * The cached binding list type code.
+ */
+ private static TypeCode typeCode;
+
+ /**
+ * Extract the array of bindings from the given {@link Any}.
+ */
+ public static Binding[] extract(Any a)
+ {
+ try
+ {
+ return ((BindingListHolder) a.extract_Streamable()).value;
+ }
+ catch (ClassCastException ex)
+ {
+ BAD_OPERATION bad = new BAD_OPERATION("Binding list expected");
+ bad.initCause(ex);
+ throw bad;
+ }
+ }
+
+ /**
+ * Get the binding list repository id.
+ */
+ public static String id()
+ {
+ return _id;
+ }
+
+ /**
+ * Insert the array of bindings into the given {@link Any}.
+ */
+ public static void insert(Any a, Binding[] bindings)
+ {
+ a.insert_Streamable(new BindingListHolder(bindings));
+ }
+
+ /**
+ * Read the array of bindings from the given CDR input stream.
+ */
+ public static Binding[] read(InputStream istream)
+ {
+ Binding[] value = new Binding[ istream.read_long() ];
+
+ for (int i = 0; i < value.length; i++)
+ value [ i ] = BindingHelper.read(istream);
+ return value;
+ }
+
+ /**
+ * Return the binding array type code.
+ */
+ public static TypeCode type()
+ {
+ if (typeCode == null)
+ {
+ ORB orb = ORB.init();
+ typeCode = BindingHelper.type();
+ typeCode = orb.create_sequence_tc(0, typeCode);
+ typeCode = orb.create_alias_tc(id(), "BindingList", typeCode);
+ }
+ return typeCode;
+ }
+
+ /**
+ * Write the array of bindings into the given CDR output stream.
+ */
+ public static void write(OutputStream ostream, Binding[] value)
+ {
+ ostream.write_long(value.length);
+ for (int i = 0; i < value.length; i++)
+ org.omg.CosNaming.BindingHelper.write(ostream, value [ i ]);
+ }
+}
diff --git a/libjava/classpath/org/omg/CosNaming/BindingListHolder.java b/libjava/classpath/org/omg/CosNaming/BindingListHolder.java
new file mode 100644
index 00000000000..eb0e8b33380
--- /dev/null
+++ b/libjava/classpath/org/omg/CosNaming/BindingListHolder.java
@@ -0,0 +1,97 @@
+/* BindingListHolder.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.CosNaming;
+
+import org.omg.CORBA.TypeCode;
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+import org.omg.CORBA.portable.Streamable;
+
+/**
+ * A class to hold the binding list.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public final class BindingListHolder
+ implements Streamable
+{
+ /**
+ * The wrapped binding list.
+ */
+ public Binding[] value = null;
+
+ /**
+ * Create the unitialised holder.
+ */
+ public BindingListHolder()
+ {
+ }
+
+ /**
+ * Create the holder, intialised to the given value.
+ */
+ public BindingListHolder(Binding[] initialValue)
+ {
+ value = initialValue;
+ }
+
+ /**
+ * Read the binding list from the given CDR stream.
+ */
+ public void _read(InputStream in)
+ {
+ value = BindingListHelper.read(in);
+ }
+
+ /**
+ * Get the type code of the binding.
+ */
+ public TypeCode _type()
+ {
+ return BindingListHelper.type();
+ }
+
+ /**
+ * Write the binding list into the given CDR stream.
+ */
+ public void _write(OutputStream out)
+ {
+ BindingListHelper.write(out, value);
+ }
+}
diff --git a/libjava/classpath/org/omg/CosNaming/BindingType.java b/libjava/classpath/org/omg/CosNaming/BindingType.java
new file mode 100644
index 00000000000..d78990349c0
--- /dev/null
+++ b/libjava/classpath/org/omg/CosNaming/BindingType.java
@@ -0,0 +1,129 @@
+/* BindingType.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.CosNaming;
+
+import org.omg.CORBA.BAD_PARAM;
+
+/**
+ * Specifies the binding type (how the binding has been created).
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public class BindingType
+ implements org.omg.CORBA.portable.IDLEntity
+{
+ /**
+ * Use serialVersionUID (v1.4) for interoperability.
+ */
+ private static final long serialVersionUID = 3735105633408228513L;
+
+ /**
+ * This constant means that the binding has been created
+ * with operations bind_context, rebind_context or
+ * bind_new_context.
+ */
+ public static final int _ncontext = 1;
+
+ /**
+ * This constant means that the binding has been created by the
+ * means, different from the listed in {@link _ncontext} description.
+ */
+ public static final int _nobject = 0;
+
+ /**
+ * This constant means that the binding has been created
+ * with operations bind_context, rebind_context or
+ * bind_new_context.
+ */
+ public static final BindingType ncontext = new BindingType(_ncontext);
+
+ /**
+ * This constant means that the binding has been created by the
+ * means, different from the listed in {@link _ncontext} description.
+ */
+ public static final BindingType nobject = new BindingType(_nobject);
+
+ /**
+ * The binding type, defined by this instance.
+ */
+ private final int type;
+
+ /**
+ * Create the new binding type definition.
+ *
+ * @param value the binding type, normally either _nobject or
+ * _ncontext.
+ */
+ protected BindingType(int value)
+ {
+ type = value;
+ }
+
+ /**
+ * Get the binding type instance, matching its integer code.
+ *
+ * @param value the binding type code.
+ * @return the matching binding type instance.
+ *
+ * @throws BAD_KIND if there is no matching binding type for
+ * the passed value.
+ */
+ public static BindingType from_int(int value)
+ {
+ switch (value)
+ {
+ case _nobject :
+ return nobject;
+
+ case _ncontext :
+ return ncontext;
+
+ default :
+ throw new BAD_PARAM("Unsupported binding type code " + value);
+ }
+ }
+
+ /**
+ * Return the integer code for this binding.
+ */
+ public int value()
+ {
+ return type;
+ }
+} \ No newline at end of file
diff --git a/libjava/classpath/org/omg/CosNaming/BindingTypeHelper.java b/libjava/classpath/org/omg/CosNaming/BindingTypeHelper.java
new file mode 100644
index 00000000000..ede00008ea7
--- /dev/null
+++ b/libjava/classpath/org/omg/CosNaming/BindingTypeHelper.java
@@ -0,0 +1,124 @@
+/* BindingTypeHelper.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.CosNaming;
+
+import org.omg.CORBA.Any;
+import org.omg.CORBA.BAD_OPERATION;
+import org.omg.CORBA.ORB;
+import org.omg.CORBA.TypeCode;
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+
+/**
+ * A helper operations of the {@link BindingType}
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public abstract class BindingTypeHelper
+{
+ /**
+ * The binding type repository id.
+ */
+ private static String id = "IDL:omg.org/CosNaming/BindingType:1.0";
+ private static TypeCode typeCode = null;
+
+ /**
+ * Extract the binding type from the given {@link Any}.
+ */
+ public static BindingType extract(Any any)
+ {
+ try
+ {
+ return ((BindingTypeHolder) any.extract_Streamable()).value;
+ }
+ catch (ClassCastException ex)
+ {
+ BAD_OPERATION bad = new BAD_OPERATION("Binding type expected");
+ bad.initCause(ex);
+ throw bad;
+ }
+ }
+
+ /**
+ * Return the binding type repository id.
+ */
+ public static String id()
+ {
+ return id;
+ }
+
+ /**
+ * Insert the binding type into the given {@link Any}.
+ */
+ public static void insert(Any any, BindingType that)
+ {
+ any.insert_Streamable(new BindingTypeHolder(that));
+ }
+
+ /**
+ * Read the binding type from the CDR input stream.
+ */
+ public static BindingType read(InputStream istream)
+ {
+ return BindingType.from_int(istream.read_long());
+ }
+
+ /**
+ * Get the type code of this enumeration.
+ */
+ public static synchronized TypeCode type()
+ {
+ if (typeCode == null)
+ {
+ typeCode =
+ ORB.init().create_enum_tc(id(), "BindingType",
+ new String[] { "nobject", "ncontext" }
+ );
+ }
+ return typeCode;
+ }
+
+ /**
+ * Write the binding type to the CDR output stream.
+ */
+ public static void write(OutputStream ostream, BindingType value)
+ {
+ ostream.write_long(value.value());
+ }
+}
diff --git a/libjava/classpath/org/omg/CosNaming/BindingTypeHolder.java b/libjava/classpath/org/omg/CosNaming/BindingTypeHolder.java
new file mode 100644
index 00000000000..72fde5a48e3
--- /dev/null
+++ b/libjava/classpath/org/omg/CosNaming/BindingTypeHolder.java
@@ -0,0 +1,93 @@
+/* BindingTypeHolder.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.CosNaming;
+
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+import org.omg.CORBA.portable.Streamable;
+
+/**
+ * Holds the binding type.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public final class BindingTypeHolder
+ implements Streamable
+{
+ /**
+ * The stored binding type value.
+ */
+ public BindingType value;
+
+ /**
+ * Create the unitialised holder.
+ */
+ public BindingTypeHolder()
+ {
+ }
+
+ /**
+ * Create the holder, intialised to the given value.
+ */
+ public BindingTypeHolder(BindingType initialValue)
+ {
+ value = initialValue;
+ }
+
+ /**
+ * Read the holder value from the CDR input stream.
+ */
+ public void _read(InputStream in)
+ {
+ value = BindingTypeHelper.read(in);
+ }
+
+ public org.omg.CORBA.TypeCode _type()
+ {
+ return BindingTypeHelper.type();
+ }
+
+ /**
+ * Write the stored value to the CDR output stream.
+ */
+ public void _write(OutputStream out)
+ {
+ BindingTypeHelper.write(out, value);
+ }
+}
diff --git a/libjava/classpath/org/omg/CosNaming/IstringHelper.java b/libjava/classpath/org/omg/CosNaming/IstringHelper.java
new file mode 100644
index 00000000000..83bbecee5af
--- /dev/null
+++ b/libjava/classpath/org/omg/CosNaming/IstringHelper.java
@@ -0,0 +1,120 @@
+/* IstringHelper.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.CosNaming;
+
+import gnu.CORBA.Restricted_ORB;
+
+import org.omg.CORBA.Any;
+import org.omg.CORBA.ORB;
+import org.omg.CORBA.TypeCode;
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+
+/**
+ * "Istring" was a "placeholder for a future IDL internationalized
+ * string data type" in the original specification. It is maintained
+ * solely for compatibility reasons. In both java and CORBA,
+ * Istring is now identical to the narrow (not wide) string and needs
+ * no helper. This class is implemented just for compatibility
+ * reasons.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public abstract class IstringHelper
+{
+ /**
+ * Insert the IString into Any (uses {@link Any.insert_string}).
+ *
+ * @param a the Any to insert into.
+ * @param that the string to insert.
+ */
+ public static void insert(Any a, String that)
+ {
+ a.insert_string(that);
+ }
+
+ /**
+ * Extract the IString from Any ((uses {@link Any.extract_string}).
+ *
+ * @param a the Any to extract from.
+ */
+ public static String extract(Any a)
+ {
+ return a.extract_string();
+ }
+
+ /**
+ * Return an alias typecode.
+ */
+ public static TypeCode type()
+ {
+ ORB orb = Restricted_ORB.Singleton;
+ return orb.create_alias_tc(id(), "Istring", orb.create_string_tc(0));
+ }
+
+ /**
+ * Return the IString repository id.
+ * @return "IDL:omg.org/CosNaming/Istring:1.0", always.
+ */
+ public static String id()
+ {
+ return "IDL:omg.org/CosNaming/Istring:1.0";
+ }
+
+ /**
+ * Calls {@link InputStream#read_string()}.
+ *
+ * @param instream the stream to read from.
+ */
+ public static String read(InputStream istream)
+ {
+ return istream.read_string();
+ }
+
+ /**
+ * Calls {@link OutputStream#write_string()}.
+ *
+ * @param ostream the stream to write into.
+ * @param value the string (IString) value to write.
+ */
+ public static void write(OutputStream ostream, String value)
+ {
+ ostream.write_string(value);
+ }
+} \ No newline at end of file
diff --git a/libjava/classpath/org/omg/CosNaming/NameComponent.java b/libjava/classpath/org/omg/CosNaming/NameComponent.java
new file mode 100644
index 00000000000..a2db313e620
--- /dev/null
+++ b/libjava/classpath/org/omg/CosNaming/NameComponent.java
@@ -0,0 +1,118 @@
+/* NameComponent.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.CosNaming;
+
+import org.omg.CORBA.portable.IDLEntity;
+
+/**
+ * The name component, a node in the multi-comonent name.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public final class NameComponent
+ implements IDLEntity
+{
+ /**
+ * Use serialVersionUID (v1.4) for interoperability.
+ */
+ private static final long serialVersionUID = -1052538183391762390L;
+
+ /**
+ * The name component identifier.
+ */
+ public String id;
+
+ /**
+ * The name component kind (this conception is similar to
+ * the file type conception.
+ */
+ public String kind;
+
+ /**
+ * Create the empty name component.
+ */
+ public NameComponent()
+ {
+ }
+
+ /**
+ * Create the initialised name component.
+ */
+ public NameComponent(String _id, String _kind)
+ {
+ id = _id;
+ kind = _kind;
+ }
+
+ /**
+ * Returns true if both name and kind are equal.
+ */
+ public boolean equals(Object other)
+ {
+ if (other instanceof NameComponent)
+ {
+ NameComponent n = (NameComponent) other;
+
+ boolean ieq;
+ boolean keq;
+
+ if (id == null || n.id == null)
+ ieq = id == n.id;
+ else
+ ieq = id.equals(n.id);
+
+ if (kind == null || n.kind == null)
+ keq = kind == n.kind;
+ else
+ keq = kind.equals(n.kind);
+
+ return keq && ieq;
+ }
+ else
+ return false;
+ }
+
+ /**
+ * Get a string representation (id.kind).
+ */
+ public String toString()
+ {
+ return id + "." + kind;
+ }
+} \ No newline at end of file
diff --git a/libjava/classpath/org/omg/CosNaming/NameComponentHelper.java b/libjava/classpath/org/omg/CosNaming/NameComponentHelper.java
new file mode 100644
index 00000000000..9f0e1287efd
--- /dev/null
+++ b/libjava/classpath/org/omg/CosNaming/NameComponentHelper.java
@@ -0,0 +1,142 @@
+/* NameComponentHelper.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.CosNaming;
+
+import org.omg.CORBA.Any;
+import org.omg.CORBA.BAD_OPERATION;
+import org.omg.CORBA.ORB;
+import org.omg.CORBA.StructMember;
+import org.omg.CORBA.TypeCode;
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+
+/**
+ * A helper classes for the name component.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public abstract class NameComponentHelper
+{
+ /**
+ * A {@link NameComponent} repository id.
+ */
+ private static String _id = "IDL:omg.org/CosNaming/NameComponent:1.0";
+
+ /**
+ * The cached type code.
+ */
+ private static TypeCode typeCode = null;
+
+ /**
+ * Extract the name component from this {@link Any}
+ */
+ public static NameComponent extract(Any a)
+ {
+ try
+ {
+ return ((NameComponentHolder) a.extract_Streamable()).value;
+ }
+ catch (ClassCastException ex)
+ {
+ BAD_OPERATION bad = new BAD_OPERATION("Name component expected");
+ bad.initCause(ex);
+ throw bad;
+ }
+ }
+
+ /**
+ * Get the repository Id of the {@link NameComponent}.
+ * @return
+ */
+ public static String id()
+ {
+ return _id;
+ }
+
+ /**
+ * Insert the name compnent into the given {@link Any}.
+ */
+ public static void insert(Any a, NameComponent that)
+ {
+ a.insert_Streamable(new NameComponentHolder(that));
+ }
+
+ /**
+ * Read the name component from the given CDR input stream.
+ */
+ public static NameComponent read(InputStream istream)
+ {
+ NameComponent value = new NameComponent();
+ value.id = istream.read_string();
+ value.kind = istream.read_string();
+ return value;
+ }
+
+ /**
+ * Get the type code of the named component.
+ */
+ public static TypeCode type()
+ {
+ if (typeCode == null)
+ {
+ ORB orb = ORB.init();
+
+ StructMember[] members = new StructMember[ 2 ];
+ TypeCode member;
+ member = orb.create_string_tc(0);
+ members [ 0 ] = new StructMember("id", member, null);
+ member = orb.create_string_tc(0);
+ members [ 1 ] = new StructMember("kind", member, null);
+ typeCode =
+ orb.create_struct_tc(NameComponentHelper.id(), "NameComponent",
+ members
+ );
+ }
+ return typeCode;
+ }
+
+ /**
+ * Write the named component into the CDR output stream.
+ */
+ public static void write(OutputStream ostream, NameComponent value)
+ {
+ ostream.write_string(value.id);
+ ostream.write_string(value.kind);
+ }
+}
diff --git a/libjava/classpath/org/omg/CosNaming/NameComponentHolder.java b/libjava/classpath/org/omg/CosNaming/NameComponentHolder.java
new file mode 100644
index 00000000000..817a43e4cda
--- /dev/null
+++ b/libjava/classpath/org/omg/CosNaming/NameComponentHolder.java
@@ -0,0 +1,97 @@
+/* NameComponentHolder.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.CosNaming;
+
+import org.omg.CORBA.TypeCode;
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+import org.omg.CORBA.portable.Streamable;
+
+/**
+ * The name component holder.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public final class NameComponentHolder
+ implements Streamable
+{
+ /**
+ * The stored value.
+ */
+ public NameComponent value;
+
+ /**
+ * Create the unitialised holder.
+ */
+ public NameComponentHolder()
+ {
+ }
+
+ /**
+ * Create the initialised holder.
+ */
+ public NameComponentHolder(NameComponent initialValue)
+ {
+ value = initialValue;
+ }
+
+ /**
+ * Fill in the value field by reading it from the CDR input stream.
+ */
+ public void _read(InputStream in)
+ {
+ value = NameComponentHelper.read(in);
+ }
+
+ /**
+ * Get the type code of the {@link NameComponent}.
+ */
+ public TypeCode _type()
+ {
+ return NameComponentHelper.type();
+ }
+
+ /**
+ * Write the stored value into the given CDR output stream.
+ */
+ public void _write(OutputStream out)
+ {
+ NameComponentHelper.write(out, value);
+ }
+}
diff --git a/libjava/classpath/org/omg/CosNaming/NameHelper.java b/libjava/classpath/org/omg/CosNaming/NameHelper.java
new file mode 100644
index 00000000000..047ad918f93
--- /dev/null
+++ b/libjava/classpath/org/omg/CosNaming/NameHelper.java
@@ -0,0 +1,137 @@
+/* NameHelper.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.CosNaming;
+
+import org.omg.CORBA.Any;
+import org.omg.CORBA.BAD_OPERATION;
+import org.omg.CORBA.ORB;
+import org.omg.CORBA.TypeCode;
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+
+/**
+ * The helper operations for the name that is defined as an array
+ * of the name components. There is no java class, directly matching
+ * the 'Name' IDL type.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public abstract class NameHelper
+{
+ /**
+ * The repository id of the Name.
+ */
+ private static String _id = "IDL:omg.org/CosNaming/Name:1.0";
+
+ /**
+ * The cached typecode of the Name.
+ */
+ private static TypeCode typeCode;
+
+ /**
+ * Extract the Name the given {@link Any}.
+ */
+ public static NameComponent[] extract(Any a)
+ {
+ try
+ {
+ return ((NameHolder) a.extract_Streamable()).value;
+ }
+ catch (ClassCastException ex)
+ {
+ BAD_OPERATION bad = new BAD_OPERATION("Name expected");
+ bad.initCause(ex);
+ throw bad;
+ }
+ }
+
+ /**
+ * Get the Name repository Id.
+ */
+ public static String id()
+ {
+ return _id;
+ }
+
+ /**
+ * Extract the Name from the given {@link Any}.
+ */
+ public static void insert(Any a, NameComponent[] that)
+ {
+ a.insert_Streamable(new NameHolder(that));
+ }
+
+ /**
+ * Read the Name from the given CDR input stream.
+ */
+ public static NameComponent[] read(InputStream istream)
+ {
+ NameComponent[] value = null;
+ int l = istream.read_long();
+ value = new NameComponent[ l ];
+ for (int i = 0; i < value.length; ++i)
+ value [ i ] = NameComponentHelper.read(istream);
+ return value;
+ }
+
+ /**
+ * Get the type code of the Name.
+ */
+ public static TypeCode type()
+ {
+ if (typeCode == null)
+ {
+ typeCode = NameComponentHelper.type();
+ typeCode = ORB.init().create_sequence_tc(0, typeCode);
+ typeCode =
+ ORB.init().create_alias_tc(NameHelper.id(), "Name", typeCode);
+ }
+ return typeCode;
+ }
+
+ /**
+ * Write the Name into the CDR output stream.
+ */
+ public static void write(OutputStream ostream, NameComponent[] value)
+ {
+ ostream.write_long(value.length);
+ for (int i = 0; i < value.length; ++i)
+ NameComponentHelper.write(ostream, value [ i ]);
+ }
+}
diff --git a/libjava/classpath/org/omg/CosNaming/NameHolder.java b/libjava/classpath/org/omg/CosNaming/NameHolder.java
new file mode 100644
index 00000000000..a4d33e99137
--- /dev/null
+++ b/libjava/classpath/org/omg/CosNaming/NameHolder.java
@@ -0,0 +1,99 @@
+/* NameHolder.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.CosNaming;
+
+import org.omg.CORBA.TypeCode;
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+import org.omg.CORBA.portable.Streamable;
+
+/**
+ * The holder for the name that is defined as an array
+ * of the name components. There is no java class, directly matching
+ * the 'Name' IDL type.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public final class NameHolder
+ implements Streamable
+{
+ /**
+ * The stored Name (array of the name components).
+ */
+ public NameComponent[] value;
+
+ /**
+ * Create the empty holder.
+ */
+ public NameHolder()
+ {
+ }
+
+ /**
+ * Create the intialised holder.
+ */
+ public NameHolder(NameComponent[] initialValue)
+ {
+ value = initialValue;
+ }
+
+ /**
+ * Fill in the holder value by reading it from the CDR input stream.
+ */
+ public void _read(InputStream in)
+ {
+ value = NameHelper.read(in);
+ }
+
+ /**
+ * Get the Name type code.
+ */
+ public TypeCode _type()
+ {
+ return NameHelper.type();
+ }
+
+ /**
+ * Write the stored value into CDR output stream.
+ */
+ public void _write(OutputStream out)
+ {
+ NameHelper.write(out, value);
+ }
+}
diff --git a/libjava/classpath/org/omg/CosNaming/NamingContext.java b/libjava/classpath/org/omg/CosNaming/NamingContext.java
new file mode 100644
index 00000000000..dc4b002000c
--- /dev/null
+++ b/libjava/classpath/org/omg/CosNaming/NamingContext.java
@@ -0,0 +1,197 @@
+/* NamingContext.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.CosNaming;
+
+import org.omg.CORBA.portable.IDLEntity;
+import org.omg.CosNaming.NamingContextPackage.AlreadyBound;
+import org.omg.CosNaming.NamingContextPackage.CannotProceed;
+import org.omg.CosNaming.NamingContextPackage.InvalidName;
+import org.omg.CosNaming.NamingContextPackage.NotEmpty;
+import org.omg.CosNaming.NamingContextPackage.NotFound;
+
+/**
+ * The interface for the naming context. The naming context can
+ * store (bound) and retrieve (resolve) the named objects or
+ * named child contexts. These operations are defined in a separate
+ * interface.
+ *
+ * @see NamingContextExt
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public interface NamingContext
+ extends NamingContextOperations, org.omg.CORBA.Object, IDLEntity
+{
+ /**
+ * Gives the object a name, valid in this context.
+ *
+ * @param a_name the name, being given to the object.
+ * @param an_object the object, being named.
+ *
+ * @throws AlreadyBound if the object is already named in this context.
+ * @throws InvalidName if the name has zero length or otherwise invalid.
+ *
+ * @specnote since 1.3 this method has moved into NamingContextOperations.
+ */
+ void bind(NameComponent[] a_name, org.omg.CORBA.Object an_object)
+ throws NotFound, CannotProceed, InvalidName, AlreadyBound;
+
+ /**
+ * Gives a child context name, valid in this context.
+ *
+ * @param a_name the name, being given to the child context.
+ * @param a_context the child context being named.
+ *
+ * @throws AlreadyBound if the child context is already named in
+ * the current context.
+ *
+ * @specnote since 1.3 this method has moved into NamingContextOperations.
+ */
+ void bind_context(NameComponent[] a_name, NamingContext a_context)
+ throws NotFound, CannotProceed, InvalidName, AlreadyBound;
+
+ /**
+ * Create a new context and give it a given name (bound it)
+ * in the current context.
+ *
+ * @param a_name the name being given to the new context.
+ *
+ * @return the newly created context.
+ *
+ * @throws AlreadyBound if the name is already in use.
+ * @throws InvalidName if the name has zero length or otherwise invalid.
+ *
+ * @specnote since 1.3 this method has moved into NamingContextOperations.
+ */
+ NamingContext bind_new_context(NameComponent[] a_name)
+ throws NotFound, AlreadyBound, CannotProceed,
+ InvalidName;
+
+ /**
+ * Destroy this context (must be empty).
+ * @throws NotEmpty if the context being destroyed is not empty.
+ *
+ * @specnote since 1.3 this method has moved into NamingContextOperations.
+ */
+ void destroy()
+ throws NotEmpty;
+
+ /**
+ * Iterate over all bindings, defined in this namind context.
+ *
+ * @param amount the maximal number of context to return in the
+ * holder a_list. The remaining bindings are accessible via iterator
+ * an_iter. If the parameter amount is zero, all bindings are accessed only
+ * via this iterator.
+ *
+ * @param a_list the holder, where the returned bindigs are stored.
+ * @param an_iter the iterator that can be used to access the remaining
+ * bindings.
+ *
+ * @specnote since 1.3 this method has moved into NamingContextOperations.
+ */
+ void list(int amount, BindingListHolder a_list, BindingIteratorHolder an_iter);
+
+ /**
+ * Creates a new naming context, not bound to any name.
+ *
+ * @specnote since 1.3 this method has moved into NamingContextOperations.
+ */
+ NamingContext new_context();
+
+ /**
+ * Names or renames the object.
+ *
+ * @param a_name the new name, being given to the object. If
+ * the object is already named in this context, it is renamed.
+ *
+ * @param an_object the object, being named.
+ *
+ * @throws InvalidName if the name has zero length or otherwise invalid.
+ *
+ * @specnote since 1.3 this method has moved into NamingContextOperations.
+ */
+ void rebind(NameComponent[] a_name, org.omg.CORBA.Object an_object)
+ throws NotFound, CannotProceed, InvalidName;
+
+ /**
+ * Names or renames the child context.
+ * If the child context is already named in
+ * the current context, it is renamed.
+ *
+ * @param a_name the name, being given to the child context.
+ * @param a_context the child context being named.
+ *
+ * @throws InvalidName if the name has zero length or otherwise invalid.
+ *
+ * @specnote since 1.3 this method has moved into NamingContextOperations.
+ */
+ void rebind_context(NameComponent[] a_name, NamingContext a_context)
+ throws NotFound, CannotProceed, InvalidName;
+
+ /**
+ * Get the object, bound to the specified name in this
+ * context.
+ *
+ * @param a_name the object name.
+ *
+ * @return the object, matching this name. The client
+ * usually casts or narrows (using the helper) the returned value
+ * to the more specific type.
+ *
+ * @throws NotFound
+ * @throws InvalidName if the name has zero length or otherwise invalid.
+ *
+ * @specnote since 1.3 this method has moved into NamingContextOperations.
+ */
+ org.omg.CORBA.Object resolve(NameComponent[] a_name)
+ throws NotFound, CannotProceed, InvalidName;
+
+ /**
+ * Removes the name from the binding context.
+ *
+ * @param a_name a name to remove.
+ *
+ * @throws InvalidName if the name has zero length or otherwise invalid.
+ *
+ * @specnote since 1.3 this method has moved into NamingContextOperations.
+ */
+ void unbind(NameComponent[] a_name)
+ throws NotFound, CannotProceed, InvalidName;
+} \ No newline at end of file
diff --git a/libjava/classpath/org/omg/CosNaming/NamingContextExt.java b/libjava/classpath/org/omg/CosNaming/NamingContextExt.java
new file mode 100644
index 00000000000..ac77ae90dd8
--- /dev/null
+++ b/libjava/classpath/org/omg/CosNaming/NamingContextExt.java
@@ -0,0 +1,55 @@
+/* NamingContextExt.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.CosNaming;
+
+import org.omg.CORBA.portable.IDLEntity;
+
+/**
+ * The extended naming context interface, defined since 1.4. The context
+ * operations are defined separately from the context interface.
+ *
+ * This interface is derived from the previous NamingContex version,
+ * requiring to implement all previously available functionality.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public interface NamingContextExt
+ extends NamingContextExtOperations, NamingContext, IDLEntity
+{
+}
diff --git a/libjava/classpath/org/omg/CosNaming/NamingContextExtHelper.java b/libjava/classpath/org/omg/CosNaming/NamingContextExtHelper.java
new file mode 100644
index 00000000000..6e2ef060b9a
--- /dev/null
+++ b/libjava/classpath/org/omg/CosNaming/NamingContextExtHelper.java
@@ -0,0 +1,154 @@
+/* NamingContextExtHelper.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.CosNaming;
+
+import org.omg.CORBA.Any;
+import org.omg.CORBA.BAD_OPERATION;
+import org.omg.CORBA.BAD_PARAM;
+import org.omg.CORBA.ORB;
+import org.omg.CORBA.TypeCode;
+import org.omg.CORBA.portable.Delegate;
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.ObjectImpl;
+import org.omg.CORBA.portable.OutputStream;
+
+/**
+ * The helper operations for the extended naming context.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public abstract class NamingContextExtHelper
+{
+ /**
+ * The naming context repository id.
+ */
+ private static String _id = "IDL:omg.org/CosNaming/NamingContextExt:1.0";
+
+ /**
+ * The cached {@link NamingContextExt} typecode.
+ */
+ private static TypeCode typeCode = null;
+
+ /**
+ * Extract the naming context from the given {@link Any}.
+ */
+ public static NamingContextExt extract(Any a)
+ {
+ try
+ {
+ return ((NamingContextExtHolder) a.extract_Streamable()).value;
+ }
+ catch (ClassCastException ex)
+ {
+ BAD_OPERATION bad = new BAD_OPERATION("NamingContextExt expected");
+ bad.initCause(ex);
+ throw bad;
+ }
+ }
+
+ /**
+ * Get the {@link NamingContextExt} repository id.
+ */
+ public static String id()
+ {
+ return _id;
+ }
+
+ /**
+ * Insert the naming context into the given {@link Any}
+ */
+ public static void insert(Any a, NamingContextExt that)
+ {
+ a.insert_Streamable(new NamingContextExtHolder(that));
+ }
+
+ /**
+ * Cast the passed object into the NamingContextExt. If the
+ * object has a different java type, create an instance
+ * of the NamingContextExt, using the same delegate, as for
+ * the passed parameter. Hence this method may return
+ * a different object, than has been passed.
+ *
+ * @param obj the object to cast.
+ * @return casted instance.
+ */
+ public static NamingContextExt narrow(org.omg.CORBA.Object obj)
+ {
+ if (obj == null)
+ return null;
+ else if (obj instanceof NamingContextExt)
+ return (NamingContextExt) obj;
+ else if (!obj._is_a(id()))
+ throw new BAD_PARAM();
+ else
+ {
+ Delegate delegate = ((ObjectImpl) obj)._get_delegate();
+ return new _NamingContextExtStub(delegate);
+ }
+ }
+
+ /**
+ * Read the extended naming context from the given CDR input stream.
+ */
+ public static NamingContextExt read(InputStream istream)
+ {
+ return narrow(istream.read_Object(_NamingContextExtStub.class));
+ }
+
+ /**
+ * Get the type code of the {@link NamingContextExt}.
+ */
+ public static TypeCode type()
+ {
+ if (typeCode == null)
+ typeCode =
+ ORB.init().create_interface_tc(NamingContextExtHelper.id(),
+ "NamingContextExt"
+ );
+ return typeCode;
+ }
+
+ /**
+ * Write the given extended naming context into the given CDR output stream.
+ */
+ public static void write(OutputStream ostream, NamingContextExt value)
+ {
+ ostream.write_Object(value);
+ }
+}
diff --git a/libjava/classpath/org/omg/CosNaming/NamingContextExtHolder.java b/libjava/classpath/org/omg/CosNaming/NamingContextExtHolder.java
new file mode 100644
index 00000000000..923edcd7b74
--- /dev/null
+++ b/libjava/classpath/org/omg/CosNaming/NamingContextExtHolder.java
@@ -0,0 +1,97 @@
+/* NamingContextExtHolder.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.CosNaming;
+
+import org.omg.CORBA.TypeCode;
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+import org.omg.CORBA.portable.Streamable;
+
+/**
+ * A holder for the extended naming context, added since 1.4.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public final class NamingContextExtHolder
+ implements Streamable
+{
+ /**
+ * A stored value.
+ */
+ public NamingContextExt value;
+
+ /**
+ * Create the unitialised naming context holder.
+ */
+ public NamingContextExtHolder()
+ {
+ }
+
+ /**
+ * Create the naming context holder, intialised to the given value.
+ */
+ public NamingContextExtHolder(NamingContextExt initialValue)
+ {
+ value = initialValue;
+ }
+
+ /**
+ * Read the naming context from the given CDR input stream.
+ */
+ public void _read(InputStream i)
+ {
+ value = NamingContextExtHelper.read(i);
+ }
+
+ /**
+ * Get the typecode of the naming context.
+ */
+ public TypeCode _type()
+ {
+ return NamingContextExtHelper.type();
+ }
+
+ /**
+ * Write the naming context to the given CDR output stream.
+ */
+ public void _write(OutputStream o)
+ {
+ NamingContextExtHelper.write(o, value);
+ }
+}
diff --git a/libjava/classpath/org/omg/CosNaming/NamingContextExtOperations.java b/libjava/classpath/org/omg/CosNaming/NamingContextExtOperations.java
new file mode 100644
index 00000000000..ec0af0fcd73
--- /dev/null
+++ b/libjava/classpath/org/omg/CosNaming/NamingContextExtOperations.java
@@ -0,0 +1,97 @@
+/* NamingContextExtOperations.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.CosNaming;
+
+import org.omg.CosNaming.NamingContextExtPackage.InvalidAddress;
+import org.omg.CosNaming.NamingContextPackage.CannotProceed;
+import org.omg.CosNaming.NamingContextPackage.InvalidName;
+import org.omg.CosNaming.NamingContextPackage.NotFound;
+
+/**
+ * The extended naming context operations, defined since 1.4.
+ * The extensions are focused on providing the simplier way
+ * to use naming service with the string-based names and
+ * addresses.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public interface NamingContextExtOperations
+ extends NamingContextOperations
+{
+ /**
+ * Resolve the name, represented in the form of the string.
+ * The components of the composite name are separated by
+ * slash ('/').
+ *
+ * @param a_name_string the name to resolve.
+ * @return the object, referenced by the name.
+ */
+ org.omg.CORBA.Object resolve_str(String a_name_string)
+ throws NotFound, CannotProceed, InvalidName;
+
+ /**
+ * Converts the name, represented in the form of the string,
+ * into the older name representation (array of the name
+ * components).
+ *
+ * @param a_name_string the stringified form of the name.
+ *
+ * @return the component array form of the name.
+ *
+ * @throws InvalidName if the name is invalid.
+ */
+ NameComponent[] to_name(String a_name_string)
+ throws InvalidName;
+
+ /**
+ * Converts the older representation for the name (array
+ * of the name components) into the string form of the name.
+ *
+ * @param a_name the name, as an array of components.
+ *
+ * @return the same name as a string.
+ *
+ * @throws InvalidName if the name is invalid.
+ */
+ String to_string(NameComponent[] a_name)
+ throws InvalidName;
+
+ String to_url(String an_address, String a_name_string)
+ throws InvalidAddress, InvalidName;
+}
diff --git a/libjava/classpath/org/omg/CosNaming/NamingContextExtPackage/AddressHelper.java b/libjava/classpath/org/omg/CosNaming/NamingContextExtPackage/AddressHelper.java
new file mode 100644
index 00000000000..cf4029ccfc8
--- /dev/null
+++ b/libjava/classpath/org/omg/CosNaming/NamingContextExtPackage/AddressHelper.java
@@ -0,0 +1,119 @@
+/* AddressHelper.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.CosNaming.NamingContextExtPackage;
+
+import org.omg.CORBA.Any;
+import org.omg.CORBA.ORB;
+import org.omg.CORBA.TypeCode;
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+import org.omg.CORBA.portable.Streamable;
+
+/**
+ * Helper operations for address. Address is directly mapped into
+ * java String. There is no separate Address class in the implementation.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public abstract class AddressHelper
+{
+ /**
+ * The address repository id.
+ */
+ private static String _id =
+ "IDL:omg.org/CosNaming/NamingContextExt/Address:1.0";
+
+ /**
+ * The cached type code (string alias).
+ */
+ private static TypeCode typeCode = null;
+
+ /**
+ * Just extracts string from this {@link Any}.
+ */
+ public static String extract(Any a)
+ {
+ return a.extract_string();
+ }
+
+ /**
+ * Get repository id.
+ */
+ public static String id()
+ {
+ return _id;
+ }
+
+ /**
+ * Just inserts string into this {@link Any}.
+ */
+ public static void insert(Any a, String that)
+ {
+ a.insert_string(that);
+ }
+
+ /**
+ * Delegates functionality to {@link InputStream#read_string()}.
+ */
+ public static String read(InputStream istream)
+ {
+ return istream.read_string();
+ }
+
+ /**
+ * Return the "Address", alias of String, typecode.
+ */
+ public static synchronized TypeCode type()
+ {
+ if (typeCode == null)
+ {
+ typeCode = ORB.init().create_string_tc(0);
+ typeCode = ORB.init().create_alias_tc(id(), "Address", typeCode);
+ }
+ return typeCode;
+ }
+
+ /**
+ * Delegates functionality to {@link OutputStream#write_string}.
+ */
+ public static void write(OutputStream ostream, String value)
+ {
+ ostream.write_string(value);
+ }
+}
diff --git a/libjava/classpath/org/omg/CosNaming/NamingContextExtPackage/InvalidAddress.java b/libjava/classpath/org/omg/CosNaming/NamingContextExtPackage/InvalidAddress.java
new file mode 100644
index 00000000000..7b2866d065e
--- /dev/null
+++ b/libjava/classpath/org/omg/CosNaming/NamingContextExtPackage/InvalidAddress.java
@@ -0,0 +1,76 @@
+/* InvalidAddress.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.CosNaming.NamingContextExtPackage;
+
+import org.omg.CORBA.UserException;
+import org.omg.CORBA.portable.IDLEntity;
+
+import java.io.Serializable;
+
+/**
+ * The exception is thrown if the passed address is empty or otherwise invalid.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public final class InvalidAddress
+ extends UserException
+ implements IDLEntity, Serializable
+{
+ /**
+ * Use serialVersionUID (v1.4) for interoperability.
+ */
+ private static final long serialVersionUID = -3775583235364760385L;
+
+ /**
+ * Create an exception with no message.
+ */
+ public InvalidAddress()
+ {
+ }
+
+ /**
+ * Create an exception with explaining message.
+ *
+ * @since 1.4
+ */
+ public InvalidAddress(String why)
+ {
+ super(why);
+ }
+} \ No newline at end of file
diff --git a/libjava/classpath/org/omg/CosNaming/NamingContextExtPackage/InvalidAddressHelper.java b/libjava/classpath/org/omg/CosNaming/NamingContextExtPackage/InvalidAddressHelper.java
new file mode 100644
index 00000000000..02f8fccb607
--- /dev/null
+++ b/libjava/classpath/org/omg/CosNaming/NamingContextExtPackage/InvalidAddressHelper.java
@@ -0,0 +1,122 @@
+/* InvalidAddressHelper.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.CosNaming.NamingContextExtPackage;
+
+import org.omg.CORBA.Any;
+import org.omg.CORBA.ORB;
+import org.omg.CORBA.StructMember;
+import org.omg.CORBA.TypeCode;
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+
+/**
+* The holder for exception {@link InvalidAddress}.
+*
+* @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+*/
+public abstract class InvalidAddressHelper
+{
+ /**
+ * The {@link InvalidAddress} repository id.
+ */
+ private static String _id =
+ "IDL:omg.org/CosNaming/NamingContextExt/InvalidAddress:1.0";
+
+ /**
+ * The cached type code value.
+ */
+ private static TypeCode typeCode;
+
+ /**
+ * Extract the exception from the given {@link Any}.
+ */
+ public static InvalidAddress extract(Any a)
+ {
+ return read(a.create_input_stream());
+ }
+
+ /**
+ * Return the exception repository id.
+ */
+ public static String id()
+ {
+ return _id;
+ }
+
+ /**
+ * Insert the exception into the given {@link Any}.
+ */
+ public static void insert(Any a, InvalidAddress that)
+ {
+ a.insert_Streamable(new InvalidAddressHolder(that));
+ }
+
+ /**
+ * Read the exception from the given CDR stream.
+ */
+ public static InvalidAddress read(InputStream istream)
+ {
+ InvalidAddress value = new InvalidAddress();
+
+ // Read and discard the repository ID.
+ istream.read_string();
+ return value;
+ }
+
+ /**
+ * Create the type code for this exception.
+ */
+ public static synchronized TypeCode type()
+ {
+ if (typeCode == null)
+ {
+ typeCode =
+ ORB.init().create_struct_tc(InvalidAddressHelper.id(),
+ "InvalidAddress", new StructMember[ 0 ]
+ );
+ }
+ return typeCode;
+ }
+
+ public static void write(OutputStream ostream, InvalidAddress value)
+ {
+ // Write the repository ID.
+ ostream.write_string(id());
+ }
+}
diff --git a/libjava/classpath/org/omg/CosNaming/NamingContextExtPackage/InvalidAddressHolder.java b/libjava/classpath/org/omg/CosNaming/NamingContextExtPackage/InvalidAddressHolder.java
new file mode 100644
index 00000000000..1149194624c
--- /dev/null
+++ b/libjava/classpath/org/omg/CosNaming/NamingContextExtPackage/InvalidAddressHolder.java
@@ -0,0 +1,97 @@
+/* InvalidAddressHolder.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.CosNaming.NamingContextExtPackage;
+
+import org.omg.CORBA.TypeCode;
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+import org.omg.CORBA.portable.Streamable;
+
+/**
+ * The holder for the exception {@link InvalidAddress}.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public final class InvalidAddressHolder
+ implements Streamable
+{
+ /**
+ * The stored value.
+ */
+ public InvalidAddress value;
+
+ /**
+ * Create the holder with unitialised value.
+ */
+ public InvalidAddressHolder()
+ {
+ }
+
+ /**
+ * Create the holder, storing the given value.
+ */
+ public InvalidAddressHolder(InvalidAddress initialValue)
+ {
+ value = initialValue;
+ }
+
+ /**
+ * Fill in the stored value, reading it from the given CDR stream.
+ */
+ public void _read(InputStream in)
+ {
+ value = InvalidAddressHelper.read(in);
+ }
+
+ /**
+ * Get the type code of the {@link NotEmpty} exception.
+ */
+ public TypeCode _type()
+ {
+ return InvalidAddressHelper.type();
+ }
+
+ /**
+ * Write the stored value to the given CDR stream.
+ */
+ public void _write(OutputStream out)
+ {
+ InvalidAddressHelper.write(out, value);
+ }
+}
diff --git a/libjava/classpath/org/omg/CosNaming/NamingContextExtPackage/StringNameHelper.java b/libjava/classpath/org/omg/CosNaming/NamingContextExtPackage/StringNameHelper.java
new file mode 100644
index 00000000000..24c69fcb9b2
--- /dev/null
+++ b/libjava/classpath/org/omg/CosNaming/NamingContextExtPackage/StringNameHelper.java
@@ -0,0 +1,120 @@
+/* StringNameHelper.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.CosNaming.NamingContextExtPackage;
+
+import org.omg.CORBA.Any;
+import org.omg.CORBA.ORB;
+import org.omg.CORBA.TypeCode;
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+import org.omg.CORBA.portable.Streamable;
+
+/**
+ * Helper operations for the string name.
+ * The string name is directly mapped into java String.
+ * There is no separate "String name" class in the implementation.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public abstract class StringNameHelper
+{
+ /**
+ * The string name repository id.
+ */
+ private static String _id =
+ "IDL:omg.org/CosNaming/NamingContextExt/StringName:1.0";
+
+ /**
+ * The cached type code (string alias).
+ */
+ private static TypeCode typeCode;
+
+ /**
+ * Just extracts string from this {@link Any}.
+ */
+ public static String extract(Any a)
+ {
+ return a.extract_string();
+ }
+
+ /**
+ * Get repository id.
+ */
+ public static String id()
+ {
+ return _id;
+ }
+
+ /**
+ * Just inserts string into this {@link Any}.
+ */
+ public static void insert(Any a, String that)
+ {
+ a.insert_string(that);
+ }
+
+ /**
+ * Delegates functionality to {@link InputStream#read_string()}.
+ */
+ public static String read(InputStream istream)
+ {
+ return istream.read_string();
+ }
+
+ /**
+ * Return the "StringName", alias of String, typecode.
+ */
+ public static synchronized TypeCode type()
+ {
+ if (typeCode == null)
+ {
+ typeCode = ORB.init().create_string_tc(0);
+ typeCode = ORB.init().create_alias_tc(id(), "StringName", typeCode);
+ }
+ return typeCode;
+ }
+
+ /**
+ * Delegates functionality to {@link OutputStream#write_string}.
+ */
+ public static void write(OutputStream ostream, String value)
+ {
+ ostream.write_string(value);
+ }
+}
diff --git a/libjava/classpath/org/omg/CosNaming/NamingContextExtPackage/URLStringHelper.java b/libjava/classpath/org/omg/CosNaming/NamingContextExtPackage/URLStringHelper.java
new file mode 100644
index 00000000000..503fe22d69a
--- /dev/null
+++ b/libjava/classpath/org/omg/CosNaming/NamingContextExtPackage/URLStringHelper.java
@@ -0,0 +1,119 @@
+/* URLStringHelper.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.CosNaming.NamingContextExtPackage;
+
+import org.omg.CORBA.Any;
+import org.omg.CORBA.ORB;
+import org.omg.CORBA.TypeCode;
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+
+/**
+ * Helper operations for the URL string name.
+ * The URL string is directly mapped into java String.
+ * There is no separate "URL string" class in the implementation.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public abstract class URLStringHelper
+{
+ /**
+ * The URL string repository id.
+ */
+ private static String _id =
+ "IDL:omg.org/CosNaming/NamingContextExt/URLString:1.0";
+
+ /**
+ * The cached type code (string alias).
+ */
+ private static TypeCode typeCode;
+
+ /**
+ * Just extracts string from this {@link Any}.
+ */
+ public static String extract(Any a)
+ {
+ return a.extract_string();
+ }
+
+ /**
+ * Get repository id.
+ */
+ public static String id()
+ {
+ return _id;
+ }
+
+ /**
+ * Just inserts string into this {@link Any}.
+ */
+ public static void insert(Any a, String that)
+ {
+ a.insert_string(that);
+ }
+
+ /**
+ * Delegates functionality to {@link InputStream#read_string()}.
+ */
+ public static String read(InputStream istream)
+ {
+ return istream.read_string();
+ }
+
+ /**
+ * Return the "URLString", alias of String, typecode.
+ */
+ public static synchronized TypeCode type()
+ {
+ if (typeCode == null)
+ {
+ typeCode = ORB.init().create_string_tc(0);
+ typeCode = ORB.init().create_alias_tc(id(), "URLString", typeCode);
+ }
+ return typeCode;
+ }
+
+ /**
+ * Delegates functionality to {@link OutputStream#write_string}.
+ */
+ public static void write(OutputStream ostream, String value)
+ {
+ ostream.write_string(value);
+ }
+}
diff --git a/libjava/classpath/org/omg/CosNaming/NamingContextExtPackage/package.html b/libjava/classpath/org/omg/CosNaming/NamingContextExtPackage/package.html
new file mode 100644
index 00000000000..a082f1c6d59
--- /dev/null
+++ b/libjava/classpath/org/omg/CosNaming/NamingContextExtPackage/package.html
@@ -0,0 +1,47 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
+<!-- package.html - describes classes in org.omg.CosNaming.NamingContextExtPackage
+ 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.CosNaming.NamingContextExtPackage</title></head>
+
+<body>
+<p>Provides several satelitte classes, needed by the naming service
+extensions, added from the version 1.4</p>
+
+</body>
+</html>
diff --git a/libjava/classpath/org/omg/CosNaming/NamingContextHelper.java b/libjava/classpath/org/omg/CosNaming/NamingContextHelper.java
new file mode 100644
index 00000000000..3a60d9cb4de
--- /dev/null
+++ b/libjava/classpath/org/omg/CosNaming/NamingContextHelper.java
@@ -0,0 +1,159 @@
+/* NamingContextHelper.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.CosNaming;
+
+import org.omg.CORBA.Any;
+import org.omg.CORBA.BAD_OPERATION;
+import org.omg.CORBA.BAD_PARAM;
+import org.omg.CORBA.ORB;
+import org.omg.CORBA.TypeCode;
+import org.omg.CORBA.portable.Delegate;
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.ObjectImpl;
+import org.omg.CORBA.portable.OutputStream;
+
+/**
+ * The helper operations for the naming context.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public abstract class NamingContextHelper
+{
+ /**
+ * The naming context repository id.
+ */
+ private static String _id = "IDL:omg.org/CosNaming/NamingContext:1.0";
+
+ /**
+ * The cached {@link NamingContext} typecode.
+ */
+ private static TypeCode typeCode;
+
+ /**
+ * Extract the naming context from the given {@link Any}.
+ */
+ public static NamingContext extract(Any a)
+ {
+ try
+ {
+ return ((NamingContextHolder) a.extract_Streamable()).value;
+ }
+ catch (ClassCastException ex)
+ {
+ BAD_OPERATION bad = new BAD_OPERATION("Naming context expected");
+ bad.initCause(ex);
+ throw bad;
+ }
+ }
+
+ /**
+ * Get the {@link NamingContext} repository id.
+ */
+ public static String id()
+ {
+ return _id;
+ }
+
+ /**
+ * Insert the naming context into the given {@link Any}
+ */
+ public static void insert(Any a, NamingContext that)
+ {
+ a.insert_Streamable(new NamingContextHolder(that));
+ }
+
+ /**
+ * Cast the passed object into the NamingContext. If the
+ * object has a different java type, create an instance
+ * of the NamingContext, using the same delegate, as for
+ * the passed parameter.
+ *
+ * If the object repository Id indicates that it is an instance of
+ * {@link NamingContextExt} that is a subclass of the NamingContext,
+ * the functionality is delegated to {@link NamingContextHelper#narrow}.
+ *
+ * @param obj the object to cast.
+ * @return casted instance.
+ *
+ * @throws BAD_PARAM if the passed object is not an instance of
+ * {@link NamingContext} or {@link NamingContextExt}.
+ */
+ public static NamingContext narrow(org.omg.CORBA.Object obj)
+ {
+ if (obj == null)
+ return null;
+ else if (obj instanceof NamingContext)
+ return (NamingContext) obj;
+ else if (obj._is_a(id()))
+ {
+ Delegate delegate = ((ObjectImpl) obj)._get_delegate();
+ return new _NamingContextStub(delegate);
+ }
+ else if (obj._is_a(NamingContextExtHelper.id()))
+ return NamingContextExtHelper.narrow(obj);
+ else
+ throw new BAD_PARAM();
+ }
+
+ /**
+ * Read the naming context from the given CDR input stream.
+ */
+ public static NamingContext read(InputStream istream)
+ {
+ return narrow(istream.read_Object(_NamingContextStub.class));
+ }
+
+ /**
+ * Get the type code of the {@link NamingContext}.
+ */
+ public static TypeCode type()
+ {
+ if (typeCode == null)
+ typeCode = ORB.init().create_interface_tc(id(), "NamingContext");
+ return typeCode;
+ }
+
+ /**
+ * Write the given naming context into the given CDR output stream.
+ */
+ public static void write(OutputStream ostream, NamingContext value)
+ {
+ ostream.write_Object(value);
+ }
+}
diff --git a/libjava/classpath/org/omg/CosNaming/NamingContextHolder.java b/libjava/classpath/org/omg/CosNaming/NamingContextHolder.java
new file mode 100644
index 00000000000..099697aa487
--- /dev/null
+++ b/libjava/classpath/org/omg/CosNaming/NamingContextHolder.java
@@ -0,0 +1,97 @@
+/* NamingContextHolder.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.CosNaming;
+
+import org.omg.CORBA.TypeCode;
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+import org.omg.CORBA.portable.Streamable;
+
+/**
+ * A holder for the naming context.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public final class NamingContextHolder
+ implements Streamable
+{
+ /**
+ * A stored value.
+ */
+ public NamingContext value;
+
+ /**
+ * Create the unitialised naming context holder.
+ */
+ public NamingContextHolder()
+ {
+ }
+
+ /**
+ * Create the naming context holder, intialised to the given value.
+ */
+ public NamingContextHolder(NamingContext initialValue)
+ {
+ value = initialValue;
+ }
+
+ /**
+ * Read the naming context from the given CDR input stream.
+ */
+ public void _read(InputStream in)
+ {
+ value = NamingContextHelper.read(in);
+ }
+
+ /**
+ * Get the typecode of the naming context.
+ */
+ public TypeCode _type()
+ {
+ return NamingContextHelper.type();
+ }
+
+ /**
+ * Write the naming context to the given CDR output stream.
+ */
+ public void _write(OutputStream out)
+ {
+ NamingContextHelper.write(out, value);
+ }
+}
diff --git a/libjava/classpath/org/omg/CosNaming/NamingContextOperations.java b/libjava/classpath/org/omg/CosNaming/NamingContextOperations.java
new file mode 100644
index 00000000000..40ac419c4ab
--- /dev/null
+++ b/libjava/classpath/org/omg/CosNaming/NamingContextOperations.java
@@ -0,0 +1,176 @@
+/* NamingContext.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.CosNaming;
+
+import org.omg.CORBA.portable.IDLEntity;
+import org.omg.CosNaming.NamingContextPackage.AlreadyBound;
+import org.omg.CosNaming.NamingContextPackage.CannotProceed;
+import org.omg.CosNaming.NamingContextPackage.InvalidName;
+import org.omg.CosNaming.NamingContextPackage.NotEmpty;
+import org.omg.CosNaming.NamingContextPackage.NotFound;
+
+/**
+ * The naming context operations. The naming context can
+ * store (bound) and retrieve (resolve) the named objects or
+ * named child contexts.
+ *
+ * @see NamingContextExtOperations
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public interface NamingContextOperations
+ extends org.omg.CORBA.Object, IDLEntity
+{
+ /**
+ * Gives the object a name, valid in this context.
+ *
+ * @param a_name the name, being given to the object.
+ * @param an_object the object, being named.
+ *
+ * @throws AlreadyBound if the object is already named in this context.
+ * @throws InvalidName if the name has zero length or otherwise invalid.
+ */
+ void bind(NameComponent[] a_name, org.omg.CORBA.Object an_object)
+ throws NotFound, CannotProceed, InvalidName, AlreadyBound;
+
+ /**
+ * Gives a child context name, valid in this context.
+ *
+ * @param a_name the name, being given to the child context.
+ * @param a_context the child context being named.
+ *
+ * @throws AlreadyBound if the child context is already named in
+ * the current context.
+ */
+ void bind_context(NameComponent[] a_name, NamingContext a_context)
+ throws NotFound, CannotProceed, InvalidName, AlreadyBound;
+
+ /**
+ * Create a new context and give it a given name (bound it)
+ * in the current context.
+ *
+ * @param a_name the name being given to the new context.
+ *
+ * @return the newly created context.
+ *
+ * @throws AlreadyBound if the name is already in use.
+ * @throws InvalidName if the name has zero length or otherwise invalid.
+ */
+ NamingContext bind_new_context(NameComponent[] a_name)
+ throws NotFound, AlreadyBound, CannotProceed,
+ InvalidName;
+
+ /**
+ * Destroy this context (must be empty).
+ * @throws NotEmpty if the context being destroyed is not empty.
+ */
+ void destroy()
+ throws NotEmpty;
+
+ /**
+ * Iterate over all bindings, defined in this namind context.
+ *
+ * @param amount the maximal number of context to return in the
+ * holder a_list. The remaining bindings are accessible via iterator
+ * an_iter. If the parameter amount is zero, all bindings are accessed only
+ * via this iterator.
+ *
+ * @param a_list the holder, where the returned bindigs are stored.
+ * @param an_iter the iterator that can be used to access the remaining
+ * bindings.
+ */
+ void list(int amount, BindingListHolder a_list, BindingIteratorHolder an_iter);
+
+ /**
+ * Creates a new naming context, not bound to any name.
+ */
+ NamingContext new_context();
+
+ /**
+ * Names or renames the object.
+ *
+ * @param a_name the new name, being given to the object. If
+ * the object is already named in this context, it is renamed.
+ *
+ * @param an_object the object, being named.
+ *
+ * @throws InvalidName if the name has zero length or otherwise invalid.
+ */
+ void rebind(NameComponent[] a_name, org.omg.CORBA.Object an_object)
+ throws NotFound, CannotProceed, InvalidName;
+
+ /**
+ * Names or renames the child context.
+ * If the child context is already named in
+ * the current context, it is renamed.
+ *
+ * @param a_name the name, being given to the child context.
+ * @param a_context the child context being named.
+ *
+ * @throws InvalidName if the name has zero length or otherwise invalid.
+ */
+ void rebind_context(NameComponent[] a_name, NamingContext a_context)
+ throws NotFound, CannotProceed, InvalidName;
+
+ /**
+ * Get the object, bound to the specified name in this
+ * context.
+ *
+ * @param a_name the object name.
+ *
+ * @return the object, matching this name. The client
+ * usually casts or narrows (using the helper) the returned value
+ * to the more specific type.
+ *
+ * @throws NotFound
+ * @throws InvalidName if the name has zero length or otherwise invalid.
+ */
+ org.omg.CORBA.Object resolve(NameComponent[] a_name)
+ throws NotFound, CannotProceed, InvalidName;
+
+ /**
+ * Removes the name from the binding context.
+ *
+ * @param a_name a name to remove.
+ *
+ * @throws InvalidName if the name has zero length or otherwise invalid.
+ */
+ void unbind(NameComponent[] a_name)
+ throws NotFound, CannotProceed, InvalidName;
+}
diff --git a/libjava/classpath/org/omg/CosNaming/NamingContextPackage/AlreadyBound.java b/libjava/classpath/org/omg/CosNaming/NamingContextPackage/AlreadyBound.java
new file mode 100644
index 00000000000..2013f10f847
--- /dev/null
+++ b/libjava/classpath/org/omg/CosNaming/NamingContextPackage/AlreadyBound.java
@@ -0,0 +1,75 @@
+/* AlreadyBound.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.CosNaming.NamingContextPackage;
+
+import org.omg.CORBA.UserException;
+import org.omg.CORBA.portable.IDLEntity;
+
+/**
+ * The exception is thrown in response to bind the same object
+ * into the same context repeatedly under the different name.
+ * The object can have only one name in the context.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public final class AlreadyBound
+ extends UserException
+ implements IDLEntity
+{
+ /**
+ * Use serialVersionUID (v1.4) for interoperability.
+ */
+ private static final long serialVersionUID = -5456929050527586560L;
+
+ /**
+ * Creates the expection with no details.
+ */
+ public AlreadyBound()
+ {
+ }
+
+ /**
+ * Creates the exception, explaining the reason.
+ * @param why
+ */
+ public AlreadyBound(String why)
+ {
+ super(why);
+ }
+} \ No newline at end of file
diff --git a/libjava/classpath/org/omg/CosNaming/NamingContextPackage/AlreadyBoundHelper.java b/libjava/classpath/org/omg/CosNaming/NamingContextPackage/AlreadyBoundHelper.java
new file mode 100644
index 00000000000..9487895213c
--- /dev/null
+++ b/libjava/classpath/org/omg/CosNaming/NamingContextPackage/AlreadyBoundHelper.java
@@ -0,0 +1,128 @@
+/* AlreadyBoundHelper.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.CosNaming.NamingContextPackage;
+
+import org.omg.CORBA.Any;
+import org.omg.CORBA.BAD_OPERATION;
+import org.omg.CORBA.ORB;
+import org.omg.CORBA.StructMember;
+import org.omg.CORBA.TypeCode;
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+
+/**
+ * The helper operations for the {@link AlreadyBound} user exception.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public abstract class AlreadyBoundHelper
+{
+ /**
+ * The {@link AlreadyBound} repository id.
+ */
+ private static String _id =
+ "IDL:omg.org/CosNaming/NamingContext/AlreadyBound:1.0";
+
+ /**
+ * The cached type code value.
+ */
+ private static TypeCode typeCode;
+
+ /**
+ * Extract the exception from the given {@link Any}.
+ */
+ public static AlreadyBound extract(Any a)
+ {
+ try
+ {
+ return ((AlreadyBoundHolder) a.extract_Streamable()).value;
+ }
+ catch (ClassCastException ex)
+ {
+ throw new BAD_OPERATION();
+ }
+ }
+
+ /**
+ * Return the exception repository id.
+ */
+ public static String id()
+ {
+ return _id;
+ }
+
+ /**
+ * Insert the exception into the given {@link Any}.
+ */
+ public static void insert(Any a, AlreadyBound that)
+ {
+ a.insert_Streamable(new AlreadyBoundHolder(that));
+ }
+
+ /**
+ * Read the exception from the given CDR stream.
+ */
+ public static AlreadyBound read(InputStream istream)
+ {
+ AlreadyBound value = new AlreadyBound();
+
+ // Read and discard the repository ID.
+ istream.read_string();
+ return value;
+ }
+
+ /**
+ * Create the type code for this exception.
+ */
+ public static TypeCode type()
+ {
+ if (typeCode == null)
+ typeCode =
+ ORB.init().create_struct_tc(id(), "AlreadyBound", new StructMember[ 0 ]);
+ return typeCode;
+ }
+
+ /**
+ * Write the exception to the CDR output stream.
+ */
+ public static void write(OutputStream ostream, AlreadyBound value)
+ {
+ ostream.write_string(id());
+ }
+}
diff --git a/libjava/classpath/org/omg/CosNaming/NamingContextPackage/AlreadyBoundHolder.java b/libjava/classpath/org/omg/CosNaming/NamingContextPackage/AlreadyBoundHolder.java
new file mode 100644
index 00000000000..853700fed6a
--- /dev/null
+++ b/libjava/classpath/org/omg/CosNaming/NamingContextPackage/AlreadyBoundHolder.java
@@ -0,0 +1,97 @@
+/* AlreadyBoundHolder.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.CosNaming.NamingContextPackage;
+
+import org.omg.CORBA.TypeCode;
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+import org.omg.CORBA.portable.Streamable;
+
+/**
+ * The holder for class {@link AlreadyBound} exception.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public final class AlreadyBoundHolder
+ implements Streamable
+{
+ /**
+ * The stored value.
+ */
+ public AlreadyBound value;
+
+ /**
+ * Create the holder with unitialised value.
+ */
+ public AlreadyBoundHolder()
+ {
+ }
+
+ /**
+ * Create the holder, storing the given value.
+ */
+ public AlreadyBoundHolder(AlreadyBound initialValue)
+ {
+ value = initialValue;
+ }
+
+ /**
+ * Fill in the stored value, reading it from the given CDR stream.
+ */
+ public void _read(InputStream in)
+ {
+ value = AlreadyBoundHelper.read(in);
+ }
+
+ /**
+ * Get the type code of the {@link NotEmpty} exception.
+ */
+ public TypeCode _type()
+ {
+ return AlreadyBoundHelper.type();
+ }
+
+ /**
+ * Write the stored value to the given CDR stream.
+ */
+ public void _write(OutputStream out)
+ {
+ AlreadyBoundHelper.write(out, value);
+ }
+}
diff --git a/libjava/classpath/org/omg/CosNaming/NamingContextPackage/CannotProceed.java b/libjava/classpath/org/omg/CosNaming/NamingContextPackage/CannotProceed.java
new file mode 100644
index 00000000000..67855113418
--- /dev/null
+++ b/libjava/classpath/org/omg/CosNaming/NamingContextPackage/CannotProceed.java
@@ -0,0 +1,102 @@
+/* CannotProceed.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.CosNaming.NamingContextPackage;
+
+import org.omg.CORBA.UserException;
+import org.omg.CORBA.portable.IDLEntity;
+import org.omg.CosNaming.NameComponent;
+import org.omg.CosNaming.NamingContext;
+
+/**
+ * The exception is raised when the naming service has
+ * given up for some reason.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public final class CannotProceed
+ extends UserException
+ implements IDLEntity
+{
+ /**
+ * Use serialVersionUID (v1.4) for interoperability.
+ */
+ private static final long serialVersionUID = -8627405252527310782L;
+
+ /**
+ * The relevant naming contex.
+ */
+ public NamingContext cxt;
+
+ /**
+ * Contains the remainder of the non working name.
+ */
+ public NameComponent[] rest_of_name;
+
+ /**
+ * Creates the unitialised exception.
+ */
+ public CannotProceed()
+ {
+ }
+
+ /**
+ * Creates an exception with the fields, intialised to the
+ * given values.
+ */
+ public CannotProceed(NamingContext _cxt, NameComponent[] _rest_of_name)
+ {
+ cxt = _cxt;
+ rest_of_name = _rest_of_name;
+ }
+
+ /**
+ * Create an exception with the initialised fields and explaining
+ * message.
+ *
+ * @since 1.4
+ */
+ public CannotProceed(String why, NamingContext _cxt,
+ NameComponent[] _rest_of_name
+ )
+ {
+ super(why);
+ cxt = _cxt;
+ rest_of_name = _rest_of_name;
+ }
+} \ No newline at end of file
diff --git a/libjava/classpath/org/omg/CosNaming/NamingContextPackage/CannotProceedHelper.java b/libjava/classpath/org/omg/CosNaming/NamingContextPackage/CannotProceedHelper.java
new file mode 100644
index 00000000000..d1a1da51e4e
--- /dev/null
+++ b/libjava/classpath/org/omg/CosNaming/NamingContextPackage/CannotProceedHelper.java
@@ -0,0 +1,147 @@
+/* CannotProceedHelper.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.CosNaming.NamingContextPackage;
+
+import org.omg.CORBA.Any;
+import org.omg.CORBA.BAD_OPERATION;
+import org.omg.CORBA.ORB;
+import org.omg.CORBA.StructMember;
+import org.omg.CORBA.TypeCode;
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+import org.omg.CosNaming.NameComponentHelper;
+import org.omg.CosNaming.NameHelper;
+import org.omg.CosNaming.NamingContextHelper;
+
+/**
+ * The helper operations for {@link CannotProceed}.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public abstract class CannotProceedHelper
+{
+ /**
+ * The {@link CannotProceed} repository id.
+ */
+ private static String _id =
+ "IDL:omg.org/CosNaming/NamingContext/CannotProceed:1.0";
+
+ /**
+ * The cached type code value.
+ */
+ private static TypeCode typeCode;
+
+ /**
+ * Extract the exception from the given {@link Any}.
+ */
+ public static CannotProceed extract(Any a)
+ {
+ try
+ {
+ return ((CannotProceedHolder) a.extract_Streamable()).value;
+ }
+ catch (ClassCastException ex)
+ {
+ throw new BAD_OPERATION();
+ }
+ }
+
+ /**
+ * Return the exception repository id.
+ */
+ public static String id()
+ {
+ return _id;
+ }
+
+ /**
+ * Insert the exception into the given {@link Any}.
+ */
+ public static void insert(Any a, CannotProceed that)
+ {
+ a.insert_Streamable(new CannotProceedHolder(that));
+ }
+
+ /**
+ * Read the exception from the given CDR stream.
+ */
+ public static CannotProceed read(InputStream istream)
+ {
+ CannotProceed value = new CannotProceed();
+
+ // read and discard the repository ID
+ istream.read_string();
+ value.cxt = NamingContextHelper.read(istream);
+ value.rest_of_name = NameHelper.read(istream);
+ return value;
+ }
+
+ /**
+ * Create the type code for this exception.
+ */
+ public static TypeCode type()
+ {
+ if (typeCode == null)
+ {
+ ORB orb = ORB.init();
+
+ StructMember[] members = new StructMember[ 2 ];
+ TypeCode member;
+ member = NamingContextHelper.type();
+ members [ 0 ] = new StructMember("cxt", member, null);
+ member = NameComponentHelper.type();
+ member = orb.create_sequence_tc(0, member);
+ member = orb.create_alias_tc(NameHelper.id(), "Name", member);
+ members [ 1 ] = new StructMember("rest_of_name", member, null);
+ typeCode = orb.create_struct_tc(id(), "CannotProceed", members);
+ }
+ return typeCode;
+ }
+
+ /**
+ * Write the exception to the CDR output stream.
+ */
+ public static void write(OutputStream ostream, CannotProceed value)
+ {
+ // write the repository ID
+ ostream.write_string(id());
+ NamingContextHelper.write(ostream, value.cxt);
+ NameHelper.write(ostream, value.rest_of_name);
+ }
+}
diff --git a/libjava/classpath/org/omg/CosNaming/NamingContextPackage/CannotProceedHolder.java b/libjava/classpath/org/omg/CosNaming/NamingContextPackage/CannotProceedHolder.java
new file mode 100644
index 00000000000..48a4fad06a1
--- /dev/null
+++ b/libjava/classpath/org/omg/CosNaming/NamingContextPackage/CannotProceedHolder.java
@@ -0,0 +1,97 @@
+/* CannotProceedHolder.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.CosNaming.NamingContextPackage;
+
+import org.omg.CORBA.TypeCode;
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+import org.omg.CORBA.portable.Streamable;
+
+/**
+ * The holder for exception {@link CannotProceed}.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public final class CannotProceedHolder
+ implements Streamable
+{
+ /**
+ * The stored value.
+ */
+ public CannotProceed value;
+
+ /**
+ * Create the holder with unitialised value.
+ */
+ public CannotProceedHolder()
+ {
+ }
+
+ /**
+ * Create the holder, storing the given value.
+ */
+ public CannotProceedHolder(CannotProceed initialValue)
+ {
+ value = initialValue;
+ }
+
+ /**
+ * Fill in the stored value, reading it from the given CDR stream.
+ */
+ public void _read(InputStream i)
+ {
+ value = CannotProceedHelper.read(i);
+ }
+
+ /**
+ * Get the type code of the {@link NotEmpty} exception.
+ */
+ public TypeCode _type()
+ {
+ return CannotProceedHelper.type();
+ }
+
+ /**
+ * Write the stored value to the given CDR stream.
+ */
+ public void _write(OutputStream o)
+ {
+ CannotProceedHelper.write(o, value);
+ }
+}
diff --git a/libjava/classpath/org/omg/CosNaming/NamingContextPackage/InvalidName.java b/libjava/classpath/org/omg/CosNaming/NamingContextPackage/InvalidName.java
new file mode 100644
index 00000000000..90ca3a5c5b3
--- /dev/null
+++ b/libjava/classpath/org/omg/CosNaming/NamingContextPackage/InvalidName.java
@@ -0,0 +1,76 @@
+/* InvalidName.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.CosNaming.NamingContextPackage;
+
+import org.omg.CORBA.UserException;
+import org.omg.CORBA.portable.IDLEntity;
+import org.omg.CosNaming.NameComponent;
+
+/**
+ * The exception is thrown if the name has the zero length or is otherwise
+ * invalid.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public final class InvalidName
+ extends UserException
+ implements IDLEntity
+{
+ /**
+ * Use serialVersionUID (v1.4) for interoperability.
+ */
+ private static final long serialVersionUID = 786404864997961704L;
+
+ /**
+ * The default constructor.
+ */
+ public InvalidName()
+ {
+ }
+
+ /**
+ * Creates an exception with explanation, why the name is invalid.
+ *
+ * @param why the string, explaining why the name is invalid.
+ */
+ public InvalidName(String why)
+ {
+ super(why);
+ }
+} \ No newline at end of file
diff --git a/libjava/classpath/org/omg/CosNaming/NamingContextPackage/InvalidNameHelper.java b/libjava/classpath/org/omg/CosNaming/NamingContextPackage/InvalidNameHelper.java
new file mode 100644
index 00000000000..434713b2d6f
--- /dev/null
+++ b/libjava/classpath/org/omg/CosNaming/NamingContextPackage/InvalidNameHelper.java
@@ -0,0 +1,133 @@
+/* InvalidNameHelper.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.CosNaming.NamingContextPackage;
+
+import org.omg.CORBA.Any;
+import org.omg.CORBA.BAD_OPERATION;
+import org.omg.CORBA.ORB;
+import org.omg.CORBA.StructMember;
+import org.omg.CORBA.TypeCode;
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+
+/**
+ * The helper operations for the {@link InvalidName}
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public abstract class InvalidNameHelper
+{
+ /**
+ * The {@link InvalidName} repository id.
+ */
+ private static String _id =
+ "IDL:omg.org/CosNaming/NamingContext/InvalidName:1.0";
+
+ /**
+ * The cached type code value.
+ */
+ private static TypeCode typeCode;
+
+ /**
+ * Extract the exception from the given {@link Any}.
+ */
+ public static InvalidName extract(Any a)
+ {
+ try
+ {
+ return ((InvalidNameHolder) a.extract_Streamable()).value;
+ }
+ catch (ClassCastException ex)
+ {
+ throw new BAD_OPERATION();
+ }
+ }
+
+ /**
+ * Return the exception repository id.
+ */
+ public static String id()
+ {
+ return _id;
+ }
+
+ /**
+ * Insert the exception into the given {@link Any}.
+ */
+ public static void insert(Any a, InvalidName that)
+ {
+ a.insert_Streamable(new InvalidNameHolder(that));
+ }
+
+ /**
+ * Read the exception from the given CDR stream.
+ */
+ public static InvalidName read(InputStream istream)
+ {
+ InvalidName value = new InvalidName();
+
+ // Read and discard the repository ID.
+ istream.read_string();
+ return value;
+ }
+
+ /**
+ * Create the type code for this exception.
+ */
+ public static TypeCode type()
+ {
+ if (typeCode == null)
+ {
+ if (typeCode == null)
+ typeCode =
+ ORB.init().create_struct_tc(id(), "InvalidName",
+ new StructMember[ 0 ]
+ );
+ }
+ return typeCode;
+ }
+
+ /**
+ * Write the exception to the CDR output stream.
+ */
+ public static void write(OutputStream ostream, InvalidName value)
+ {
+ ostream.write_string(id());
+ }
+}
diff --git a/libjava/classpath/org/omg/CosNaming/NamingContextPackage/InvalidNameHolder.java b/libjava/classpath/org/omg/CosNaming/NamingContextPackage/InvalidNameHolder.java
new file mode 100644
index 00000000000..180a093631f
--- /dev/null
+++ b/libjava/classpath/org/omg/CosNaming/NamingContextPackage/InvalidNameHolder.java
@@ -0,0 +1,97 @@
+/* InvalidNameHolder.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.CosNaming.NamingContextPackage;
+
+import org.omg.CORBA.TypeCode;
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+import org.omg.CORBA.portable.Streamable;
+
+/**
+ * The holder for exception {@link InvalidName}.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public final class InvalidNameHolder
+ implements Streamable
+{
+ /**
+ * The stored value.
+ */
+ public InvalidName value;
+
+ /**
+ * Create the holder with unitialised value.
+ */
+ public InvalidNameHolder()
+ {
+ }
+
+ /**
+ * Create the holder, storing the given value.
+ */
+ public InvalidNameHolder(InvalidName initialValue)
+ {
+ value = initialValue;
+ }
+
+ /**
+ * Fill in the stored value, reading it from the given CDR stream.
+ */
+ public void _read(InputStream in)
+ {
+ value = InvalidNameHelper.read(in);
+ }
+
+ /**
+ * Get the type code of the {@link NotEmpty} exception.
+ */
+ public TypeCode _type()
+ {
+ return InvalidNameHelper.type();
+ }
+
+ /**
+ * Write the stored value to the given CDR stream.
+ */
+ public void _write(OutputStream out)
+ {
+ InvalidNameHelper.write(out, value);
+ }
+}
diff --git a/libjava/classpath/org/omg/CosNaming/NamingContextPackage/NotEmpty.java b/libjava/classpath/org/omg/CosNaming/NamingContextPackage/NotEmpty.java
new file mode 100644
index 00000000000..3fe98d56400
--- /dev/null
+++ b/libjava/classpath/org/omg/CosNaming/NamingContextPackage/NotEmpty.java
@@ -0,0 +1,74 @@
+/* NotEmpty.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.CosNaming.NamingContextPackage;
+
+import org.omg.CORBA.UserException;
+import org.omg.CORBA.portable.IDLEntity;
+
+/**
+ * This exception is thrown in response to the attemt to destroy
+ * the non tempty context. Only the empty context can be destroyed.
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public final class NotEmpty
+ extends UserException
+ implements IDLEntity
+{
+ /**
+ * Use serialVersionUID (v1.4) for interoperability.
+ */
+ private static final long serialVersionUID = 7120362687417045881L;
+
+ /**
+ * Create an exception with no message.
+ */
+ public NotEmpty()
+ {
+ }
+
+ /**
+ * Create an exception with explaining message.
+ *
+ * @since 1.4
+ */
+ public NotEmpty(String why)
+ {
+ super(why);
+ }
+} \ No newline at end of file
diff --git a/libjava/classpath/org/omg/CosNaming/NamingContextPackage/NotEmptyHelper.java b/libjava/classpath/org/omg/CosNaming/NamingContextPackage/NotEmptyHelper.java
new file mode 100644
index 00000000000..e1f82994f9e
--- /dev/null
+++ b/libjava/classpath/org/omg/CosNaming/NamingContextPackage/NotEmptyHelper.java
@@ -0,0 +1,128 @@
+/* NotEmptyHelper.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.CosNaming.NamingContextPackage;
+
+import org.omg.CORBA.Any;
+import org.omg.CORBA.BAD_OPERATION;
+import org.omg.CORBA.ORB;
+import org.omg.CORBA.StructMember;
+import org.omg.CORBA.TypeCode;
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+
+/**
+ * The helper operations for the {@link NotEmpty}.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public abstract class NotEmptyHelper
+{
+ /**
+ * The {@link NotEmpty} repository id.
+ */
+ private static String _id =
+ "IDL:omg.org/CosNaming/NamingContext/NotEmpty:1.0";
+
+ /**
+ * The cached type code value.
+ */
+ private static TypeCode typeCode;
+
+ /**
+ * Extract the exception from the given {@link Any}.
+ */
+ public static NotEmpty extract(Any a)
+ {
+ try
+ {
+ return ((NotEmptyHolder) a.extract_Streamable()).value;
+ }
+ catch (ClassCastException ex)
+ {
+ throw new BAD_OPERATION();
+ }
+ }
+
+ /**
+ * Return the exception repository id.
+ */
+ public static String id()
+ {
+ return _id;
+ }
+
+ /**
+ * Insert the exception into the given {@link Any}.
+ */
+ public static void insert(Any a, NotEmpty that)
+ {
+ a.insert_Streamable(new NotEmptyHolder(that));
+ }
+
+ /**
+ * Read the exception from the given CDR stream.
+ */
+ public static NotEmpty read(InputStream istream)
+ {
+ NotEmpty value = new NotEmpty();
+
+ // Read and discard the repository ID.
+ istream.read_string();
+ return value;
+ }
+
+ /**
+ * Create the type code for this exception.
+ */
+ public static TypeCode type()
+ {
+ if (typeCode == null)
+ typeCode =
+ ORB.init().create_struct_tc(id(), "NotEmpty", new StructMember[ 0 ]);
+ return typeCode;
+ }
+
+ /**
+ * Write the exception to the CDR output stream.
+ */
+ public static void write(OutputStream ostream, NotEmpty value)
+ {
+ ostream.write_string(id());
+ }
+}
diff --git a/libjava/classpath/org/omg/CosNaming/NamingContextPackage/NotEmptyHolder.java b/libjava/classpath/org/omg/CosNaming/NamingContextPackage/NotEmptyHolder.java
new file mode 100644
index 00000000000..63a7f1bba34
--- /dev/null
+++ b/libjava/classpath/org/omg/CosNaming/NamingContextPackage/NotEmptyHolder.java
@@ -0,0 +1,97 @@
+/* NotEmptyHolder.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.CosNaming.NamingContextPackage;
+
+import org.omg.CORBA.TypeCode;
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+import org.omg.CORBA.portable.Streamable;
+
+/**
+ * The holder for exception {@link NotEmpty}.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public final class NotEmptyHolder
+ implements Streamable
+{
+ /**
+ * The stored value.
+ */
+ public NotEmpty value;
+
+ /**
+ * Create the holder with unitialised value.
+ */
+ public NotEmptyHolder()
+ {
+ }
+
+ /**
+ * Create the holder, storing the given value.
+ */
+ public NotEmptyHolder(NotEmpty initialValue)
+ {
+ value = initialValue;
+ }
+
+ /**
+ * Fill in the stored value, reading it from the given CDR stream.
+ */
+ public void _read(InputStream i)
+ {
+ value = NotEmptyHelper.read(i);
+ }
+
+ /**
+ * Get the type code of the {@link NotEmpty} exception.
+ */
+ public TypeCode _type()
+ {
+ return NotEmptyHelper.type();
+ }
+
+ /**
+ * Write the stored value to the given CDR stream.
+ */
+ public void _write(OutputStream o)
+ {
+ NotEmptyHelper.write(o, value);
+ }
+}
diff --git a/libjava/classpath/org/omg/CosNaming/NamingContextPackage/NotFound.java b/libjava/classpath/org/omg/CosNaming/NamingContextPackage/NotFound.java
new file mode 100644
index 00000000000..a8c9472d6ee
--- /dev/null
+++ b/libjava/classpath/org/omg/CosNaming/NamingContextPackage/NotFound.java
@@ -0,0 +1,101 @@
+/* NotFound.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.CosNaming.NamingContextPackage;
+
+import org.omg.CORBA.UserException;
+import org.omg.CORBA.portable.IDLEntity;
+import org.omg.CosNaming.NameComponent;
+
+/**
+* The exception is thrown when the binding being searched does not exist
+* or has the wrong type
+*
+* @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+*/
+public final class NotFound
+ extends UserException
+ implements IDLEntity
+{
+ /**
+ * Use serialVersionUID (v1.4) for interoperability.
+ */
+ private static final long serialVersionUID = -7539098836265502514L;
+
+ /**
+ * The reason, explaining, why the binding cannot be found.
+ * This might be either the missing node or the wrong binding type.
+ */
+ public NotFoundReason why;
+
+ /**
+ * Contains the remainder of the non working name.
+ */
+ public NameComponent[] rest_of_name;
+
+ /**
+ * Creates the exception with unitialised fields.
+ */
+ public NotFound()
+ {
+ }
+
+ /**
+ * Creates the exception, intialising the fields to the given values.
+ */
+ public NotFound(NotFoundReason _why, NameComponent[] _rest_of_name)
+ {
+ why = _why;
+ rest_of_name = _rest_of_name;
+ }
+
+ /**
+ * Creates the exception, intialising the fields to the given values and
+ * also providing the explaining string.
+ *
+ * @since 1.4
+ */
+ public NotFound(String explanation, NotFoundReason _why,
+ NameComponent[] _rest_of_name
+ )
+ {
+ super(explanation);
+ why = _why;
+ rest_of_name = _rest_of_name;
+ }
+} \ No newline at end of file
diff --git a/libjava/classpath/org/omg/CosNaming/NamingContextPackage/NotFoundHelper.java b/libjava/classpath/org/omg/CosNaming/NamingContextPackage/NotFoundHelper.java
new file mode 100644
index 00000000000..544ab63776f
--- /dev/null
+++ b/libjava/classpath/org/omg/CosNaming/NamingContextPackage/NotFoundHelper.java
@@ -0,0 +1,145 @@
+/* NotFoundHelper.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.CosNaming.NamingContextPackage;
+
+import org.omg.CORBA.Any;
+import org.omg.CORBA.BAD_OPERATION;
+import org.omg.CORBA.ORB;
+import org.omg.CORBA.StructMember;
+import org.omg.CORBA.TypeCode;
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+import org.omg.CosNaming.NameComponentHelper;
+import org.omg.CosNaming.NameHelper;
+
+/**
+ * The helper operations for {@link NotFound}.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public abstract class NotFoundHelper
+{
+ /**
+ * The {@link NotFound} repository id.
+ */
+ private static String _id =
+ "IDL:omg.org/CosNaming/NamingContext/NotFound:1.0";
+
+ /**
+ * The cached type code value.
+ */
+ private static TypeCode typeCode = null;
+
+ /**
+ * Extract the exception from the given {@link Any}.
+ */
+ public static NotFound extract(Any a)
+ {
+ try
+ {
+ return ((NotFoundHolder) a.extract_Streamable()).value;
+ }
+ catch (ClassCastException ex)
+ {
+ throw new BAD_OPERATION();
+ }
+ }
+
+ /**
+ * Return the exception repository id.
+ */
+ public static String id()
+ {
+ return _id;
+ }
+
+ /**
+ * Insert the exception into the given {@link Any}.
+ */
+ public static void insert(Any a, NotFound that)
+ {
+ a.insert_Streamable(new NotFoundHolder(that));
+ }
+
+ /**
+ * Read the exception from the given CDR stream.
+ */
+ public static NotFound read(InputStream istream)
+ {
+ NotFound value = new NotFound();
+
+ // Read and discard the repository ID.
+ istream.read_string();
+ value.why = NotFoundReasonHelper.read(istream);
+ value.rest_of_name = NameHelper.read(istream);
+ return value;
+ }
+
+ /**
+ * Create the type code for this exception.
+ */
+ public static TypeCode type()
+ {
+ if (typeCode == null)
+ {
+ ORB orb = ORB.init();
+
+ StructMember[] members = new StructMember[ 2 ];
+ TypeCode member = null;
+ member = NotFoundReasonHelper.type();
+ members [ 0 ] = new StructMember("why", member, null);
+ member = NameComponentHelper.type();
+ member = orb.create_sequence_tc(0, member);
+ member = orb.create_alias_tc(NameHelper.id(), "Name", member);
+ members [ 1 ] = new StructMember("rest_of_name", member, null);
+ typeCode = orb.create_struct_tc(id(), "NotFound", members);
+ }
+ return typeCode;
+ }
+
+ /**
+ * Write the exception to the CDR output stream.
+ */
+ public static void write(OutputStream ostream, NotFound value)
+ {
+ ostream.write_string(id());
+ NotFoundReasonHelper.write(ostream, value.why);
+ NameHelper.write(ostream, value.rest_of_name);
+ }
+}
diff --git a/libjava/classpath/org/omg/CosNaming/NamingContextPackage/NotFoundHolder.java b/libjava/classpath/org/omg/CosNaming/NamingContextPackage/NotFoundHolder.java
new file mode 100644
index 00000000000..c9ec7b02fd5
--- /dev/null
+++ b/libjava/classpath/org/omg/CosNaming/NamingContextPackage/NotFoundHolder.java
@@ -0,0 +1,97 @@
+/* NotFoundHolder.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.CosNaming.NamingContextPackage;
+
+import org.omg.CORBA.TypeCode;
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+import org.omg.CORBA.portable.Streamable;
+
+/**
+ * The holder for the {@link NotFound} exception.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public final class NotFoundHolder
+ implements Streamable
+{
+ /**
+ * The stored value.
+ */
+ public NotFound value;
+
+ /**
+ * Create the holder with unitialised value.
+ */
+ public NotFoundHolder()
+ {
+ }
+
+ /**
+ * Create the holder, storing the given value.
+ */
+ public NotFoundHolder(NotFound initialValue)
+ {
+ value = initialValue;
+ }
+
+ /**
+ * Fill in the stored value, reading it from the given CDR stream.
+ */
+ public void _read(InputStream in)
+ {
+ value = NotFoundHelper.read(in);
+ }
+
+ /**
+ * Get the type code of the {@link NotFound} exception.
+ */
+ public TypeCode _type()
+ {
+ return NotFoundHelper.type();
+ }
+
+ /**
+ * Write the stored value to the given CDR stream.
+ */
+ public void _write(OutputStream out)
+ {
+ NotFoundHelper.write(out, value);
+ }
+}
diff --git a/libjava/classpath/org/omg/CosNaming/NamingContextPackage/NotFoundReason.java b/libjava/classpath/org/omg/CosNaming/NamingContextPackage/NotFoundReason.java
new file mode 100644
index 00000000000..5f6af26daa6
--- /dev/null
+++ b/libjava/classpath/org/omg/CosNaming/NamingContextPackage/NotFoundReason.java
@@ -0,0 +1,134 @@
+/* NotFoundReason.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.CosNaming.NamingContextPackage;
+
+import org.omg.CORBA.BAD_PARAM;
+import org.omg.CORBA.portable.IDLEntity;
+
+/**
+ * Represents the reason (explanation), why the binding cannot be found.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public class NotFoundReason
+ implements IDLEntity
+{
+ /**
+ * Use serialVersionUID (v1.4) for interoperability.
+ */
+ private static final long serialVersionUID = -5689237060527596081L;
+
+ /**
+ * The code for reason, when the node is missing.
+ */
+ public static final int _missing_node = 0;
+
+ /**
+ * The code for reason, when the binding type is object when
+ * it should be a context.
+ */
+ public static final int _not_context = 1;
+
+ /**
+ * The code for reason, when the binding type is context when
+ * it should be an object.
+ */
+ public static final int _not_object = 2;
+
+ /**
+ * The reason, when the node is missing.
+ */
+ public static final NotFoundReason missing_node =
+ new NotFoundReason(_missing_node);
+
+ /**
+ * The reason, when the binding type is object when it should be
+ * a context.
+ */
+ public static final NotFoundReason not_context =
+ new NotFoundReason(_not_context);
+
+ /**
+ * The reason, when the binding type is context when it should be
+ * and object.
+ */
+ public static final NotFoundReason not_object =
+ new NotFoundReason(_not_object);
+
+ /**
+ * The reason code for this instance.
+ */
+ private int value;
+
+ protected NotFoundReason(int a_value)
+ {
+ value = a_value;
+ }
+
+ /**
+ * Get the reason object from the reason code.
+ *
+ * @throws BAD_PARAM for unsupported code.
+ */
+ public static NotFoundReason from_int(int value)
+ {
+ switch (value)
+ {
+ case _missing_node :
+ return missing_node;
+
+ case _not_context :
+ return not_context;
+
+ case _not_object :
+ return not_object;
+
+ default :
+ throw new BAD_PARAM("Unsupported not found reason: " + value);
+ }
+ }
+
+ /**
+ * Get the reason code for this reason of not finding.
+ */
+ public int value()
+ {
+ return value;
+ }
+} \ No newline at end of file
diff --git a/libjava/classpath/org/omg/CosNaming/NamingContextPackage/NotFoundReasonHelper.java b/libjava/classpath/org/omg/CosNaming/NamingContextPackage/NotFoundReasonHelper.java
new file mode 100644
index 00000000000..b6eacf85f90
--- /dev/null
+++ b/libjava/classpath/org/omg/CosNaming/NamingContextPackage/NotFoundReasonHelper.java
@@ -0,0 +1,128 @@
+/* NotFoundReasonHelper.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.CosNaming.NamingContextPackage;
+
+import org.omg.CORBA.Any;
+import org.omg.CORBA.BAD_OPERATION;
+import org.omg.CORBA.ORB;
+import org.omg.CORBA.TypeCode;
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+
+/**
+ * The helper operations for {@link NotFoundReason}
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public abstract class NotFoundReasonHelper
+{
+ /**
+ * The {@link AlreadyBound} repository id.
+ */
+ private static String _id =
+ "IDL:omg.org/CosNaming/NamingContext/NotFoundReason:1.0";
+
+ /**
+ * The cached type code value.
+ */
+ private static TypeCode typeCode;
+
+ /**
+ * Extract the exception from the given {@link Any}.
+ */
+ public static NotFoundReason extract(Any a)
+ {
+ try
+ {
+ return ((NotFoundReasonHolder) a.extract_Streamable()).value;
+ }
+ catch (ClassCastException ex)
+ {
+ throw new BAD_OPERATION();
+ }
+ }
+
+ /**
+ * Return the exception repository id.
+ */
+ public static String id()
+ {
+ return _id;
+ }
+
+ /**
+ * Insert the exception into the given {@link Any}.
+ */
+ public static void insert(Any a, NotFoundReason that)
+ {
+ a.insert_Streamable(new NotFoundReasonHolder(that));
+ }
+
+ /**
+ * Read the exception from the given CDR stream.
+ */
+ public static NotFoundReason read(InputStream istream)
+ {
+ return NotFoundReason.from_int(istream.read_long());
+ }
+
+ /**
+ * Create the type code for this exception.
+ */
+ public static TypeCode type()
+ {
+ if (typeCode == null)
+ typeCode =
+ ORB.init().create_enum_tc(id(), "NotFoundReason",
+ new String[]
+ {
+ "missing_node", "not_context", "not_object"
+ }
+ );
+ return typeCode;
+ }
+
+ /**
+ * Write the exception to the CDR output stream.
+ */
+ public static void write(OutputStream ostream, NotFoundReason value)
+ {
+ ostream.write_long(value.value());
+ }
+}
diff --git a/libjava/classpath/org/omg/CosNaming/NamingContextPackage/NotFoundReasonHolder.java b/libjava/classpath/org/omg/CosNaming/NamingContextPackage/NotFoundReasonHolder.java
new file mode 100644
index 00000000000..fc41b183392
--- /dev/null
+++ b/libjava/classpath/org/omg/CosNaming/NamingContextPackage/NotFoundReasonHolder.java
@@ -0,0 +1,98 @@
+/* NotFoundReasonHolder.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.CosNaming.NamingContextPackage;
+
+import org.omg.CORBA.TypeCode;
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+import org.omg.CORBA.portable.Streamable;
+
+/**
+* The holder for class {@link NotFoundReason}.
+*
+* @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+*/
+public final class NotFoundReasonHolder
+ implements Streamable
+{
+ /**
+ * The stored value.
+ */
+ public NotFoundReason value;
+
+ /**
+ * Create the holder with unitialized value.
+ */
+ public NotFoundReasonHolder()
+ {
+ }
+
+ /**
+ * Create the holder, storing the given intial value.
+ */
+ public NotFoundReasonHolder(NotFoundReason initialValue)
+ {
+ value = initialValue;
+ }
+
+ /**
+ * Read the holder from the CDR input stream.
+ */
+ public void _read(InputStream in)
+ {
+ value = NotFoundReasonHelper.read(in);
+ }
+
+ /**
+ * Get the type code of {@link NotFoundReason}.
+ * @return
+ */
+ public TypeCode _type()
+ {
+ return NotFoundReasonHelper.type();
+ }
+
+ /**
+ * Write the holder to the CDR output stream.
+ */
+ public void _write(OutputStream out)
+ {
+ NotFoundReasonHelper.write(out, value);
+ }
+}
diff --git a/libjava/classpath/org/omg/CosNaming/NamingContextPackage/package.html b/libjava/classpath/org/omg/CosNaming/NamingContextPackage/package.html
new file mode 100644
index 00000000000..37c56e255cd
--- /dev/null
+++ b/libjava/classpath/org/omg/CosNaming/NamingContextPackage/package.html
@@ -0,0 +1,46 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
+<!-- package.html - describes classes in org.omg.CosNaming.NamingContextPackage
+ 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.CosNaming.NamingContextExtPackage</title></head>
+
+<body>
+<p>Provides exceptions and several other satelitte classes, needed by the naming service.</p>
+
+</body>
+</html>
diff --git a/libjava/classpath/org/omg/CosNaming/_BindingIteratorImplBase.java b/libjava/classpath/org/omg/CosNaming/_BindingIteratorImplBase.java
new file mode 100644
index 00000000000..53c0dd3a656
--- /dev/null
+++ b/libjava/classpath/org/omg/CosNaming/_BindingIteratorImplBase.java
@@ -0,0 +1,136 @@
+/* _BindingIteratorImplBase.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.CosNaming;
+
+import org.omg.CORBA.BAD_OPERATION;
+import org.omg.CORBA.BooleanHolder;
+import org.omg.CORBA.CompletionStatus;
+import org.omg.CORBA.DynamicImplementation;
+import org.omg.CORBA.ServerRequest;
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.InvokeHandler;
+import org.omg.CORBA.portable.OutputStream;
+import org.omg.CORBA.portable.ResponseHandler;
+import org.omg.CORBA.portable.Streamable;
+
+/**
+ * The binding iterator implementation base.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public abstract class _BindingIteratorImplBase
+ extends DynamicImplementation
+ implements BindingIterator, InvokeHandler
+{
+ /**
+ * Use serialVersionUID (v1.4) for interoperability.
+ */
+ private static final long serialVersionUID = 3472591176635005503L;
+
+ /**
+ * The binding interator repository id.
+ */
+ private static String[] ids = { BindingIteratorHelper.id() };
+
+ /**
+ * Return the list of repository ids.
+ */
+ public String[] _ids()
+ {
+ return ids;
+ }
+
+ /**
+ * Call the required method.
+ */
+ public OutputStream _invoke(String method, InputStream in, ResponseHandler rh)
+ {
+ OutputStream out = null;
+
+ // We suppose that the next_n should be the most popular.
+ if (method.equals("next_n"))
+ {
+ // The next_n has been invoked.
+ int amount = in.read_ulong();
+ BindingListHolder a_list = new BindingListHolder();
+
+ boolean result = next_n(amount, a_list);
+
+ out = rh.createReply();
+ out.write_boolean(result);
+ BindingListHelper.write(out, a_list.value);
+ }
+ else if (method.equals("next_one"))
+ {
+ // The next_one has been invoked.
+ BindingHolder a_binding = new BindingHolder();
+
+ boolean result = next_one(a_binding);
+
+ out = rh.createReply();
+ out.write_boolean(result);
+ BindingHelper.write(out, a_binding.value);
+ }
+ else if (method.equals("destroy"))
+ {
+ // The destroy has been invoked.
+ destroy();
+ out = rh.createReply();
+ }
+ else
+ throw new BAD_OPERATION(method, 0, CompletionStatus.COMPLETED_MAYBE);
+
+ return out;
+ }
+
+ /**
+ * The obsolete invocation using server request. Implemented for
+ * compatibility reasons, but is it more effectinve to use
+ * {@link #_invoke}.
+ *
+ * @param request a server request.
+ */
+ public void invoke(ServerRequest request)
+ {
+ // "destroy" has a void return type, the two other methods - boolean.
+ Streamable result =
+ request.operation().equals("destroy") ? null : new BooleanHolder();
+ gnu.CORBA.ServiceRequestAdapter.invoke(request, this, result);
+ }
+} \ No newline at end of file
diff --git a/libjava/classpath/org/omg/CosNaming/_BindingIteratorStub.java b/libjava/classpath/org/omg/CosNaming/_BindingIteratorStub.java
new file mode 100644
index 00000000000..487b2efe356
--- /dev/null
+++ b/libjava/classpath/org/omg/CosNaming/_BindingIteratorStub.java
@@ -0,0 +1,203 @@
+/* _BindingIteratorStub.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.CosNaming;
+
+import org.omg.CORBA.MARSHAL;
+import org.omg.CORBA.portable.ApplicationException;
+import org.omg.CORBA.portable.Delegate;
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.ObjectImpl;
+import org.omg.CORBA.portable.OutputStream;
+import org.omg.CORBA.portable.RemarshalException;
+
+/**
+ * The binding interator stub (proxy), used on the client side.
+ * The BindingIterator methods contains the code for remote invocaton.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public class _BindingIteratorStub
+ extends ObjectImpl
+ implements BindingIterator
+{
+ /**
+ * Use serialVersionUID (v1.4) for interoperability.
+ */
+ private static final long serialVersionUID = 8969257760771186704L;
+
+ /**
+ * The object can be destroyed only once.
+ */
+ private boolean destroyed;
+
+ /**
+ * Create the stub.
+ */
+ public _BindingIteratorStub()
+ {
+ super();
+ }
+
+ /**
+ * Create the stub that used the given delegate.
+ */
+ public _BindingIteratorStub(Delegate delegate)
+ {
+ super();
+ _set_delegate(delegate);
+ }
+
+ /**
+ * Get an array of repository ids for this object.
+ */
+ public String[] _ids()
+ {
+ return new String[] { BindingIteratorHelper.id() };
+ }
+
+ /**
+ * Returns true if the object has been destroyed.
+ */
+ public boolean _non_existent()
+ {
+ return destroyed;
+ }
+
+ /**
+ * Destroys the object on the server side.
+ * The destruction message is sent only once, even if the method is
+ * called repeatedly.
+ */
+ public void destroy()
+ {
+ if (destroyed)
+ return;
+
+ InputStream _in = null;
+ try
+ {
+ OutputStream _out = _request("destroy", true);
+ _in = _invoke(_out);
+ destroyed = true;
+ }
+ catch (ApplicationException _ex)
+ {
+ _in = _ex.getInputStream();
+ throw new MARSHAL(_ex.getId());
+ }
+ catch (RemarshalException _rm)
+ {
+ destroy();
+ }
+ finally
+ {
+ _releaseReply(_in);
+ }
+ }
+
+ /** {@inheritDoc} */
+ public boolean next_n(int amount, BindingListHolder a_list)
+ {
+ InputStream _in = null;
+ try
+ {
+ OutputStream _out = _request("next_n", true);
+ _out.write_ulong(amount);
+ _in = _invoke(_out);
+
+ boolean result = _in.read_boolean();
+ a_list.value = BindingListHelper.read(_in);
+ return result;
+ }
+ catch (ApplicationException _ex)
+ {
+ _in = _ex.getInputStream();
+ throw new MARSHAL(_ex.getId());
+ }
+ catch (RemarshalException _rm)
+ {
+ return next_n(amount, a_list);
+ }
+ finally
+ {
+ _releaseReply(_in);
+ }
+ }
+
+ /** {@inheritDoc} */
+ public boolean next_one(BindingHolder a_binding)
+ {
+ InputStream _in = null;
+ try
+ {
+ OutputStream _out = _request("next_one", true);
+ _in = _invoke(_out);
+
+ boolean result = _in.read_boolean();
+ a_binding.value = BindingHelper.read(_in);
+ return result;
+ }
+ catch (ApplicationException _ex)
+ {
+ _in = _ex.getInputStream();
+ throw new MARSHAL(_ex.getId());
+ }
+ catch (RemarshalException _rm)
+ {
+ return next_one(a_binding);
+ }
+ finally
+ {
+ _releaseReply(_in);
+ }
+ }
+
+ /**
+ * Destroys the iterator instance on the server side, calling
+ * {@link #destroy()}.
+ *
+ * @throws java.lang.Throwable
+ */
+ protected void finalize()
+ throws java.lang.Throwable
+ {
+ destroy();
+ super.finalize();
+ }
+} \ No newline at end of file
diff --git a/libjava/classpath/org/omg/CosNaming/_NamingContextExtImplBase.java b/libjava/classpath/org/omg/CosNaming/_NamingContextExtImplBase.java
new file mode 100644
index 00000000000..ae818ddf554
--- /dev/null
+++ b/libjava/classpath/org/omg/CosNaming/_NamingContextExtImplBase.java
@@ -0,0 +1,237 @@
+/* _NamingContextExtImplBase.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.CosNaming;
+
+import org.omg.CORBA.ObjectHolder;
+import org.omg.CORBA.ServerRequest;
+import org.omg.CORBA.StringHolder;
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.InvokeHandler;
+import org.omg.CORBA.portable.OutputStream;
+import org.omg.CORBA.portable.ResponseHandler;
+import org.omg.CORBA.portable.Streamable;
+import org.omg.CosNaming.NamingContextExtPackage.InvalidAddress;
+import org.omg.CosNaming.NamingContextExtPackage.InvalidAddressHelper;
+import org.omg.CosNaming.NamingContextPackage.CannotProceed;
+import org.omg.CosNaming.NamingContextPackage.CannotProceedHelper;
+import org.omg.CosNaming.NamingContextPackage.InvalidName;
+import org.omg.CosNaming.NamingContextPackage.InvalidNameHelper;
+import org.omg.CosNaming.NamingContextPackage.NotFound;
+import org.omg.CosNaming.NamingContextPackage.NotFoundHelper;
+
+import java.util.Hashtable;
+
+/**
+ * The extended naming context implementation base.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public abstract class _NamingContextExtImplBase
+ extends _NamingContextImplBase
+ implements NamingContextExt, InvokeHandler
+{
+ private static Hashtable _methods = new Hashtable();
+
+ static
+ {
+ _methods.put("to_string", new java.lang.Integer(0));
+ _methods.put("to_name", new java.lang.Integer(1));
+ _methods.put("to_url", new java.lang.Integer(2));
+ _methods.put("resolve_str", new java.lang.Integer(3));
+ }
+
+ /**
+ * This stub can be the base of the two CORBA objects, so it
+ * has two repository ids.
+ */
+ private static String[] __ids =
+ { NamingContextExtHelper.id(), NamingContextHelper.id() };
+
+ /**
+ * Return the array of repository ids for this object.
+ * This stub can be the base of the two CORBA objects, so it
+ * has two repository ids, for {@link NamingContext} and
+ * for {@link NamingContextExt}.
+ */
+ public String[] _ids()
+ {
+ return __ids;
+ }
+
+ public OutputStream _invoke(String method, InputStream in, ResponseHandler rh)
+ {
+ Integer call_method = (Integer) _methods.get(method);
+
+ if (call_method == null)
+
+ // The older methods are handled by the parent class.
+ return super._invoke(method, in, rh);
+
+ OutputStream out = null;
+
+ switch (call_method.intValue())
+ {
+ case 0 : // to_string
+ {
+ try
+ {
+ NameComponent[] a_name = NameHelper.read(in);
+ String result = null;
+ result = this.to_string(a_name);
+ out = rh.createReply();
+ out.write_string(result);
+ }
+ catch (InvalidName ex)
+ {
+ out = rh.createExceptionReply();
+ InvalidNameHelper.write(out, ex);
+ }
+ break;
+ }
+
+ case 1 : // to_name
+ {
+ try
+ {
+ String a_name_string = in.read_string();
+ NameComponent[] result = to_name(a_name_string);
+ out = rh.createReply();
+ NameHelper.write(out, result);
+ }
+ catch (InvalidName ex)
+ {
+ out = rh.createExceptionReply();
+ InvalidNameHelper.write(out, ex);
+ }
+ break;
+ }
+
+ case 2 : // to_url
+ {
+ try
+ {
+ String an_address = in.read_string();
+ String a_name_string = in.read_string();
+ String result = to_url(an_address, a_name_string);
+ out = rh.createReply();
+ out.write_string(result);
+ }
+ catch (InvalidAddress ex)
+ {
+ out = rh.createExceptionReply();
+ InvalidAddressHelper.write(out, ex);
+ }
+ catch (InvalidName ex)
+ {
+ out = rh.createExceptionReply();
+ InvalidNameHelper.write(out, ex);
+ }
+ break;
+ }
+
+ case 3 : // resolve_str
+ {
+ try
+ {
+ String a_name_string = in.read_string();
+ org.omg.CORBA.Object result = resolve_str(a_name_string);
+ out = rh.createReply();
+ org.omg.CORBA.ObjectHelper.write(out, result);
+ }
+ catch (NotFound ex)
+ {
+ out = rh.createExceptionReply();
+ NotFoundHelper.write(out, ex);
+ }
+ catch (CannotProceed ex)
+ {
+ out = rh.createExceptionReply();
+ CannotProceedHelper.write(out, ex);
+ }
+ catch (InvalidName ex)
+ {
+ out = rh.createExceptionReply();
+ InvalidNameHelper.write(out, ex);
+ }
+ break;
+ }
+ }
+ return out;
+ }
+
+ /**
+ * The obsolete invocation using server request. Implemented for
+ * compatibility reasons, but is it more effectinve to use
+ * {@link #_invoke}.
+ *
+ * @param request a server request.
+ */
+ public void invoke(ServerRequest request)
+ {
+ Streamable result = null;
+
+ Integer call_method = (Integer) _methods.get(request.operation());
+
+ if (call_method == null)
+ {
+ super.invoke(request);
+ return;
+ }
+
+ switch (call_method.intValue())
+ {
+ case 0 : // to_string, String
+ result = new StringHolder();
+ break;
+
+ case 1 : // to_name, Name
+ result = new NameHolder();
+ break;
+
+ case 2 : // to_url, String
+ result = new StringHolder();
+ break;
+
+ case 3 : // resolve_str, Object
+ result = new ObjectHolder();
+ break;
+ }
+ gnu.CORBA.ServiceRequestAdapter.invoke(request, this, result);
+ }
+} \ No newline at end of file
diff --git a/libjava/classpath/org/omg/CosNaming/_NamingContextExtStub.java b/libjava/classpath/org/omg/CosNaming/_NamingContextExtStub.java
new file mode 100644
index 00000000000..3ad77203084
--- /dev/null
+++ b/libjava/classpath/org/omg/CosNaming/_NamingContextExtStub.java
@@ -0,0 +1,210 @@
+/* _NamingContextExtStub.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.CosNaming;
+
+import gnu.CORBA.NamingService.snConverter;
+
+import org.omg.CORBA.MARSHAL;
+import org.omg.CORBA.ObjectHelper;
+import org.omg.CORBA.portable.ApplicationException;
+import org.omg.CORBA.portable.Delegate;
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+import org.omg.CORBA.portable.RemarshalException;
+import org.omg.CosNaming.NamingContextExtPackage.AddressHelper;
+import org.omg.CosNaming.NamingContextExtPackage.InvalidAddress;
+import org.omg.CosNaming.NamingContextExtPackage.InvalidAddressHelper;
+import org.omg.CosNaming.NamingContextExtPackage.StringNameHelper;
+import org.omg.CosNaming.NamingContextExtPackage.URLStringHelper;
+import org.omg.CosNaming.NamingContextPackage.CannotProceed;
+import org.omg.CosNaming.NamingContextPackage.InvalidName;
+import org.omg.CosNaming.NamingContextPackage.InvalidNameHelper;
+import org.omg.CosNaming.NamingContextPackage.NotFound;
+
+/**
+ * The extended naming context stub (proxy), used on the client side.
+ * The most of the {@link NamingContextExt} methods contain the code
+ * for remote invocaton. However as remote invocation is potencially an
+ * expensive step, some trivial methods, not requiring access to the
+ * naming database, are handled locally (see the method descriptions for
+ * details).
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public class _NamingContextExtStub
+ extends _NamingContextStub
+ implements NamingContextExt
+{
+ /**
+ * Use serialVersionUID (v1.4) for interoperability.
+ */
+ private static final long serialVersionUID = 6333293895664182866L;
+
+ /**
+ * This stub can be the base of the two CORBA objects, so it
+ * has two repository ids.
+ */
+ private static String[] __ids =
+ { NamingContextExtHelper.id(), NamingContextHelper.id() };
+
+ /**
+ * The local name form converter.
+ */
+ private snConverter converter = new snConverter();
+
+ /**
+ * Create the naming context stub.
+ */
+ public _NamingContextExtStub()
+ {
+ super();
+ }
+
+ /**
+ * Create the naming context stub with the given delegate.
+ */
+ public _NamingContextExtStub(Delegate delegate)
+ {
+ super(delegate);
+ }
+
+ /**
+ * Return the array of repository ids for this object.
+ * This stub can be the base of the two CORBA objects, so it
+ * has two repository ids, for {@link NamingContext} and
+ * for {@link NamingContextExt}.
+ */
+ public String[] _ids()
+ {
+ return (String[]) __ids.clone();
+ }
+
+ /** {@inheritDoc} */
+ public org.omg.CORBA.Object resolve_str(String a_name_string)
+ throws NotFound, CannotProceed, InvalidName
+ {
+ InputStream in = null;
+ try
+ {
+ OutputStream _out = _request("resolve_str", true);
+ StringNameHelper.write(_out, a_name_string);
+ in = _invoke(_out);
+
+ return ObjectHelper.read(in);
+ }
+ catch (ApplicationException ex)
+ {
+ in = ex.getInputStream();
+
+ String id = ex.getId();
+ throw4(in, id);
+
+ // Should never happen.
+ throw new InternalError();
+ }
+ catch (RemarshalException _rm)
+ {
+ return resolve_str(a_name_string);
+ }
+ finally
+ {
+ _releaseReply(in);
+ }
+ }
+
+ /**
+ * Converts the string name representation into the array
+ * name representation.
+ *
+ * This method is handled locally.
+ */
+ public NameComponent[] to_name(String a_name_string)
+ throws InvalidName
+ {
+ return converter.toName(a_name_string);
+ }
+
+ /**
+ * Convert the name array representation to the name string
+ * representation.
+ *
+ * This method is handled locally.
+ */
+ public String to_string(NameComponent[] a_name)
+ throws InvalidName
+ {
+ return converter.toString(a_name);
+ }
+
+ /** {@inheritDoc} */
+ public String to_url(String an_address, String a_name_string)
+ throws InvalidAddress, InvalidName
+ {
+ InputStream in = null;
+ try
+ {
+ OutputStream _out = _request("to_url", true);
+ AddressHelper.write(_out, an_address);
+ StringNameHelper.write(_out, a_name_string);
+ in = _invoke(_out);
+
+ return URLStringHelper.read(in);
+ }
+ catch (ApplicationException ex)
+ {
+ in = ex.getInputStream();
+
+ String id = ex.getId();
+ if (id.equals(InvalidAddressHelper.id()))
+ throw InvalidAddressHelper.read(in);
+ else if (id.equals(InvalidNameHelper.id()))
+ throw InvalidNameHelper.read(in);
+ else
+ throw new MARSHAL(id);
+ }
+ catch (RemarshalException _rm)
+ {
+ return to_url(an_address, a_name_string);
+ }
+ finally
+ {
+ _releaseReply(in);
+ }
+ }
+} \ No newline at end of file
diff --git a/libjava/classpath/org/omg/CosNaming/_NamingContextImplBase.java b/libjava/classpath/org/omg/CosNaming/_NamingContextImplBase.java
new file mode 100644
index 00000000000..16b17fc5ebe
--- /dev/null
+++ b/libjava/classpath/org/omg/CosNaming/_NamingContextImplBase.java
@@ -0,0 +1,412 @@
+/* _NamingContextImplBase.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.CosNaming;
+
+import org.omg.CORBA.BAD_OPERATION;
+import org.omg.CORBA.CompletionStatus;
+import org.omg.CORBA.DynamicImplementation;
+import org.omg.CORBA.ObjectHelper;
+import org.omg.CORBA.ObjectHolder;
+import org.omg.CORBA.ServerRequest;
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.InvokeHandler;
+import org.omg.CORBA.portable.OutputStream;
+import org.omg.CORBA.portable.ResponseHandler;
+import org.omg.CORBA.portable.Streamable;
+import org.omg.CosNaming.NamingContextPackage.AlreadyBound;
+import org.omg.CosNaming.NamingContextPackage.AlreadyBoundHelper;
+import org.omg.CosNaming.NamingContextPackage.CannotProceed;
+import org.omg.CosNaming.NamingContextPackage.CannotProceedHelper;
+import org.omg.CosNaming.NamingContextPackage.InvalidName;
+import org.omg.CosNaming.NamingContextPackage.InvalidNameHelper;
+import org.omg.CosNaming.NamingContextPackage.NotEmpty;
+import org.omg.CosNaming.NamingContextPackage.NotEmptyHelper;
+import org.omg.CosNaming.NamingContextPackage.NotFound;
+import org.omg.CosNaming.NamingContextPackage.NotFoundHelper;
+
+import java.util.Hashtable;
+
+/**
+ * The naming context implementation base.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public abstract class _NamingContextImplBase
+ extends DynamicImplementation
+ implements NamingContext, InvokeHandler
+{
+ /**
+ * Use serialVersionUID (v1.4) for interoperability.
+ */
+ private static final long serialVersionUID = -114280294134561035L;
+
+ /**
+ * As there are quite many methods, it may be sensible to use the hashtable.
+ */
+ private static Hashtable methods = new Hashtable();
+
+ /**
+ * Put all methods into the table.
+ */
+ static
+ {
+ methods.put("bind", new Integer(0));
+ methods.put("rebind", new Integer(1));
+ methods.put("bind_context", new Integer(2));
+ methods.put("rebind_context", new Integer(3));
+ methods.put("resolve", new Integer(4));
+ methods.put("unbind", new Integer(5));
+ methods.put("new_context", new Integer(6));
+ methods.put("bind_new_context", new Integer(7));
+ methods.put("destroy", new Integer(8));
+ methods.put("list", new Integer(9));
+ }
+
+ /**
+ * Return the array of repository ids.
+ */
+ public String[] _ids()
+ {
+ return new String[] { NamingContextHelper.id() };
+ }
+
+ /**
+ * The server calls this method after receiving the request message
+ * from client. The implementation base calls one of its abstract
+ * methods to perform the requested operation.
+ *
+ * @param method the method being invoked.
+ * @param in the stream to read parameters from.
+ * @param rh the handler to get a stream for writing a response.
+ *
+ * @return the stream, returned by the handler.
+ */
+ public OutputStream _invoke(String method, InputStream in, ResponseHandler rh)
+ {
+ OutputStream out = null;
+ Integer call_method = (Integer) methods.get(method);
+ if (call_method == null)
+ throw new BAD_OPERATION(0, CompletionStatus.COMPLETED_MAYBE);
+
+ switch (call_method.intValue())
+ {
+ case 0 : // bind
+ {
+ try
+ {
+ NameComponent[] a_name = NameHelper.read(in);
+ org.omg.CORBA.Object an_object = ObjectHelper.read(in);
+ bind(a_name, an_object);
+ out = rh.createReply();
+ }
+ catch (NotFound ex)
+ {
+ out = rh.createExceptionReply();
+ NotFoundHelper.write(out, ex);
+ }
+ catch (CannotProceed ex)
+ {
+ out = rh.createExceptionReply();
+ CannotProceedHelper.write(out, ex);
+ }
+ catch (InvalidName ex)
+ {
+ out = rh.createExceptionReply();
+ InvalidNameHelper.write(out, ex);
+ }
+ catch (AlreadyBound ex)
+ {
+ out = rh.createExceptionReply();
+ AlreadyBoundHelper.write(out, ex);
+ }
+ break;
+ }
+
+ case 1 : // rebind
+ {
+ try
+ {
+ NameComponent[] a_name = NameHelper.read(in);
+ org.omg.CORBA.Object an_object = ObjectHelper.read(in);
+ rebind(a_name, an_object);
+ out = rh.createReply();
+ }
+ catch (NotFound ex)
+ {
+ out = rh.createExceptionReply();
+ NotFoundHelper.write(out, ex);
+ }
+ catch (CannotProceed ex)
+ {
+ out = rh.createExceptionReply();
+ CannotProceedHelper.write(out, ex);
+ }
+ catch (InvalidName ex)
+ {
+ out = rh.createExceptionReply();
+ InvalidNameHelper.write(out, ex);
+ }
+ break;
+ }
+
+ case 2 : // bind_context
+ {
+ try
+ {
+ NameComponent[] a_name = NameHelper.read(in);
+ NamingContext a_context = NamingContextHelper.read(in);
+ bind_context(a_name, a_context);
+ out = rh.createReply();
+ }
+ catch (NotFound ex)
+ {
+ out = rh.createExceptionReply();
+ NotFoundHelper.write(out, ex);
+ }
+ catch (CannotProceed ex)
+ {
+ out = rh.createExceptionReply();
+ CannotProceedHelper.write(out, ex);
+ }
+ catch (InvalidName ex)
+ {
+ out = rh.createExceptionReply();
+ InvalidNameHelper.write(out, ex);
+ }
+ catch (AlreadyBound ex)
+ {
+ out = rh.createExceptionReply();
+ AlreadyBoundHelper.write(out, ex);
+ }
+ break;
+ }
+
+ case 3 : // rebind_context
+ {
+ try
+ {
+ NameComponent[] a_name = NameHelper.read(in);
+ NamingContext a_context = NamingContextHelper.read(in);
+ rebind_context(a_name, a_context);
+ out = rh.createReply();
+ }
+ catch (NotFound ex)
+ {
+ out = rh.createExceptionReply();
+ NotFoundHelper.write(out, ex);
+ }
+ catch (CannotProceed ex)
+ {
+ out = rh.createExceptionReply();
+ CannotProceedHelper.write(out, ex);
+ }
+ catch (InvalidName ex)
+ {
+ out = rh.createExceptionReply();
+ InvalidNameHelper.write(out, ex);
+ }
+ break;
+ }
+
+ case 4 : // resolve
+ {
+ try
+ {
+ NameComponent[] a_name = NameHelper.read(in);
+ org.omg.CORBA.Object __result = null;
+ __result = resolve(a_name);
+ out = rh.createReply();
+ ObjectHelper.write(out, __result);
+ }
+ catch (NotFound ex)
+ {
+ out = rh.createExceptionReply();
+ NotFoundHelper.write(out, ex);
+ }
+ catch (CannotProceed ex)
+ {
+ out = rh.createExceptionReply();
+ CannotProceedHelper.write(out, ex);
+ }
+ catch (InvalidName ex)
+ {
+ out = rh.createExceptionReply();
+ InvalidNameHelper.write(out, ex);
+ }
+ break;
+ }
+
+ case 5 : // unbind
+ {
+ try
+ {
+ NameComponent[] a_name = NameHelper.read(in);
+ unbind(a_name);
+ out = rh.createReply();
+ }
+ catch (NotFound ex)
+ {
+ out = rh.createExceptionReply();
+ NotFoundHelper.write(out, ex);
+ }
+ catch (CannotProceed ex)
+ {
+ out = rh.createExceptionReply();
+ CannotProceedHelper.write(out, ex);
+ }
+ catch (InvalidName ex)
+ {
+ out = rh.createExceptionReply();
+ InvalidNameHelper.write(out, ex);
+ }
+ break;
+ }
+
+ case 6 : // new_context
+ {
+ NamingContext __result = null;
+ __result = new_context();
+ out = rh.createReply();
+ NamingContextHelper.write(out, __result);
+ break;
+ }
+
+ case 7 : // bind_new_context
+ {
+ try
+ {
+ NameComponent[] a_name = NameHelper.read(in);
+ NamingContext __result = null;
+ __result = bind_new_context(a_name);
+ out = rh.createReply();
+ NamingContextHelper.write(out, __result);
+ }
+ catch (NotFound ex)
+ {
+ out = rh.createExceptionReply();
+ NotFoundHelper.write(out, ex);
+ }
+ catch (AlreadyBound ex)
+ {
+ out = rh.createExceptionReply();
+ AlreadyBoundHelper.write(out, ex);
+ }
+ catch (CannotProceed ex)
+ {
+ out = rh.createExceptionReply();
+ CannotProceedHelper.write(out, ex);
+ }
+ catch (InvalidName ex)
+ {
+ out = rh.createExceptionReply();
+ InvalidNameHelper.write(out, ex);
+ }
+ break;
+ }
+
+ case 8 : // destroy
+ {
+ try
+ {
+ destroy();
+ out = rh.createReply();
+ }
+ catch (NotEmpty ex)
+ {
+ out = rh.createExceptionReply();
+ NotEmptyHelper.write(out, ex);
+ }
+ break;
+ }
+
+ case 9 : // list
+ {
+ int amount = in.read_ulong();
+ BindingListHolder a_list = new BindingListHolder();
+ BindingIteratorHolder an_iter = new BindingIteratorHolder();
+ list(amount, a_list, an_iter);
+ out = rh.createReply();
+ BindingListHelper.write(out, a_list.value);
+ BindingIteratorHelper.write(out, an_iter.value);
+ break;
+ }
+
+ default :
+ throw new BAD_OPERATION(0, CompletionStatus.COMPLETED_MAYBE);
+ }
+
+ return out;
+ }
+
+ /**
+ * The obsolete invocation using server request. Implemented for
+ * compatibility reasons, but is it more effectinve to use
+ * {@link #_invoke}.
+ *
+ * @param request a server request.
+ */
+ public void invoke(ServerRequest request)
+ {
+ Streamable result = null;
+
+ // The server request contains no required result type.
+ Integer call_method = (Integer) methods.get(request.operation());
+ if (call_method == null)
+ throw new BAD_OPERATION(0, CompletionStatus.COMPLETED_MAYBE);
+
+ switch (call_method.intValue())
+ {
+ case 4 : // resolve, object
+ result = new ObjectHolder();
+ break;
+
+ case 6 : // new_context, NamingContext
+ case 7 : // bind_new_context, NamingContext
+ {
+ result = new NamingContextHolder();
+ break;
+ }
+
+ default : // void for others.
+ result = null;
+ }
+
+ gnu.CORBA.ServiceRequestAdapter.invoke(request, this, result);
+ }
+} \ No newline at end of file
diff --git a/libjava/classpath/org/omg/CosNaming/_NamingContextStub.java b/libjava/classpath/org/omg/CosNaming/_NamingContextStub.java
new file mode 100644
index 00000000000..d561aeb48a7
--- /dev/null
+++ b/libjava/classpath/org/omg/CosNaming/_NamingContextStub.java
@@ -0,0 +1,455 @@
+/* _NamingContextStub.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.CosNaming;
+
+import org.omg.CORBA.MARSHAL;
+import org.omg.CORBA.ORB;
+import org.omg.CORBA.ObjectHelper;
+import org.omg.CORBA.portable.ApplicationException;
+import org.omg.CORBA.portable.Delegate;
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.ObjectImpl;
+import org.omg.CORBA.portable.OutputStream;
+import org.omg.CORBA.portable.RemarshalException;
+import org.omg.CosNaming.NamingContextPackage.AlreadyBound;
+import org.omg.CosNaming.NamingContextPackage.AlreadyBoundHelper;
+import org.omg.CosNaming.NamingContextPackage.CannotProceed;
+import org.omg.CosNaming.NamingContextPackage.CannotProceedHelper;
+import org.omg.CosNaming.NamingContextPackage.InvalidName;
+import org.omg.CosNaming.NamingContextPackage.InvalidNameHelper;
+import org.omg.CosNaming.NamingContextPackage.NotEmpty;
+import org.omg.CosNaming.NamingContextPackage.NotEmptyHelper;
+import org.omg.CosNaming.NamingContextPackage.NotFound;
+import org.omg.CosNaming.NamingContextPackage.NotFoundHelper;
+
+/**
+ * The naming context stub (proxy), used on the client side.
+ * The {@link NamingContext} methods contain the code for remote
+ * invocaton.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public class _NamingContextStub
+ extends ObjectImpl
+ implements NamingContext
+{
+ /**
+ * Use serialVersionUID (v1.4) for interoperability.
+ */
+ private static final long serialVersionUID = 6835430958405349379L;
+
+ /**
+ * Create the naming context stub.
+ */
+ public _NamingContextStub()
+ {
+ super();
+ }
+
+ /**
+ * Create the naming context stub with the given delegate.
+ */
+ public _NamingContextStub(Delegate delegate)
+ {
+ super();
+ _set_delegate(delegate);
+ }
+
+ /**
+ * Return the array of repository ids for this object.
+ */
+ public String[] _ids()
+ {
+ return new String[] { NamingContextHelper.id() };
+ }
+
+ /** {@inheritDoc} */
+ public void bind(NameComponent[] a_name, org.omg.CORBA.Object an_object)
+ throws NotFound, CannotProceed, InvalidName, AlreadyBound
+ {
+ InputStream in = null;
+ try
+ {
+ OutputStream out = _request("bind", true);
+ NameHelper.write(out, a_name);
+ ObjectHelper.write(out, an_object);
+ in = _invoke(out);
+ }
+ catch (ApplicationException ex)
+ {
+ in = ex.getInputStream();
+
+ String id = ex.getId();
+ throw5(in, id);
+ }
+ catch (RemarshalException remarsh)
+ {
+ bind(a_name, an_object);
+ }
+ finally
+ {
+ _releaseReply(in);
+ }
+ }
+
+ /** {@inheritDoc} */
+ public void bind_context(NameComponent[] a_name, NamingContext a_context)
+ throws NotFound, CannotProceed, InvalidName, AlreadyBound
+ {
+ InputStream in = null;
+ try
+ {
+ OutputStream out = _request("bind_context", true);
+ NameHelper.write(out, a_name);
+ NamingContextHelper.write(out, a_context);
+ in = _invoke(out);
+ }
+ catch (ApplicationException ex)
+ {
+ in = ex.getInputStream();
+
+ String id = ex.getId();
+ throw5(in, id);
+ }
+ catch (RemarshalException remarsh)
+ {
+ bind_context(a_name, a_context);
+ }
+ finally
+ {
+ _releaseReply(in);
+ }
+ }
+
+ /** {@inheritDoc} */
+ public NamingContext bind_new_context(NameComponent[] a_name)
+ throws NotFound, AlreadyBound, CannotProceed,
+ InvalidName
+ {
+ InputStream in = null;
+ try
+ {
+ OutputStream out = _request("bind_new_context", true);
+ NameHelper.write(out, a_name);
+ in = _invoke(out);
+
+ NamingContext __result = NamingContextHelper.read(in);
+ return __result;
+ }
+ catch (ApplicationException ex)
+ {
+ in = ex.getInputStream();
+
+ String id = ex.getId();
+ throw5(in, id);
+ throw new InternalError();
+ }
+ catch (RemarshalException remarsh)
+ {
+ return bind_new_context(a_name);
+ }
+ finally
+ {
+ _releaseReply(in);
+ }
+ }
+
+ /** {@inheritDoc} */
+ public void destroy()
+ throws NotEmpty
+ {
+ InputStream in = null;
+ try
+ {
+ OutputStream out = _request("destroy", true);
+ in = _invoke(out);
+ }
+ catch (ApplicationException ex)
+ {
+ in = ex.getInputStream();
+
+ String id = ex.getId();
+ if (id.equals(NotEmptyHelper.id()))
+ throw NotEmptyHelper.read(in);
+ else
+ throw new MARSHAL(id);
+ }
+ catch (RemarshalException remarsh)
+ {
+ destroy();
+ }
+ finally
+ {
+ _releaseReply(in);
+ }
+ }
+
+ /** {@inheritDoc} */
+ public void list(int amount, BindingListHolder a_list,
+ BindingIteratorHolder an_iter
+ )
+ {
+ InputStream in = null;
+ try
+ {
+ OutputStream out = _request("list", true);
+ out.write_ulong(amount);
+ in = _invoke(out);
+ a_list.value = BindingListHelper.read(in);
+ an_iter.value = BindingIteratorHelper.read(in);
+ }
+ catch (ApplicationException ex)
+ {
+ in = ex.getInputStream();
+ throw new MARSHAL(ex.getId());
+ }
+ catch (RemarshalException remarsh)
+ {
+ list(amount, a_list, an_iter);
+ }
+ finally
+ {
+ _releaseReply(in);
+ }
+ }
+
+ /** {@inheritDoc} */
+ public NamingContext new_context()
+ {
+ InputStream in = null;
+ try
+ {
+ OutputStream out = _request("new_context", true);
+ in = _invoke(out);
+
+ NamingContext __result = NamingContextHelper.read(in);
+ return __result;
+ }
+ catch (ApplicationException ex)
+ {
+ in = ex.getInputStream();
+ throw new MARSHAL(ex.getId());
+ }
+ catch (RemarshalException remarsh)
+ {
+ return new_context();
+ }
+ finally
+ {
+ _releaseReply(in);
+ }
+ }
+
+ /** {@inheritDoc} */
+ public void rebind(NameComponent[] a_name, org.omg.CORBA.Object an_object)
+ throws NotFound, CannotProceed, InvalidName
+ {
+ InputStream in = null;
+ try
+ {
+ OutputStream out = _request("rebind", true);
+ NameHelper.write(out, a_name);
+ ObjectHelper.write(out, an_object);
+ in = _invoke(out);
+ }
+ catch (ApplicationException ex)
+ {
+ in = ex.getInputStream();
+
+ String id = ex.getId();
+ throw4(in, id);
+ }
+ catch (RemarshalException remarsh)
+ {
+ rebind(a_name, an_object);
+ }
+ finally
+ {
+ _releaseReply(in);
+ }
+ }
+
+ /** {@inheritDoc} */
+ public void rebind_context(NameComponent[] a_name, NamingContext a_context)
+ throws NotFound, CannotProceed, InvalidName
+ {
+ InputStream in = null;
+ try
+ {
+ OutputStream out = _request("rebind_context", true);
+ NameHelper.write(out, a_name);
+ NamingContextHelper.write(out, a_context);
+ in = _invoke(out);
+ }
+ catch (ApplicationException ex)
+ {
+ in = ex.getInputStream();
+
+ String id = ex.getId();
+ throw4(in, id);
+ }
+ catch (RemarshalException remarsh)
+ {
+ rebind_context(a_name, a_context);
+ }
+ finally
+ {
+ _releaseReply(in);
+ }
+ }
+
+ /** {@inheritDoc} */
+ public org.omg.CORBA.Object resolve(NameComponent[] a_name)
+ throws NotFound, CannotProceed, InvalidName
+ {
+ InputStream in = null;
+ try
+ {
+ OutputStream out = _request("resolve", true);
+ NameHelper.write(out, a_name);
+ in = _invoke(out);
+
+ org.omg.CORBA.Object __result = ObjectHelper.read(in);
+ return __result;
+ }
+ catch (ApplicationException ex)
+ {
+ in = ex.getInputStream();
+
+ String id = ex.getId();
+ throw4(in, id);
+ throw new InternalError();
+ }
+ catch (RemarshalException remarsh)
+ {
+ return resolve(a_name);
+ }
+ finally
+ {
+ _releaseReply(in);
+ }
+ }
+
+ /** {@inheritDoc} */
+ public void unbind(NameComponent[] a_name)
+ throws NotFound, CannotProceed, InvalidName
+ {
+ InputStream in = null;
+ try
+ {
+ OutputStream out = _request("unbind", true);
+ NameHelper.write(out, a_name);
+ in = _invoke(out);
+ }
+ catch (ApplicationException ex)
+ {
+ in = ex.getInputStream();
+
+ String id = ex.getId();
+ if (id.equals(NotFoundHelper.id()))
+ throw NotFoundHelper.read(in);
+ else if (id.equals(CannotProceedHelper.id()))
+ throw CannotProceedHelper.read(in);
+ else if (id.equals(InvalidNameHelper.id()))
+ throw InvalidNameHelper.read(in);
+ else
+ throw new MARSHAL(id);
+ }
+ catch (RemarshalException remarsh)
+ {
+ unbind(a_name);
+ }
+ finally
+ {
+ _releaseReply(in);
+ }
+ }
+
+ /**
+ * Throw one of the three possible exceptions, as specified in
+ * the passed exception repository id.
+ *
+ * This method should never return normally.
+ *
+ * @param in the stream to read the exception from.
+ * @param id the exception id.
+ *
+ * @throws InvalidName if the id matches.
+ * @throws CannotProceed if the id matches.
+ * @throws NotFound if the id matches.
+ * @throws MARSHAL if the id does not match any of the previous 4 exceptions.
+ */
+ protected void throw4(InputStream in, String id)
+ throws MARSHAL, InvalidName, CannotProceed, NotFound
+ {
+ if (id.equals(NotFoundHelper.id()))
+ throw NotFoundHelper.read(in);
+ else if (id.equals(CannotProceedHelper.id()))
+ throw CannotProceedHelper.read(in);
+ else if (id.equals(InvalidNameHelper.id()))
+ throw InvalidNameHelper.read(in);
+ else
+ throw new MARSHAL(id);
+ }
+
+ /**
+ * Throw one of the five possible exceptions, as specified in
+ * the passed exception repository id.
+ *
+ * This method should never return normally.
+ *
+ * @param in the stream to read the exception from.
+ * @param id the exception id.
+ *
+ * @throws AlreadyBound if the id matches.
+ * @throws InvalidName if the id matches.
+ * @throws CannotProceed if the id matches.
+ * @throws NotFound if the id matches.
+ * @throws MARSHAL if the id does not match any of the previous 4 exceptions.
+ */
+ protected void throw5(InputStream in, String id)
+ throws MARSHAL, AlreadyBound, InvalidName, CannotProceed,
+ NotFound
+ {
+ if (id.equals(AlreadyBoundHelper.id()))
+ throw AlreadyBoundHelper.read(in);
+ else
+ throw4(in, id);
+ }
+} \ No newline at end of file
diff --git a/libjava/classpath/org/omg/CosNaming/package.html b/libjava/classpath/org/omg/CosNaming/package.html
new file mode 100644
index 00000000000..69dc0bf8e22
--- /dev/null
+++ b/libjava/classpath/org/omg/CosNaming/package.html
@@ -0,0 +1,50 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
+<!-- package.html - the naming service description.
+ Copyright (C) 2002 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 - javax.swing.text.html.parser</title></head>
+
+<body>
+<p>
+The COS (Common Object Service) Naming Service allows an object to be found from its symbolic name. The client obtains the object reference invoking the naming service as any other CORBA service. The naming service itself can be located from the stringified object reference (see {@link org.omg.CORBA.ORB#string_to_object(String)} or from the ORB pre-configured data by passing &quot;NameService&quot; to {@link org.omg.CORBA.ORB.Object#resolve_initial_references(String)}. The returned object is casted to the NamingContextExt using {@link org.omg.CosNaming.NamingContextExtHelper#narrow}. The Naming Service can reside on any host accessible within the network.
+</p><p>
+The default pre-configured location method uses two parameters (properties, applet parameters or command line parameters): org.omg.CORBA.ORBInitialHost and org.omg.CORBA.ORBInitialPort. If these parameters are missing, the naming service is supposed to be running at port 900 on the local host.
+</p>
+@author Audrius Meskauskas, Lithuania
+</body>
+</html>
diff --git a/libjava/classpath/org/omg/Dynamic/Parameter.java b/libjava/classpath/org/omg/Dynamic/Parameter.java
new file mode 100644
index 00000000000..dd42c2e0a87
--- /dev/null
+++ b/libjava/classpath/org/omg/Dynamic/Parameter.java
@@ -0,0 +1,90 @@
+/* Parameter.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.Dynamic;
+
+import org.omg.CORBA.Any;
+import org.omg.CORBA.ParameterMode;
+import org.omg.CORBA.portable.IDLEntity;
+
+import java.io.Serializable;
+
+/**
+ * When representing the information about a request,
+ * defines a one of the arguments for the operation being invoked.
+ *
+ * @see org.omg.PortableInterceptor.RequestInfoOperation#arguments()
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public class Parameter
+ implements IDLEntity, Serializable
+{
+ /**
+ * Use serialVersionUID (v1.4) for interoperability.
+ */
+ private static final long serialVersionUID = 892191606993734699L;
+
+ /**
+ * The {@link Any}, holding the value of the parameter.
+ */
+ public Any argument;
+
+ /**
+ * The mode of the parameter. Specifies if the parameter is used
+ * to pass the value to the method, to return the value from the
+ * method or for both of these purposes.
+ */
+ public ParameterMode mode;
+
+ /**
+ * Create the unitialised instance.
+ */
+ public Parameter()
+ {
+ }
+
+ /**
+ * Create an instance, initialising field to the passed values.
+ */
+ public Parameter(Any an_argument, ParameterMode a_mode)
+ {
+ argument = an_argument;
+ mode = a_mode;
+ }
+} \ No newline at end of file
diff --git a/libjava/classpath/org/omg/DynamicAny/DynAnyFactoryPackage/InconsistentTypeCode.java b/libjava/classpath/org/omg/DynamicAny/DynAnyFactoryPackage/InconsistentTypeCode.java
new file mode 100644
index 00000000000..faf3d291dd0
--- /dev/null
+++ b/libjava/classpath/org/omg/DynamicAny/DynAnyFactoryPackage/InconsistentTypeCode.java
@@ -0,0 +1,82 @@
+/* InconsistentTypeCode.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.DynamicAny.DynAnyFactoryPackage;
+
+import org.omg.CORBA.UserException;
+import org.omg.CORBA.portable.IDLEntity;
+
+import java.io.Serializable;
+
+/**
+* The InconsistentTypeCode is thrown on the attempt to create
+* an {@link org.omg.DynamicAny.DynAny} for <code>Principal</code>
+* or <code>native</code> data types. The OMG documentation states
+* that these two types should not be suported by org.omg.DynamicAny
+* package.
+*
+* @see org.omg.DynamicAny.DynAnyOperations
+*
+* @author Audrius Meskauskas, Lithiania (AudriusA@Bioinformatics.org)
+*/
+public class InconsistentTypeCode
+ extends UserException
+ implements IDLEntity, Serializable
+{
+ /**
+ * Use serialVersionUID (v1.4) for interoperability.
+ */
+ private static final long serialVersionUID = 3679785322052655944L;
+
+ /**
+ * Create InconsistentTypeCode with no explaining message.
+ */
+ public InconsistentTypeCode()
+ {
+ }
+
+ /**
+ * Create the InconsistentTypeCode with explaining message.
+ *
+ * @param why a string, explaining, why this exception has been thrown.
+ */
+ public InconsistentTypeCode(String why)
+ {
+ super(why);
+ }
+} \ No newline at end of file
diff --git a/libjava/classpath/org/omg/DynamicAny/DynAnyFactoryPackage/InconsistentTypeCodeHelper.java b/libjava/classpath/org/omg/DynamicAny/DynAnyFactoryPackage/InconsistentTypeCodeHelper.java
new file mode 100644
index 00000000000..c7b54bef89d
--- /dev/null
+++ b/libjava/classpath/org/omg/DynamicAny/DynAnyFactoryPackage/InconsistentTypeCodeHelper.java
@@ -0,0 +1,148 @@
+/* InconsistentTypeCodeHelper.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.DynamicAny.DynAnyFactoryPackage;
+
+import gnu.CORBA.EmptyExceptionHolder;
+
+import org.omg.CORBA.Any;
+import org.omg.CORBA.BAD_OPERATION;
+import org.omg.CORBA.ORB;
+import org.omg.CORBA.StructMember;
+import org.omg.CORBA.TCKind;
+import org.omg.CORBA.TypeCode;
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+
+/**
+* The helper operations for the exception {@link InconsistentTypeCode}.
+*
+* @author Audrius Meskauskas, Lithiania (AudriusA@Bioinformatics.org)
+*/
+public abstract class InconsistentTypeCodeHelper
+{
+ /**
+ * The cached typecode value, computed only once.
+ */
+ private static TypeCode typeCode;
+
+ /**
+ * Create the InconsistentTypeCode typecode (structure,
+ * named "InconsistentTypeCode").
+ */
+ public static TypeCode type()
+ {
+ if (typeCode == null)
+ {
+ ORB orb = ORB.init();
+ StructMember[] members = new StructMember[ 0 ];
+ typeCode =
+ orb.create_exception_tc(id(), "InconsistentTypeCode", members);
+ }
+ return typeCode;
+ }
+
+ /**
+ * Insert the InconsistentTypeCode into the given Any.
+ *
+ * @param any the Any to insert into.
+ * @param that the InconsistentTypeCode to insert.
+ */
+ public static void insert(Any any, InconsistentTypeCode that)
+ {
+ any.insert_Streamable(new EmptyExceptionHolder(that, type()));
+ }
+
+ /**
+ * Extract the InconsistentTypeCode from given Any.
+ *
+ * @throws BAD_OPERATION if the passed Any does not contain
+ * InconsistentTypeCode.
+ */
+ public static InconsistentTypeCode extract(Any any)
+ {
+ try
+ {
+ EmptyExceptionHolder h =
+ (EmptyExceptionHolder) any.extract_Streamable();
+ return (InconsistentTypeCode) h.value;
+ }
+ catch (ClassCastException cex)
+ {
+ BAD_OPERATION bad = new BAD_OPERATION("InconsistentTypeCode expected");
+ bad.initCause(cex);
+ throw bad;
+ }
+ }
+
+ /**
+ * Get the InconsistentTypeCode repository id.
+ *
+ * @return "IDL:omg.org/DynamicAny/DynAnyFactory/InconsistentTypeCode:1.0".
+ */
+ public static String id()
+ {
+ return "IDL:omg.org/DynamicAny/DynAnyFactory/InconsistentTypeCode:1.0";
+ }
+
+ /**
+ * Read the exception from the CDR intput stream.
+ *
+ * @param input a org.omg.CORBA.portable stream to read from.
+ */
+ public static InconsistentTypeCode read(InputStream input)
+ {
+ // Read the exception repository id.
+ String id = input.read_string();
+ InconsistentTypeCode value = new InconsistentTypeCode(id);
+
+ return value;
+ }
+
+ /**
+ * Write the exception to the CDR output stream.
+ *
+ * @param output a org.omg.CORBA.portable stream stream to write into.
+ * @param value a value to write.
+ */
+ public static void write(OutputStream output, InconsistentTypeCode value)
+ {
+ // Write the exception repository id.
+ output.write_string(id());
+ }
+} \ No newline at end of file
diff --git a/libjava/classpath/org/omg/DynamicAny/DynAnyPackage/InvalidValue.java b/libjava/classpath/org/omg/DynamicAny/DynAnyPackage/InvalidValue.java
new file mode 100644
index 00000000000..97f401d0e5e
--- /dev/null
+++ b/libjava/classpath/org/omg/DynamicAny/DynAnyPackage/InvalidValue.java
@@ -0,0 +1,81 @@
+/* InvalidValue.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.DynamicAny.DynAnyPackage;
+
+import org.omg.CORBA.UserException;
+import org.omg.CORBA.portable.IDLEntity;
+
+import java.io.Serializable;
+
+/**
+ * Raised when the operation on DynAny cannot be performed because one of
+ * the parameters, while having the correct type, has the invalid value.
+ * For instance, it is raised in response to the set the array content,
+ * when number of the provided elements mismatch the size of array.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public class InvalidValue
+ extends UserException
+ implements IDLEntity, Serializable
+{
+ /**
+ * Use serialVersionUID (v1.4) for interoperability.
+ */
+ private static final long serialVersionUID = 4928947584617628504L;
+
+ /**
+ * Create InvalidValue with no explaining
+ * message.
+ */
+ public InvalidValue()
+ {
+ }
+
+ /**
+ * Create the InvalidValue with explaining
+ * message.
+ *
+ * @param why a string, explaining, why this exception has been thrown.
+ */
+ public InvalidValue(String why)
+ {
+ super(why);
+ }
+} \ No newline at end of file
diff --git a/libjava/classpath/org/omg/DynamicAny/DynAnyPackage/InvalidValueHelper.java b/libjava/classpath/org/omg/DynamicAny/DynAnyPackage/InvalidValueHelper.java
new file mode 100644
index 00000000000..55e35eedc81
--- /dev/null
+++ b/libjava/classpath/org/omg/DynamicAny/DynAnyPackage/InvalidValueHelper.java
@@ -0,0 +1,149 @@
+/* InvalidValueHelper.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.DynamicAny.DynAnyPackage;
+
+import gnu.CORBA.EmptyExceptionHolder;
+
+import org.omg.CORBA.Any;
+import org.omg.CORBA.BAD_OPERATION;
+import org.omg.CORBA.ORB;
+import org.omg.CORBA.StructMember;
+import org.omg.CORBA.TCKind;
+import org.omg.CORBA.TypeCode;
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+
+/**
+* The helper operations for the exception {@link InvalidValue}.
+*
+* @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+*/
+public abstract class InvalidValueHelper
+{
+ /**
+ * The cached typecode value, computed only once.
+ */
+ private static TypeCode typeCode;
+
+ /**
+ * Create the InvalidValue typecode (structure,
+ * named "InvalidValue").
+ */
+ public static TypeCode type()
+ {
+ if (typeCode == null)
+ {
+ ORB orb = ORB.init();
+ StructMember[] members = new StructMember[ 0 ];
+ typeCode = orb.create_exception_tc(id(), "InvalidValue", members);
+ }
+ return typeCode;
+ }
+
+ /* Every user exception with no user defined
+ fields can use EmptyExceptionHolder */
+
+ /**
+ * Insert the InvalidValue into the given Any.
+ *
+ * @param any the Any to insert into.
+ * @param that the InvalidValue to insert.
+ */
+ public static void insert(Any any, InvalidValue that)
+ {
+ any.insert_Streamable(new EmptyExceptionHolder(that, type()));
+ }
+
+ /**
+ * Extract the InvalidValue from given Any.
+ *
+ * @throws BAD_OPERATION if the passed Any does not contain InvalidValue.
+ */
+ public static InvalidValue extract(Any any)
+ {
+ try
+ {
+ EmptyExceptionHolder h =
+ (EmptyExceptionHolder) any.extract_Streamable();
+ return (InvalidValue) h.value;
+ }
+ catch (ClassCastException cex)
+ {
+ BAD_OPERATION bad = new BAD_OPERATION("InvalidValue expected");
+ bad.initCause(cex);
+ throw bad;
+ }
+ }
+
+ /**
+ * Get the InvalidValue repository id.
+ *
+ * @return "IDL:omg.org/DynamicAny/DynAny/InvalidValue:1.0", always.
+ */
+ public static String id()
+ {
+ return "IDL:omg.org/DynamicAny/DynAny/InvalidValue:1.0";
+ }
+
+ /**
+ * Read the exception from the CDR intput stream.
+ *
+ * @param input a org.omg.CORBA.portable stream to read from.
+ */
+ public static InvalidValue read(InputStream input)
+ {
+ // Read the exception repository id.
+ String id = input.read_string();
+ InvalidValue value = new InvalidValue(id);
+
+ return value;
+ }
+
+ /**
+ * Write the exception to the CDR output stream.
+ *
+ * @param output a org.omg.CORBA.portable stream stream to write into.
+ * @param value a value to write.
+ */
+ public static void write(OutputStream output, InvalidValue value)
+ {
+ // Write the exception repository id.
+ output.write_string(id());
+ }
+} \ No newline at end of file
diff --git a/libjava/classpath/org/omg/DynamicAny/DynAnyPackage/TypeMismatch.java b/libjava/classpath/org/omg/DynamicAny/DynAnyPackage/TypeMismatch.java
new file mode 100644
index 00000000000..5558babe6ef
--- /dev/null
+++ b/libjava/classpath/org/omg/DynamicAny/DynAnyPackage/TypeMismatch.java
@@ -0,0 +1,81 @@
+/* TypeMismatch.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.DynamicAny.DynAnyPackage;
+
+import org.omg.CORBA.UserException;
+import org.omg.CORBA.portable.IDLEntity;
+
+import java.io.Serializable;
+
+/**
+ * Raised when the operation cannot be performed because the involved
+ * data structure has the mismatching typecode. For instance, it is
+ * raised on the attempt to set the array content, when the value being set
+ * has a different type than the array element.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public class TypeMismatch
+ extends UserException
+ implements IDLEntity, Serializable
+{
+ /**
+ * Use serialVersionUID (v1.4) for interoperability.
+ */
+ private static final long serialVersionUID = -6393641830493471034L;
+
+ /**
+ * Create TypeMismatch with no explaining
+ * message.
+ */
+ public TypeMismatch()
+ {
+ }
+
+ /**
+ * Create the TypeMismatch with explaining
+ * message.
+ *
+ * @param why a string, explaining, why this exception has been thrown.
+ */
+ public TypeMismatch(String why)
+ {
+ super(why);
+ }
+} \ No newline at end of file
diff --git a/libjava/classpath/org/omg/DynamicAny/DynAnyPackage/TypeMismatchHelper.java b/libjava/classpath/org/omg/DynamicAny/DynAnyPackage/TypeMismatchHelper.java
new file mode 100644
index 00000000000..e15fb72c668
--- /dev/null
+++ b/libjava/classpath/org/omg/DynamicAny/DynAnyPackage/TypeMismatchHelper.java
@@ -0,0 +1,149 @@
+/* TypeMismatchHelper.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.DynamicAny.DynAnyPackage;
+
+import gnu.CORBA.EmptyExceptionHolder;
+
+import org.omg.CORBA.Any;
+import org.omg.CORBA.BAD_OPERATION;
+import org.omg.CORBA.ORB;
+import org.omg.CORBA.StructMember;
+import org.omg.CORBA.TCKind;
+import org.omg.CORBA.TypeCode;
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+
+/**
+* The helper operations for the exception {@link TypeMismatch}.
+*
+* @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+*/
+public abstract class TypeMismatchHelper
+{
+ /**
+ * The cached typecode value, computed only once.
+ */
+ private static TypeCode typeCode;
+
+ /**
+ * Create the TypeMismatch typecode (structure,
+ * named "TypeMismatch").
+ */
+ public static TypeCode type()
+ {
+ if (typeCode == null)
+ {
+ ORB orb = ORB.init();
+ StructMember[] members = new StructMember[ 0 ];
+ typeCode = orb.create_exception_tc(id(), "TypeMismatch", members);
+ }
+ return typeCode;
+ }
+
+ /* Every user exception with no user defined
+ fields can use EmptyExceptionHolder */
+
+ /**
+ * Insert the TypeMismatch into the given Any.
+ *
+ * @param any the Any to insert into.
+ * @param that the TypeMismatch to insert.
+ */
+ public static void insert(Any any, TypeMismatch that)
+ {
+ any.insert_Streamable(new EmptyExceptionHolder(that, type()));
+ }
+
+ /**
+ * Extract the TypeMismatch from given Any.
+ *
+ * @throws BAD_OPERATION if the passed Any does not contain TypeMismatch.
+ */
+ public static TypeMismatch extract(Any any)
+ {
+ try
+ {
+ EmptyExceptionHolder h =
+ (EmptyExceptionHolder) any.extract_Streamable();
+ return (TypeMismatch) h.value;
+ }
+ catch (ClassCastException cex)
+ {
+ BAD_OPERATION bad = new BAD_OPERATION("TypeMismatch expected");
+ bad.initCause(cex);
+ throw bad;
+ }
+ }
+
+ /**
+ * Get the TypeMismatch repository id.
+ *
+ * @return "IDL:omg.org/DynamicAny/DynAny/TypeMismatch:1.0", always.
+ */
+ public static String id()
+ {
+ return "IDL:omg.org/DynamicAny/DynAny/TypeMismatch:1.0";
+ }
+
+ /**
+ * Read the exception from the CDR intput stream.
+ *
+ * @param input a org.omg.CORBA.portable stream to read from.
+ */
+ public static TypeMismatch read(InputStream input)
+ {
+ // Read the exception repository id.
+ String id = input.read_string();
+ TypeMismatch value = new TypeMismatch(id);
+
+ return value;
+ }
+
+ /**
+ * Write the exception to the CDR output stream.
+ *
+ * @param output a org.omg.CORBA.portable stream stream to write into.
+ * @param value a value to write.
+ */
+ public static void write(OutputStream output, TypeMismatch value)
+ {
+ // Write the exception repository id.
+ output.write_string(id());
+ }
+} \ No newline at end of file
diff --git a/libjava/classpath/org/omg/DynamicAny/DynAnyPackage/package.html b/libjava/classpath/org/omg/DynamicAny/DynAnyPackage/package.html
new file mode 100644
index 00000000000..d31469fe3b9
--- /dev/null
+++ b/libjava/classpath/org/omg/DynamicAny/DynAnyPackage/package.html
@@ -0,0 +1,49 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
+<!-- package.html --
+ Copyright (C) 2002 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.DynamicAny.DynAnyPackage</title></head>
+
+<body>
+
+Contains several exceptions that may be thrown during the operations on
+{@link org.omg.DynamicAny.DynAny } and derived classes. Includes helpers,
+providing helper operations for these exceptions.
+
+@author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)</body>
+</html>
diff --git a/libjava/classpath/org/omg/IOP/CodeSets.java b/libjava/classpath/org/omg/IOP/CodeSets.java
new file mode 100644
index 00000000000..8ba228f6939
--- /dev/null
+++ b/libjava/classpath/org/omg/IOP/CodeSets.java
@@ -0,0 +1,62 @@
+/* CodeSets.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;
+
+ /**
+ * Holds the integer identifier of the CodeSets context. This context
+ * consist of this identifier, followed by two standard codes, first for
+ * narrow and second for wide character sets. The charset codes are
+ * integer (CORBA long) constants. Usually "narrow" means 8 bit and
+ * "wide" means 16 bit, but under specific circumstances these two
+ * charsets may be identical. The context is optional for "narrow"
+ * characters (assuming the charset code 0x00010001 = ISO 8859-1).
+ * It is required if the "wide" characters are transferred.
+ *
+ * They standard charset values are managed in
+ * {@link gnu.CORBA.GIOP.CharSets_OSF}.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public interface CodeSets
+{
+ /**
+ * Specifies the CodeSets value, 1.
+ */
+ int value = 1;
+}
diff --git a/libjava/classpath/org/omg/IOP/Codec.java b/libjava/classpath/org/omg/IOP/Codec.java
new file mode 100644
index 00000000000..575cc05d2dc
--- /dev/null
+++ b/libjava/classpath/org/omg/IOP/Codec.java
@@ -0,0 +1,71 @@
+/* Codec.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;
+
+import org.omg.CORBA.portable.IDLEntity;
+
+/**
+ * <p>
+ * Codec provides means to encode IDL data types into the byte arrays.
+ * Some parts of the CORBA message may contain such abstracted (encapsulated)
+ * byte arrays, holding arbitrary information. The encoding and decoding
+ * operations are defined separately in {@link CodecOperations}.
+ * The Codec for {@link ENCODING_CDR_ENCAPS} v 1.0 - 1.2 is required by OMG.
+ * Vendors can implement additional Codec's, driven by alternative algorithms.
+ * </p>
+ * <p>
+ * The {@link ENCODING_CDR_ENCAPS} Codec, returned by the {@link CodecFactory},
+ * is a local object. It is not possible to get its stringified reference,
+ * to send it over CDR streams or invoke the methods remotely.
+ * </p>
+ * <p>
+ * Codec is obtained from {@link CodecFactory}. CodecFactory is returned by
+ * <code>ORB.resolve_initial_references("CodecFactory")</code>.
+ * </p>
+ * @specnote The ENCODING_CDR_ENCAPS Codec is local in both Suns
+ * (at least till 1.4 inclusive) an this implementation.
+ *
+ *
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public interface Codec
+ extends CodecOperations, IDLEntity, org.omg.CORBA.Object
+{
+} \ No newline at end of file
diff --git a/libjava/classpath/org/omg/IOP/CodecFactory.java b/libjava/classpath/org/omg/IOP/CodecFactory.java
new file mode 100644
index 00000000000..da62b488099
--- /dev/null
+++ b/libjava/classpath/org/omg/IOP/CodecFactory.java
@@ -0,0 +1,67 @@
+/* CodecFactory.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;
+
+import org.omg.CORBA.portable.IDLEntity;
+
+/**
+ * <p>
+ * The CodecFactory is used to obtaind {@link Codec} for the given encoding.
+ * The obtaining operations are defined separately in
+ * {@link CodecFactoryOperations}.
+ * </p>
+ * <p>
+ * The CodecFactory is a local object. It is not possible to get its
+ * stringified reference, to send it over CDR streams or invoke the
+ * methods remotely.
+ * </p>
+ * <p>
+ * CodecFactory is returned by
+ * <code>ORB.resolve_initial_references("CodecFactory")</code>.
+ * </p>
+ *
+ * @specnote The CodecFactory is local in both Suns (up till 1.4 inclusive)
+ * an this implementation.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public interface CodecFactory
+ extends CodecFactoryOperations, IDLEntity, org.omg.CORBA.Object
+{
+} \ No newline at end of file
diff --git a/libjava/classpath/org/omg/IOP/CodecFactoryHelper.java b/libjava/classpath/org/omg/IOP/CodecFactoryHelper.java
new file mode 100644
index 00000000000..d5c55a264cc
--- /dev/null
+++ b/libjava/classpath/org/omg/IOP/CodecFactoryHelper.java
@@ -0,0 +1,152 @@
+/* CodecFactoryHelper.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;
+
+import org.omg.CORBA.Any;
+import org.omg.CORBA.BAD_PARAM;
+import org.omg.CORBA.CompletionStatus;
+import org.omg.CORBA.MARSHAL;
+import org.omg.CORBA.ORB;
+import org.omg.CORBA.TypeCode;
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+
+/**
+* The helper operations for the
+* CORBA object {@link CodecFactory}.
+*
+* @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+*/
+public abstract class CodecFactoryHelper
+{
+ /**
+ * The cached {@link CodecFactory} typecode, computed once.
+ */
+ private static TypeCode typeCode;
+
+ /**
+ * Get the type code of the {@link CodecFactory}.
+ */
+ public static TypeCode type()
+ {
+ if (typeCode == null)
+ typeCode = ORB.init().create_interface_tc(id(), "CodecFactory");
+ return typeCode;
+ }
+
+ /**
+ * Insert the CodecFactory into the given Any.
+ *
+ * @param any the Any to insert into.
+ * @param that the CodecFactory to insert.
+ */
+ public static void insert(Any any, CodecFactory that)
+ {
+ any.insert_Object(that);
+ }
+
+ /**
+ * Extract the CodecFactory from given Any.
+ *
+ * @throws BAD_OPERATION if the passed Any does not contain CodecFactory.
+ */
+ public static CodecFactory extract(Any any)
+ {
+ return narrow(any.extract_Object());
+ }
+
+ /**
+ * Get the CodecFactory repository id.
+ *
+ * @return "IDL:omg.org/IOP/CodecFactory:1.0", always.
+ */
+ public static String id()
+ {
+ return "IDL:omg.org/IOP/CodecFactory:1.0";
+ }
+
+ /**
+ * Cast the passed object into the CodecFactory. As the CodecFactory
+ * is a local object, this is not different from the java type cast.
+ *
+ * @throws BAD_PARAM if the passed object is not a CodecFactory.
+ */
+ public static CodecFactory narrow(org.omg.CORBA.Object obj)
+ {
+ try
+ {
+ return (CodecFactory) obj;
+ }
+ catch (ClassCastException ex)
+ {
+ BAD_PARAM bad = new BAD_PARAM("CodecFactory expected");
+ bad.initCause(ex);
+ throw bad;
+ }
+ }
+
+ /**
+ * This should read the CodecFactory from the CDR intput stream,
+ * but this is not possible as CodecFactory is a local object.
+ *
+ * @specnote Suns implementation (1.4) throws this exception either.
+ *
+ * @throws {@link MARSHAL}, minor code 0 and incomplete, always.
+ */
+ public static CodecFactory read(InputStream input)
+ {
+ throw new MARSHAL(UNSUPPORTED, 0, CompletionStatus.COMPLETED_NO);
+ }
+
+ /**
+ * This should write the CodecFactory from the CDR intput stream,
+ * but this is not possible as CodecFactory is a local object.
+ *
+ * @specnote Suns implementation (1.4) throws this exception either.
+ *
+ * @throws {@link MARSHAL}, minor code 0 and incomplete, always.
+ */
+ public static void write(OutputStream output, CodecFactory value)
+ {
+ throw new MARSHAL(UNSUPPORTED, 0, CompletionStatus.COMPLETED_NO);
+ }
+
+ private static String UNSUPPORTED =
+ "The operation is unsupported for CodecFactory because it is a local object";
+} \ No newline at end of file
diff --git a/libjava/classpath/org/omg/IOP/CodecFactoryOperations.java b/libjava/classpath/org/omg/IOP/CodecFactoryOperations.java
new file mode 100644
index 00000000000..a2b87d55724
--- /dev/null
+++ b/libjava/classpath/org/omg/IOP/CodecFactoryOperations.java
@@ -0,0 +1,63 @@
+/* CodecFactoryOperations.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;
+
+import org.omg.IOP.CodecFactoryPackage.UnknownEncoding;
+
+/**
+ * Defines the operations, applicable to
+ * the CodecFactory.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public interface CodecFactoryOperations
+{
+ /**
+ * Create Codec for the given encoding.
+ *
+ * @param for_encoding the encoding, for that the codec must be created.
+ *
+ * @return the appropriate Codec.
+ *
+ * @throws UnknownEncoding if there are not Codec that would support the
+ * required encoding.
+ */
+ Codec create_codec(Encoding for_encoding)
+ throws UnknownEncoding;
+} \ No newline at end of file
diff --git a/libjava/classpath/org/omg/IOP/CodecFactoryPackage/UnknownEncoding.java b/libjava/classpath/org/omg/IOP/CodecFactoryPackage/UnknownEncoding.java
new file mode 100644
index 00000000000..08f8ac4df19
--- /dev/null
+++ b/libjava/classpath/org/omg/IOP/CodecFactoryPackage/UnknownEncoding.java
@@ -0,0 +1,78 @@
+/* UnknownEncoding.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.CodecFactoryPackage;
+
+import org.omg.CORBA.UserException;
+import org.omg.CORBA.portable.IDLEntity;
+
+import java.io.Serializable;
+
+/**
+* The {@link org.omg.IOP.CodecFactoryOperations#create_codec} raises
+* UnknownEncoding if that factory cannot create a
+* {@link org.omg.IOP.Codec} of the given encoding.
+*
+* @author Audrius Meskauskas, Lithiania (AudriusA@Bioinformatics.org)
+*/
+public class UnknownEncoding
+ extends UserException
+ implements IDLEntity, Serializable
+{
+ /**
+ * Use serialVersionUID (v1.4) for interoperability.
+ */
+ private static final long serialVersionUID = 1613955753212049966L;
+
+ /**
+ * Create UnknownEncoding with no explaining message.
+ */
+ public UnknownEncoding()
+ {
+ }
+
+ /**
+ * Create the UnknownEncoding with explaining message.
+ *
+ * @param why a string, explaining, why this exception has been thrown.
+ */
+ public UnknownEncoding(String why)
+ {
+ super(why);
+ }
+} \ No newline at end of file
diff --git a/libjava/classpath/org/omg/IOP/CodecFactoryPackage/UnknownEncodingHelper.java b/libjava/classpath/org/omg/IOP/CodecFactoryPackage/UnknownEncodingHelper.java
new file mode 100644
index 00000000000..a1082178c52
--- /dev/null
+++ b/libjava/classpath/org/omg/IOP/CodecFactoryPackage/UnknownEncodingHelper.java
@@ -0,0 +1,150 @@
+/* UnknownEncodingHelper.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.CodecFactoryPackage;
+
+import gnu.CORBA.EmptyExceptionHolder;
+
+import org.omg.CORBA.ORB;
+import org.omg.CORBA.Any;
+import org.omg.CORBA.TypeCode;
+import org.omg.CORBA.TCKind;
+import org.omg.CORBA.StructMember;
+
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+import org.omg.CORBA.BAD_OPERATION;
+
+ /**
+ * The helper operations for the exception {@link UnknownEncoding}.
+ *
+ * @author Audrius Meskauskas, Lithiania (AudriusA@Bioinformatics.org)
+ */
+public abstract class UnknownEncodingHelper
+{
+ /**
+ * The cached typecode value, computed only once.
+ */
+ private static TypeCode typeCode;
+
+ /**
+ * Create the UnknownEncoding typecode (structure,
+ * named "UnknownEncoding").
+ */
+ public static TypeCode type()
+ {
+ if (typeCode == null)
+ {
+ ORB orb = ORB.init();
+ StructMember[] members = new StructMember[0];
+ typeCode =
+ orb.create_exception_tc (id(), "UnknownEncoding", members);
+
+ }
+ return typeCode;
+ }
+
+ /* Every user exception with no user defined fields can use EmptyExceptionHolder */
+
+ /**
+ * Insert the UnknownEncoding into the given Any.
+ *
+ * @param any the Any to insert into.
+ * @param that the UnknownEncoding to insert.
+ */
+ public static void insert(Any any, UnknownEncoding that)
+ {
+ any.insert_Streamable(new EmptyExceptionHolder(that, type()));
+ }
+
+ /**
+ * Extract the UnknownEncoding from given Any.
+ *
+ * @throws BAD_OPERATION if the passed Any does not contain UnknownEncoding.
+ */
+ public static UnknownEncoding extract(Any any)
+ {
+ try
+ {
+ EmptyExceptionHolder h = (EmptyExceptionHolder) any.extract_Streamable();
+ return (UnknownEncoding) h.value;
+ }
+ catch (ClassCastException cex)
+ {
+ BAD_OPERATION bad = new BAD_OPERATION("UnknownEncoding expected");
+ bad.initCause(cex);
+ throw bad;
+ }
+ }
+
+ /**
+ * Get the UnknownEncoding repository id.
+ *
+ * @return "IDL:omg.org/IOP/CodecFactory/UnknownEncoding:1.0", always.
+ */
+ public static String id()
+ {
+ return "IDL:omg.org/IOP/CodecFactory/UnknownEncoding:1.0";
+ }
+
+ /**
+ * Read the exception from the CDR intput stream.
+ *
+ * @param input a org.omg.CORBA.portable stream to read from.
+ */
+ public static UnknownEncoding read(InputStream input)
+ {
+ // Read the exception repository id.
+ String id = input.read_string();
+ UnknownEncoding value = new UnknownEncoding(id);
+
+ return value;
+ }
+
+ /**
+ * Write the exception to the CDR output stream.
+ *
+ * @param output a org.omg.CORBA.portable stream stream to write into.
+ * @param value a value to write.
+ */
+ public static void write(OutputStream output, UnknownEncoding value)
+ {
+ // Write the exception repository id.
+ output.write_string(id());
+ }
+} \ No newline at end of file
diff --git a/libjava/classpath/org/omg/IOP/CodecOperations.java b/libjava/classpath/org/omg/IOP/CodecOperations.java
new file mode 100644
index 00000000000..3dfae1207a7
--- /dev/null
+++ b/libjava/classpath/org/omg/IOP/CodecOperations.java
@@ -0,0 +1,126 @@
+/* CodecOperations.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;
+
+import org.omg.CORBA.Any;
+import org.omg.CORBA.TypeCode;
+import org.omg.IOP.CodecPackage.FormatMismatch;
+import org.omg.IOP.CodecPackage.InvalidTypeForEncoding;
+import org.omg.IOP.CodecPackage.TypeMismatch;
+
+/**
+ * Defines the operations, applicable to
+ * the Codec.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public interface CodecOperations
+{
+ /**
+ * Encode the value, stored inside the given {@link Any}, into array of
+ * bytes. The returned byte array contains the data structure typecode,
+ * followed by the data structure itself.
+ *
+ * @param that the {@link Any}, containing the data structure, required to
+ * encode.
+ *
+ * @return the array of bytes, containing the encoded data structure.
+ *
+ * @throws InvalidTypeForEncoding if the data structure is not supported
+ * by this {@link Codec} (wide char and wide string are not supported
+ * by ENCODING_CDR_ENCAPS v 1.0).
+ *
+ * @see decode(byte[])
+ */
+ byte[] encode(Any that)
+ throws InvalidTypeForEncoding;
+
+ /**
+ * Decode the given array of bytes and return the decoded value, inserted
+ * into {@link Any}. This methods expects that the byte array contains
+ * the CDR-encoded data structure {@link TypeCode}, followed by the data
+ * structure itself.
+ *
+ * @param them an array of bytes to decode.
+ * @return the {@link Any}, containing the decoded structure. The structure
+ * can be extracted from the Any with the appropriate helper.
+ *
+ * @throws FormatMismatch on the invalid structure of the byte array.
+ *
+ * @see encode(Any)
+ */
+ Any decode(byte[] them)
+ throws FormatMismatch;
+
+ /**
+ * Encode the value (without the typecode), stored in the passed {@link Any},
+ * into the given byte array.
+ *
+ * @param that_value the {@link Any}, holding the value to encode.
+ * @return the array, containing the encoded value alone (no preceeding
+ * typecode).
+ *
+ * @see decode_value(byte[], TypeCode)
+ */
+ byte[] encode_value(Any that_value)
+ throws InvalidTypeForEncoding;
+
+ /**
+ * Decode the given array of bytes, supposing that they contain the
+ * given data structure, and return the decoded value.
+ *
+ * @param them the array of bytes to decode. Should contain the data type,
+ * matching the structure, defined in the <code>type</code> parameter.
+ * Does not contain the typecode itself.
+ *
+ * @param type the typecode of the data structure, stored in the byte
+ * array.
+ *
+ * @return the {@link Any}, containing the decoded structure. The
+ * structure can be extracted from the Any with the appropriate helper.
+ *
+ * @throws FormatMismatch on the invalid structure of the byte array.
+ * @throws TypeMismatch if discovered that the the byte array defines a
+ * different structure.
+ *
+ * @see encode_value(Any)
+ */
+ Any decode_value(byte[] them, TypeCode type)
+ throws FormatMismatch, TypeMismatch;
+} \ No newline at end of file
diff --git a/libjava/classpath/org/omg/IOP/CodecPackage/FormatMismatch.java b/libjava/classpath/org/omg/IOP/CodecPackage/FormatMismatch.java
new file mode 100644
index 00000000000..c82c4899fde
--- /dev/null
+++ b/libjava/classpath/org/omg/IOP/CodecPackage/FormatMismatch.java
@@ -0,0 +1,81 @@
+/* FormatMismatch.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.CodecPackage;
+
+import org.omg.CORBA.UserException;
+import org.omg.CORBA.portable.IDLEntity;
+
+import java.io.Serializable;
+
+/**
+* This exception is raised by {@link org.omg.IOP.CodecOperations#decode}
+* or {@link org.omg.IOP.CodecOperations#decode_value} when the data in the
+* octet sequence cannot be decoded into {@link org.omg.CORBA.Any}.
+*
+* @see org.omg.IOP.CodecOperations
+*
+* @author Audrius Meskauskas, Lithiania (AudriusA@Bioinformatics.org)
+*/
+public class FormatMismatch
+ extends UserException
+ implements IDLEntity, Serializable
+{
+ /**
+ * Use serialVersionUID (v1.4) for interoperability.
+ */
+ private static final long serialVersionUID = 5818121867618342320L;
+
+ /**
+ * Create FormatMismatch with no explaining message.
+ */
+ public FormatMismatch()
+ {
+ }
+
+ /**
+ * Create the FormatMismatch with explaining message and all fields
+ * initialised to the given values.
+ *
+ * @param why a string, explaining, why this exception has been thrown.
+ */
+ public FormatMismatch(String why)
+ {
+ super(why);
+ }
+} \ No newline at end of file
diff --git a/libjava/classpath/org/omg/IOP/CodecPackage/FormatMismatchHelper.java b/libjava/classpath/org/omg/IOP/CodecPackage/FormatMismatchHelper.java
new file mode 100644
index 00000000000..e5910ac57a0
--- /dev/null
+++ b/libjava/classpath/org/omg/IOP/CodecPackage/FormatMismatchHelper.java
@@ -0,0 +1,146 @@
+/* FormatMismatchHelper.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.CodecPackage;
+
+import gnu.CORBA.EmptyExceptionHolder;
+
+import org.omg.CORBA.Any;
+import org.omg.CORBA.BAD_OPERATION;
+import org.omg.CORBA.ORB;
+import org.omg.CORBA.StructMember;
+import org.omg.CORBA.TCKind;
+import org.omg.CORBA.TypeCode;
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+
+/**
+* The helper operations for the exception {@link FormatMismatch}.
+*
+* @author Audrius Meskauskas, Lithiania (AudriusA@Bioinformatics.org)
+*/
+public abstract class FormatMismatchHelper
+{
+ /**
+ * The cached typecode value, computed only once.
+ */
+ private static TypeCode typeCode;
+
+ /**
+ * Create the FormatMismatch typecode (structure,
+ * named "FormatMismatch").
+ */
+ public static TypeCode type()
+ {
+ if (typeCode == null)
+ {
+ ORB orb = ORB.init();
+ StructMember[] members = new StructMember[ 0 ];
+ typeCode = orb.create_exception_tc(id(), "FormatMismatch", members);
+ }
+ return typeCode;
+ }
+
+ /**
+ * Insert the FormatMismatch into the given Any.
+ *
+ * @param any the Any to insert into.
+ * @param that the FormatMismatch to insert.
+ */
+ public static void insert(Any any, FormatMismatch that)
+ {
+ any.insert_Streamable(new EmptyExceptionHolder(that, type()));
+ }
+
+ /**
+ * Extract the FormatMismatch from given Any.
+ *
+ * @throws BAD_OPERATION if the passed Any does not contain FormatMismatch.
+ */
+ public static FormatMismatch extract(Any any)
+ {
+ try
+ {
+ EmptyExceptionHolder h =
+ (EmptyExceptionHolder) any.extract_Streamable();
+ return (FormatMismatch) h.value;
+ }
+ catch (ClassCastException cex)
+ {
+ BAD_OPERATION bad = new BAD_OPERATION("FormatMismatch expected");
+ bad.initCause(cex);
+ throw bad;
+ }
+ }
+
+ /**
+ * Get the FormatMismatch repository id.
+ *
+ * @return "IDL:omg.org/IOP/Codec/FormatMismatch:1.0", always.
+ */
+ public static String id()
+ {
+ return "IDL:omg.org/IOP/Codec/FormatMismatch:1.0";
+ }
+
+ /**
+ * Read the exception from the CDR intput stream.
+ *
+ * @param input a org.omg.CORBA.portable stream to read from.
+ */
+ public static FormatMismatch read(InputStream input)
+ {
+ // Read the exception repository id.
+ String id = input.read_string();
+ FormatMismatch value = new FormatMismatch(id);
+
+ return value;
+ }
+
+ /**
+ * Write the exception to the CDR output stream.
+ *
+ * @param output a org.omg.CORBA.portable stream stream to write into.
+ * @param value a value to write.
+ */
+ public static void write(OutputStream output, FormatMismatch value)
+ {
+ // Write the exception repository id.
+ output.write_string(id());
+ }
+} \ No newline at end of file
diff --git a/libjava/classpath/org/omg/IOP/CodecPackage/InvalidTypeForEncoding.java b/libjava/classpath/org/omg/IOP/CodecPackage/InvalidTypeForEncoding.java
new file mode 100644
index 00000000000..4099f58bd46
--- /dev/null
+++ b/libjava/classpath/org/omg/IOP/CodecPackage/InvalidTypeForEncoding.java
@@ -0,0 +1,81 @@
+/* InvalidTypeForEncoding.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.CodecPackage;
+
+import org.omg.CORBA.UserException;
+import org.omg.CORBA.portable.IDLEntity;
+
+import java.io.Serializable;
+
+/**
+* This exception is raised by {@link org.omg.IOP.CodecOperations#encode} or
+* {@link org.omg.IOP.CodecOperations#encode_value} when the type is not
+* valid for the encoding. For instance, the "wide" character string is
+* not a valid type for GIOP version 1.0.
+*
+* @see org.omg.IOP.CodecOperations
+*
+* @author Audrius Meskauskas, Lithiania (AudriusA@Bioinformatics.org)
+*/
+public class InvalidTypeForEncoding
+ extends UserException
+ implements IDLEntity, Serializable
+{
+ /**
+ * Use serialVersionUID (v1.4) for interoperability.
+ */
+ private static final long serialVersionUID = 7951932210684443970L;
+
+ /**
+ * Create InvalidTypeForEncoding with no explaining message.
+ */
+ public InvalidTypeForEncoding()
+ {
+ }
+
+ /**
+ * Create the InvalidTypeForEncoding with explaining message.
+ *
+ * @param why a string, explaining, why this exception has been thrown.
+ */
+ public InvalidTypeForEncoding(String why)
+ {
+ super(why);
+ }
+} \ No newline at end of file
diff --git a/libjava/classpath/org/omg/IOP/CodecPackage/InvalidTypeForEncodingHelper.java b/libjava/classpath/org/omg/IOP/CodecPackage/InvalidTypeForEncodingHelper.java
new file mode 100644
index 00000000000..6c4ce52f0b5
--- /dev/null
+++ b/libjava/classpath/org/omg/IOP/CodecPackage/InvalidTypeForEncodingHelper.java
@@ -0,0 +1,149 @@
+/* InvalidTypeForEncodingHelper.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.CodecPackage;
+
+import gnu.CORBA.EmptyExceptionHolder;
+
+import org.omg.CORBA.Any;
+import org.omg.CORBA.BAD_OPERATION;
+import org.omg.CORBA.ORB;
+import org.omg.CORBA.StructMember;
+import org.omg.CORBA.TCKind;
+import org.omg.CORBA.TypeCode;
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+
+/**
+* The helper operations for the exception {@link InvalidTypeForEncoding}.
+*
+* @author Audrius Meskauskas, Lithiania (AudriusA@Bioinformatics.org)
+*/
+public abstract class InvalidTypeForEncodingHelper
+{
+ /**
+ * The cached typecode value, computed only once.
+ */
+ private static TypeCode typeCode;
+
+ /**
+ * Create the InvalidTypeForEncoding typecode (structure,
+ * named "InvalidTypeForEncoding").
+ */
+ public static TypeCode type()
+ {
+ if (typeCode == null)
+ {
+ ORB orb = ORB.init();
+ StructMember[] members = new StructMember[ 0 ];
+ typeCode =
+ orb.create_exception_tc(id(), "InvalidTypeForEncoding", members);
+ }
+ return typeCode;
+ }
+
+ /**
+ * Insert the InvalidTypeForEncoding into the given Any.
+ *
+ * @param any the Any to insert into.
+ * @param that the InvalidTypeForEncoding to insert.
+ */
+ public static void insert(Any any, InvalidTypeForEncoding that)
+ {
+ any.insert_Streamable(new EmptyExceptionHolder(that, type()));
+ }
+
+ /**
+ * Extract the InvalidTypeForEncoding from given Any.
+ *
+ * @throws BAD_OPERATION if the passed Any does not contain
+ * InvalidTypeForEncoding.
+ */
+ public static InvalidTypeForEncoding extract(Any any)
+ {
+ try
+ {
+ EmptyExceptionHolder h =
+ (EmptyExceptionHolder) any.extract_Streamable();
+ return (InvalidTypeForEncoding) h.value;
+ }
+ catch (ClassCastException cex)
+ {
+ BAD_OPERATION bad =
+ new BAD_OPERATION("InvalidTypeForEncoding expected");
+ bad.initCause(cex);
+ throw bad;
+ }
+ }
+
+ /**
+ * Get the InvalidTypeForEncoding repository id.
+ *
+ * @return "IDL:omg.org/IOP/Codec/InvalidTypeForEncoding:1.0", always.
+ */
+ public static String id()
+ {
+ return "IDL:omg.org/IOP/Codec/InvalidTypeForEncoding:1.0";
+ }
+
+ /**
+ * Read the exception from the CDR intput stream.
+ *
+ * @param input a org.omg.CORBA.portable stream to read from.
+ */
+ public static InvalidTypeForEncoding read(InputStream input)
+ {
+ // Read the exception repository id.
+ String id = input.read_string();
+ InvalidTypeForEncoding value = new InvalidTypeForEncoding(id);
+
+ return value;
+ }
+
+ /**
+ * Write the exception to the CDR output stream.
+ *
+ * @param output a org.omg.CORBA.portable stream stream to write into.
+ * @param value a value to write.
+ */
+ public static void write(OutputStream output, InvalidTypeForEncoding value)
+ {
+ // Write the exception repository id.
+ output.write_string(id());
+ }
+} \ No newline at end of file
diff --git a/libjava/classpath/org/omg/IOP/CodecPackage/TypeMismatch.java b/libjava/classpath/org/omg/IOP/CodecPackage/TypeMismatch.java
new file mode 100644
index 00000000000..c4a53b65961
--- /dev/null
+++ b/libjava/classpath/org/omg/IOP/CodecPackage/TypeMismatch.java
@@ -0,0 +1,79 @@
+/* TypeMismatch.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.CodecPackage;
+
+import org.omg.CORBA.UserException;
+import org.omg.CORBA.portable.IDLEntity;
+
+import java.io.Serializable;
+
+/**
+* The TypeMismatch may be thrown by various methods in org.omg.DynamicAny
+* package when the operation is not applicable due unexpected
+* {@link org.omg.CORBA.TypeCode}.
+*
+* @author Audrius Meskauskas, Lithiania (AudriusA@Bioinformatics.org)
+*/
+public class TypeMismatch
+ extends UserException
+ implements IDLEntity, Serializable
+{
+
+ /**
+ * Use serialVersionUID (v1.4) for interoperability.
+ */
+ private static final long serialVersionUID = -3544092104480759035L;
+
+ /**
+ * Create TypeMismatch with no explaining message.
+ */
+ public TypeMismatch()
+ {
+ }
+
+ /**
+ * Create the TypeMismatch with explaining message.
+ *
+ * @param why a string, explaining, why this exception has been thrown.
+ */
+ public TypeMismatch(String why)
+ {
+ super(why);
+ }
+} \ No newline at end of file
diff --git a/libjava/classpath/org/omg/IOP/CodecPackage/TypeMismatchHelper.java b/libjava/classpath/org/omg/IOP/CodecPackage/TypeMismatchHelper.java
new file mode 100644
index 00000000000..9f422863755
--- /dev/null
+++ b/libjava/classpath/org/omg/IOP/CodecPackage/TypeMismatchHelper.java
@@ -0,0 +1,146 @@
+/* TypeMismatchHelper.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.CodecPackage;
+
+import gnu.CORBA.EmptyExceptionHolder;
+
+import org.omg.CORBA.Any;
+import org.omg.CORBA.BAD_OPERATION;
+import org.omg.CORBA.ORB;
+import org.omg.CORBA.StructMember;
+import org.omg.CORBA.TCKind;
+import org.omg.CORBA.TypeCode;
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+
+/**
+* The helper operations for the exception {@link TypeMismatch}.
+*
+* @author Audrius Meskauskas, Lithiania (AudriusA@Bioinformatics.org)
+*/
+public abstract class TypeMismatchHelper
+{
+ /**
+ * The cached typecode value, computed only once.
+ */
+ private static TypeCode typeCode;
+
+ /**
+ * Create the TypeMismatch typecode (structure,
+ * named "TypeMismatch").
+ */
+ public static TypeCode type()
+ {
+ if (typeCode == null)
+ {
+ ORB orb = ORB.init();
+ StructMember[] members = new StructMember[ 0 ];
+ typeCode = orb.create_exception_tc(id(), "TypeMismatch", members);
+ }
+ return typeCode;
+ }
+
+ /**
+ * Insert the TypeMismatch into the given Any.
+ *
+ * @param any the Any to insert into.
+ * @param that the TypeMismatch to insert.
+ */
+ public static void insert(Any any, TypeMismatch that)
+ {
+ any.insert_Streamable(new EmptyExceptionHolder(that, type()));
+ }
+
+ /**
+ * Extract the TypeMismatch from given Any.
+ *
+ * @throws BAD_OPERATION if the passed Any does not contain TypeMismatch.
+ */
+ public static TypeMismatch extract(Any any)
+ {
+ try
+ {
+ EmptyExceptionHolder h =
+ (EmptyExceptionHolder) any.extract_Streamable();
+ return (TypeMismatch) h.value;
+ }
+ catch (ClassCastException cex)
+ {
+ BAD_OPERATION bad = new BAD_OPERATION("TypeMismatch expected");
+ bad.initCause(cex);
+ throw bad;
+ }
+ }
+
+ /**
+ * Get the TypeMismatch repository id.
+ *
+ * @return "IDL:omg.org/IOP/Codec/TypeMismatch:1.0", always.
+ */
+ public static String id()
+ {
+ return "IDL:omg.org/IOP/Codec/TypeMismatch:1.0";
+ }
+
+ /**
+ * Read the exception from the CDR intput stream.
+ *
+ * @param input a org.omg.CORBA.portable stream to read from.
+ */
+ public static TypeMismatch read(InputStream input)
+ {
+ // Read the exception repository id.
+ String id = input.read_string();
+ TypeMismatch value = new TypeMismatch(id);
+
+ return value;
+ }
+
+ /**
+ * Write the exception to the CDR output stream.
+ *
+ * @param output a org.omg.CORBA.portable stream stream to write into.
+ * @param value a value to write.
+ */
+ public static void write(OutputStream output, TypeMismatch value)
+ {
+ // Write the exception repository id.
+ output.write_string(id());
+ }
+} \ No newline at end of file
diff --git a/libjava/classpath/org/omg/IOP/ComponentIdHelper.java b/libjava/classpath/org/omg/IOP/ComponentIdHelper.java
new file mode 100644
index 00000000000..64fbdfd74f5
--- /dev/null
+++ b/libjava/classpath/org/omg/IOP/ComponentIdHelper.java
@@ -0,0 +1,122 @@
+/* ComponentIdHelper.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;
+
+import org.omg.CORBA.Any;
+import org.omg.CORBA.BAD_OPERATION;
+import org.omg.CORBA.ORB;
+import org.omg.CORBA.StructMember;
+import org.omg.CORBA.TCKind;
+import org.omg.CORBA.TypeCode;
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+
+/**
+* A helper operations for th Component id. A Component Id is an integer
+* constant and needs no helper, but the one is included to
+* to facilitate the automated code handling.
+*
+* @specnote In this implementation, this class is not in use. Its "logical"
+* place is the read/write methods of the TaggedComponentHelper, to handle the
+* first member (int) of the record of the Tagged Component.
+*
+* @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+*/
+public abstract class ComponentIdHelper
+{
+ /**
+ * Create the ComponentId typecode (alias of CORBA ulong, named "ComponentId".
+ */
+ public static TypeCode type()
+ {
+ ORB orb = ORB.init();
+ return orb.create_alias_tc("IDL:omg.org/IOP/ComponentId:1.0", "ComponentId",
+ orb.get_primitive_tc(TCKind.tk_ulong)
+ );
+ }
+
+ /**
+ * Insert the int into the given Any.
+ */
+ public static void insert(Any any, int that)
+ {
+ any.insert_ulong(that);
+ }
+
+ /**
+ * Extract the int from given Any.
+ *
+ * @throws BAD_OPERATION if the passed Any does not contain int.
+ */
+ public static int extract(Any any)
+ {
+ return any.extract_ulong();
+ }
+
+ /**
+ * Get the int repository id.
+ *
+ * @return "IDL:omg.org/IOP/ComponentId:1.0", always.
+ */
+ public static String id()
+ {
+ return "IDL:omg.org/IOP/ComponentId:1.0";
+ }
+
+ /**
+ * Read the ComponentId from the CDR intput stream.
+ *
+ * @param input a org.omg.CORBA.portable stream to read from.
+ */
+ public static int read(InputStream input)
+ {
+ return input.read_ulong();
+ }
+
+ /**
+ * Write the ComponentId to the CDR output stream (as int).
+ *
+ * @param output a org.omg.CORBA.portable stream stream to write into.
+ * @param value a value to write.
+ */
+ public static void write(OutputStream output, int value)
+ {
+ output.write_ulong(value);
+ }
+} \ No newline at end of file
diff --git a/libjava/classpath/org/omg/IOP/ENCODING_CDR_ENCAPS.java b/libjava/classpath/org/omg/IOP/ENCODING_CDR_ENCAPS.java
new file mode 100644
index 00000000000..49cfe5d4c3b
--- /dev/null
+++ b/libjava/classpath/org/omg/IOP/ENCODING_CDR_ENCAPS.java
@@ -0,0 +1,58 @@
+/* ENCODING_CDR_ENCAPS.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>
+ * Holds an integer identifier of the ENCODING_CDR_ENCAPS encoding.
+ * This is the only encoding, required by OMG specification.
+ * </p><p>
+ * Apart the encoding format integer identifier, the encoding record
+ * contains the GIOP version number.
+ * </p>
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public interface ENCODING_CDR_ENCAPS
+{
+ /**
+ * Specifies the ENCODING_CDR_ENCAPS encoding, value 0.
+ */
+ short value = 0;
+}
diff --git a/libjava/classpath/org/omg/IOP/Encoding.java b/libjava/classpath/org/omg/IOP/Encoding.java
new file mode 100644
index 00000000000..5b36f646f9a
--- /dev/null
+++ b/libjava/classpath/org/omg/IOP/Encoding.java
@@ -0,0 +1,98 @@
+/* Encoding.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;
+
+import org.omg.CORBA.portable.IDLEntity;
+
+import java.io.Serializable;
+
+/**
+ * Defines the encoding format of the {@link Codec}, including the major
+ * and minor version numbers. The only currently supported encodings are
+ * ENCODING_CDR_ENCAPS versions 1.1 - 1.2. Vendors can implement additional
+ * encodings.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public class Encoding
+ implements IDLEntity, Serializable
+{
+ /**
+ * Use serialVersionUID (v1.4) for interoperability.
+ */
+ private static final long serialVersionUID = -1489257079856841992L;
+
+ /**
+ * The format of encoding. For instance, {@link ENCODING_CDR_ENCAPS#value}.
+ */
+ public short format;
+
+ /**
+ * The major version number of this encoding format.
+ */
+ public byte major_version;
+
+ /**
+ * The minor version number of this encoding format.
+ */
+ public byte minor_version;
+
+ /**
+ * Create the unitialised instance.
+ */
+ public Encoding()
+ {
+ }
+
+ /**
+ * Create the instance, initialising field to the passed values.
+ *
+ * @param _format the format of encoding, like
+ * {@link ENCODING_CDR_ENCAPS#value}.
+ *
+ * @param _major_version the major format version.
+ * @param _minor_version the minor format version.
+ */
+ public Encoding(short _format, byte _major_version, byte _minor_version)
+ {
+ format = _format;
+ major_version = _major_version;
+ minor_version = _minor_version;
+ }
+} \ No newline at end of file
diff --git a/libjava/classpath/org/omg/IOP/IOR.java b/libjava/classpath/org/omg/IOP/IOR.java
new file mode 100644
index 00000000000..7ff6dc1eb37
--- /dev/null
+++ b/libjava/classpath/org/omg/IOP/IOR.java
@@ -0,0 +1,112 @@
+/* IOR.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;
+
+import org.omg.CORBA.portable.IDLEntity;
+
+import java.io.Serializable;
+
+/**
+ * <p>
+ * The object IOR contains sufficient information for finding local or
+ * remote CORBA object. It also contains additional data like the object
+ * native and supported char sets, URLs to download the required additional
+ * java classes and so on. IOR can define multiple alternative addresses
+ * for the same object or indicate that the object is equal to null.
+ * </p><p>
+ * The IOR is a standard structure, transferred when sending an object with
+ * {@link org.omg.CORBA.portable.OutputStream#write_Object} and receiving with
+ * {@link org.omg.CORBA.portable.InputStream#read_Object}. The stringified
+ * object references, managed by {@link org.omg.CORBA.ORB#string_to_object}
+ * and {@link org.omg.CORBA.ORB#object_to_string} are also IORs, where the
+ * initially binary data are encoded as strings using hexadecimal notation.
+ * </p><p>
+ * The IOR is represented as the object repository id, followed
+ * by the sequence of the abstract profiles, each having the integer type
+ * identifier and the followed array of binary data. The empty sequence of
+ * profiles represents a null object, written, for instance, in response
+ * to the call of write_Object(null).
+ *
+ * @specnote GNU Classpath has its own implementation of IOR machinery at
+ * gnu.CORBA.IOR. The reason is that IORs are required from 1.2, but only
+ * in 1.4 the associated classes appear in the public API.
+ */
+public class IOR
+ implements IDLEntity, Serializable
+{
+ /**
+ * Use serialVersionUID (v1.4) for interoperability.
+ */
+ private static final long serialVersionUID = 1901439890645554948L;
+
+ /**
+ * The profiles, associated with this IOR reference. The possible
+ * profiles are listed in {@link TaggedProfile} description.
+ */
+ public TaggedProfile[] profiles;
+
+ /**
+ * The object repository Id.
+ */
+ public String type_id;
+
+ /**
+ * Create an unitialised instance of IOR profile.
+ *
+ * @specnote The profile will be intialised to the IOR, representing
+ * a null object.
+ */
+ public IOR()
+ {
+ type_id = "";
+ profiles = new TaggedProfile[ 0 ];
+ }
+
+ /**
+ * Create the IOR, initialised with the passed data.
+ *
+ * @param _type_id the repository id for this IOR object.
+ * @param _profiles the array of profiles for this IOR.
+ */
+ public IOR(String _type_id, TaggedProfile[] _profiles)
+ {
+ type_id = _type_id;
+ profiles = _profiles;
+ }
+} \ No newline at end of file
diff --git a/libjava/classpath/org/omg/IOP/IORHelper.java b/libjava/classpath/org/omg/IOP/IORHelper.java
new file mode 100644
index 00000000000..5945bb75aa4
--- /dev/null
+++ b/libjava/classpath/org/omg/IOP/IORHelper.java
@@ -0,0 +1,163 @@
+/* IORHelper.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;
+
+import org.omg.CORBA.Any;
+import org.omg.CORBA.BAD_OPERATION;
+import org.omg.CORBA.ORB;
+import org.omg.CORBA.StructMember;
+import org.omg.CORBA.TCKind;
+import org.omg.CORBA.TypeCode;
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+
+/**
+* A helper operations for the structure {@link IOR}.
+*
+* @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+*/
+public abstract class IORHelper
+{
+ /**
+ * The cached typecode value, computed only once.
+ */
+ private static TypeCode typeCode;
+
+ /**
+ * Create the IOR typecode (structure,
+ * named "IOR").
+ * The typecode states that the structure contains the
+ * following fields: type_id, profiles.
+ */
+ public static TypeCode type()
+ {
+ if (typeCode == null)
+ {
+ ORB orb = ORB.init();
+ StructMember[] members = new StructMember[ 2 ];
+
+ TypeCode field;
+
+ field = orb.get_primitive_tc(TCKind.tk_string);
+ members [ 0 ] = new StructMember("type_id", field, null);
+
+ field = orb.create_sequence_tc(0, TaggedProfileHelper.type());
+ members [ 1 ] = new StructMember("profiles", field, null);
+ typeCode = orb.create_struct_tc(id(), "IOR", members);
+ }
+ return typeCode;
+ }
+
+ /**
+ * Insert the IOR into the given Any.
+ * This method uses the IORHolder.
+ *
+ * @param any the Any to insert into.
+ * @param that the IOR to insert.
+ */
+ public static void insert(Any any, IOR that)
+ {
+ any.insert_Streamable(new IORHolder(that));
+ }
+
+ /**
+ * Extract the IOR from given Any.
+ * This method uses the IORHolder.
+ *
+ * @throws BAD_OPERATION if the passed Any does not contain IOR.
+ */
+ public static IOR extract(Any any)
+ {
+ try
+ {
+ return ((IORHolder) any.extract_Streamable()).value;
+ }
+ catch (ClassCastException cex)
+ {
+ BAD_OPERATION bad = new BAD_OPERATION("IOR expected");
+ bad.initCause(cex);
+ throw bad;
+ }
+ }
+
+ /**
+ * Get the IOR repository id.
+ *
+ * @return "IDL:omg.org/IOP/IOR:1.0", always.
+ */
+ public static String id()
+ {
+ return "IDL:omg.org/IOP/IOR:1.0";
+ }
+
+ /**
+ * Read the structure from the CDR intput stream. Expects repository
+ * it, then number of the tagged profiles and then the tagged profiles.
+ * Does not expect the endian indicator, present in the beginning of the
+ * stringified IOR references.
+ *
+ * @param input a org.omg.CORBA.portable stream to read from.
+ */
+ public static IOR read(InputStream input)
+ {
+ IOR value = new IOR();
+ value.type_id = input.read_string();
+ value.profiles = new TaggedProfile[ input.read_long() ];
+ for (int i0 = 0; i0 < value.profiles.length; i0++)
+ value.profiles [ i0 ] = TaggedProfileHelper.read(input);
+ return value;
+ }
+
+ /**
+ * Write the structure to the CDR output stream. Writes
+ * Expects repository it, then number of the tagged profiles and then
+ * the tagged profiles. Will not write the endian indicator, present
+ * in the beginning of the stringified IOR references.
+ *
+ * @param output a org.omg.CORBA.portable stream stream to write into.
+ * @param value a value to write.
+ */
+ public static void write(OutputStream output, IOR value)
+ {
+ output.write_string(value.type_id);
+ output.write_long(value.profiles.length);
+ for (int i0 = 0; i0 < value.profiles.length; i0++)
+ TaggedProfileHelper.write(output, value.profiles [ i0 ]);
+ }
+} \ No newline at end of file
diff --git a/libjava/classpath/org/omg/IOP/IORHolder.java b/libjava/classpath/org/omg/IOP/IORHolder.java
new file mode 100644
index 00000000000..cdf0d74d5d6
--- /dev/null
+++ b/libjava/classpath/org/omg/IOP/IORHolder.java
@@ -0,0 +1,103 @@
+/* IORHolder.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;
+
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+import org.omg.CORBA.portable.Streamable;
+
+/**
+* A holder for the {@link IOR}.
+*
+* @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+*/
+public class IORHolder
+ implements Streamable
+{
+ /**
+ * The stored IOR value.
+ */
+ public IOR value;
+
+ /**
+ * Create the unitialised instance, leaving the value field
+ * with default <code>null</code> value.
+ */
+ public IORHolder()
+ {
+ }
+
+ /**
+ * Create the initialised instance.
+ * @param initialValue the value that will be assigned to
+ * the <code>value</code> field.
+ */
+ public IORHolder(IOR initialValue)
+ {
+ value = initialValue;
+ }
+
+ /**
+ * Fill in the {@link value} by data from the CDR stream.
+ *
+ * @param input the org.omg.CORBA.portable stream to read.
+ */
+ public void _read(InputStream input)
+ {
+ value = IORHelper.read(input);
+ }
+
+ /**
+ * Write the stored value into the CDR stream.
+ *
+ * @param output the org.omg.CORBA.portable stream to write.
+ */
+ public void _write(OutputStream output)
+ {
+ IORHelper.write(output, value);
+ }
+
+ /**
+ * Get the typecode of the IOR.
+ */
+ public org.omg.CORBA.TypeCode _type()
+ {
+ return IORHelper.type();
+ }
+} \ No newline at end of file
diff --git a/libjava/classpath/org/omg/IOP/MultipleComponentProfileHelper.java b/libjava/classpath/org/omg/IOP/MultipleComponentProfileHelper.java
new file mode 100644
index 00000000000..bc26068c94c
--- /dev/null
+++ b/libjava/classpath/org/omg/IOP/MultipleComponentProfileHelper.java
@@ -0,0 +1,144 @@
+/* MultipleComponentProfileHelper.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;
+
+import org.omg.CORBA.ORB;
+import org.omg.CORBA.Any;
+import org.omg.CORBA.TypeCode;
+import org.omg.CORBA.TCKind;
+import org.omg.CORBA.BAD_OPERATION;
+
+import org.omg.CORBA.portable.OutputStream;
+import org.omg.CORBA.portable.InputStream;
+
+ /**
+ * A helper operations for the array of {@link TaggedComponent}
+ * ({@link MultipleComponentProfile}).
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public abstract class MultipleComponentProfileHelper
+{
+ /**
+ * The cached typecode value, computed only once.
+ */
+ private static TypeCode typeCode;
+
+ public static TypeCode type()
+ {
+ if (typeCode == null)
+ {
+ ORB orb = ORB.init();
+ typeCode = orb.create_sequence_tc(0, TaggedComponentHelper.type());
+ }
+ return typeCode;
+ }
+ /**
+ * Insert the MultipleComponentProfile into the given Any.
+ * This method uses the MultipleComponentProfileHolder.
+ *
+ * @param any the Any to insert into.
+ * @param those the TaggedComponent[] to insert.
+ */
+ public static void insert(Any any, TaggedComponent[] those)
+ {
+ any.insert_Streamable(new MultipleComponentProfileHolder(those));
+ }
+
+ /**
+ * Extract the MultipleComponentProfile from given Any.
+ * This method uses the MultipleComponentProfileHolder.
+ *
+ * @throws BAD_OPERATION if the passed Any does not contain MultipleComponentProfile.
+ */
+ public static TaggedComponent[] extract(Any any)
+ {
+ try
+ {
+ return ((MultipleComponentProfileHolder) any.extract_Streamable()).value;
+ }
+ catch (ClassCastException cex)
+ {
+ BAD_OPERATION bad = new BAD_OPERATION("MultipleComponentProfile expected");
+ bad.initCause(cex);
+ throw bad;
+ }
+ }
+
+ /**
+ * Get the MultipleComponentProfile repository id.
+ *
+ * @return "IDL:omg.org/IOP/MultipleComponentProfile:1.0", always.
+ */
+ public static String id()
+ {
+ return "IDL:omg.org/IOP/MultipleComponentProfile:1.0";
+ }
+
+ /**
+ * Read the sequence from the CDR intput stream.
+ * Expects the array size (as CORBA long), followed by
+ * the array members (if any).
+ *
+ * @param input a org.omg.CORBA.portable stream to read from.
+ */
+ public static TaggedComponent[] read(InputStream input)
+ {
+ TaggedComponent[] value;
+ value = new TaggedComponent[ input.read_long() ];
+ for (int i0 = 0; i0 < value.length; i0++)
+ value[i0] = TaggedComponentHelper.read(input);
+ return value;
+ }
+
+ /**
+ * Write the structure to the CDR output stream.
+ * Writes the array size (as CORBA long), followed by
+ * the array members (if any).
+ *
+ * @param output a org.omg.CORBA.portable stream stream to write into.
+ * @param value an array to write.
+ */
+ public static void write(OutputStream output, TaggedComponent[] value)
+ {
+ output.write_long(value.length);
+ for (int i0 = 0; i0 < value.length; i0++)
+ TaggedComponentHelper.write(output, value[i0]);
+ }
+} \ No newline at end of file
diff --git a/libjava/classpath/org/omg/IOP/MultipleComponentProfileHolder.java b/libjava/classpath/org/omg/IOP/MultipleComponentProfileHolder.java
new file mode 100644
index 00000000000..ee9652282f4
--- /dev/null
+++ b/libjava/classpath/org/omg/IOP/MultipleComponentProfileHolder.java
@@ -0,0 +1,105 @@
+/* MultipleComponentProfileHolder.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;
+
+import org.omg.CORBA.portable.Streamable;
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+
+
+/**
+ * A holder for the sequence of {@link TaggedComponent}
+ * ({@link MultipleComponentProfile}).
+ *
+* @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public class MultipleComponentProfileHolder
+ implements Streamable
+{
+ /**
+ * The stored array of <code>TaggedComponent</code>.
+ */
+ public TaggedComponent[] value;
+
+ /**
+ * Create the unitialised instance, leaving the value array
+ * with default <code>null</code> value.
+ */
+ public MultipleComponentProfileHolder()
+ {
+ }
+
+ /**
+ * Create the initialised instance.
+ * @param initialValue the array that will be assigned to
+ * the <code>value</code> array.
+ */
+ public MultipleComponentProfileHolder(TaggedComponent[] initialValue)
+ {
+ value = initialValue;
+ }
+
+ /**
+ * Read the {@link value} array from the CDR stream.
+ *
+ * @param input the org.omg.CORBA.portable stream to read.
+ */
+ public void _read(InputStream input)
+ {
+ value = MultipleComponentProfileHelper.read(input);
+ }
+
+ /**
+ * Write the stored value into the CDR stream.
+ *
+ * @param output the org.omg.CORBA.portable stream to write.
+ */
+ public void _write(OutputStream output)
+ {
+ MultipleComponentProfileHelper.write(output, value);
+ }
+
+ /**
+ * Get the typecode of the TaggedComponent.
+ */
+ public org.omg.CORBA.TypeCode _type()
+ {
+ return MultipleComponentProfileHelper.type();
+ }
+}
diff --git a/libjava/classpath/org/omg/IOP/ProfileIdHelper.java b/libjava/classpath/org/omg/IOP/ProfileIdHelper.java
new file mode 100644
index 00000000000..2e3c8f08dbf
--- /dev/null
+++ b/libjava/classpath/org/omg/IOP/ProfileIdHelper.java
@@ -0,0 +1,123 @@
+/* ProfileIdHelper.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;
+
+import org.omg.CORBA.Any;
+import org.omg.CORBA.BAD_OPERATION;
+import org.omg.CORBA.ORB;
+import org.omg.CORBA.StructMember;
+import org.omg.CORBA.TCKind;
+import org.omg.CORBA.TypeCode;
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+
+/**
+* A helper operations for th Profile id. A Profile Id is an integer
+* constant and needs no helper, but the one is included to
+* to facilitate the automated code handling.
+*
+* @specnote In this implementation, this class is not in use. Its "logical"
+* place is the read/write methods of the TaggedProfileHelper, to handle the
+* first member (int) of the record of the tagged profile.
+*
+* @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+*/
+public abstract class ProfileIdHelper
+{
+ /**
+ * Create the ProfileId typecode (alias of CORBA ulong, named "ProfileId".
+ */
+ public static TypeCode type()
+ {
+ ORB orb = ORB.init();
+ return orb.create_alias_tc("IDL:omg.org/IOP/ProfileId:1.0", "ProfileId",
+ orb.get_primitive_tc(TCKind.tk_ulong)
+ );
+ }
+
+ /**
+ * Insert the int into the given Any.
+ */
+ public static void insert(Any any, int that)
+ {
+ any.insert_ulong(that);
+ }
+
+ /**
+ * Extract the int from given Any.
+ * This method uses the ProfileContextHolder.
+ *
+ * @throws BAD_OPERATION if the passed Any does not contain int.
+ */
+ public static int extract(Any any)
+ {
+ return any.extract_ulong();
+ }
+
+ /**
+ * Get the int repository id.
+ *
+ * @return "IDL:omg.org/IOP/ProfileId:1.0", always.
+ */
+ public static String id()
+ {
+ return "IDL:omg.org/IOP/ProfileId:1.0";
+ }
+
+ /**
+ * Read the ProfileId from the CDR intput stream.
+ *
+ * @param input a org.omg.CORBA.portable stream to read from.
+ */
+ public static int read(InputStream input)
+ {
+ return input.read_ulong();
+ }
+
+ /**
+ * Write the ProfileId to the CDR output stream.
+ *
+ * @param output a org.omg.CORBA.portable stream stream to write into.
+ * @param value a value to write.
+ */
+ public static void write(OutputStream output, int value)
+ {
+ output.write_ulong(value);
+ }
+} \ No newline at end of file
diff --git a/libjava/classpath/org/omg/IOP/ServiceContext.java b/libjava/classpath/org/omg/IOP/ServiceContext.java
new file mode 100644
index 00000000000..0dcd7781e26
--- /dev/null
+++ b/libjava/classpath/org/omg/IOP/ServiceContext.java
@@ -0,0 +1,95 @@
+/* ServiceContext.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;
+
+import org.omg.CORBA.portable.IDLEntity;
+
+import java.io.Serializable;
+
+/**
+ * The ServiceContext structure contains the service data, being passed in the
+ * CORBA message. For instance, then passing the wide characters, it is
+ * mandatory to include the service context, defining the used encoding.
+ * The contexts are recognised by they integer indentifier.
+ * In this class, the content of the context is represented as an abstract
+ * array of bytes.
+ *
+ * @see ServiceContextHolder
+ * @see ServiceContextHelper
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public class ServiceContext
+ implements IDLEntity, Serializable
+{
+ /**
+ * Use serialVersionUID (v1.4) for interoperability.
+ */
+ private static final long serialVersionUID = -2232391417465261379L;
+
+ /**
+ * The context id (for instance, 0x1 for code sets context).
+ * At the moment of writing, the OMG defines 16 standard values and
+ * provides rules to register the vendor specific context ids.
+ * The range 0-4095 is reserved for the future standard OMG contexts.
+ */
+ public int context_id;
+
+ /**
+ * The context_data.
+ */
+ public byte[] context_data;
+
+ /**
+ * Create the unitialised instance, assigning to
+ * the all fields java default values.
+ */
+ public ServiceContext()
+ {
+ }
+
+ /**
+ * Create the instance, initialising the fields to the given values.
+ */
+ public ServiceContext(int a_context_id, byte[] a_context_data)
+ {
+ this.context_id = a_context_id;
+ this.context_data = a_context_data;
+ }
+} \ No newline at end of file
diff --git a/libjava/classpath/org/omg/IOP/ServiceContextHelper.java b/libjava/classpath/org/omg/IOP/ServiceContextHelper.java
new file mode 100644
index 00000000000..a8224a64cdc
--- /dev/null
+++ b/libjava/classpath/org/omg/IOP/ServiceContextHelper.java
@@ -0,0 +1,163 @@
+/* ServiceContextHelper.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;
+
+import org.omg.CORBA.Any;
+import org.omg.CORBA.BAD_OPERATION;
+import org.omg.CORBA.ORB;
+import org.omg.CORBA.StructMember;
+import org.omg.CORBA.TCKind;
+import org.omg.CORBA.TypeCode;
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+
+/**
+* A helper operations for the structure {@link ServiceContext}.
+*
+* @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+*/
+public abstract class ServiceContextHelper
+{
+ /**
+ * The cached typecode value, computed only once.
+ */
+ private static TypeCode typeCode;
+
+ /**
+ * Create the ServiceContext typecode (structure,
+ * named "ServiceContext").
+ * The typecode states that the structure contains the
+ * following fields: context_id, context_data.
+ */
+ public static TypeCode type()
+ {
+ if (typeCode == null)
+ {
+ ORB orb = ORB.init();
+ StructMember[] members = new StructMember[ 2 ];
+
+ TypeCode field;
+
+ field =
+ orb.create_alias_tc("IDL:omg.org/IOP/ServiceId:1.0", "ServiceId",
+ orb.get_primitive_tc(TCKind.tk_ulong)
+ );
+ members [ 0 ] = new StructMember("context_id", field, null);
+
+ field =
+ orb.create_sequence_tc(0, orb.get_primitive_tc(TCKind.tk_octet));
+ members [ 1 ] = new StructMember("context_data", field, null);
+ typeCode = orb.create_struct_tc(id(), "ServiceContext", members);
+ }
+ return typeCode;
+ }
+
+ /**
+ * Insert the ServiceContext into the given Any.
+ * This method uses the ServiceContextHolder.
+ *
+ * @param any the Any to insert into.
+ * @param that the ServiceContext to insert.
+ */
+ public static void insert(Any any, ServiceContext that)
+ {
+ any.insert_Streamable(new ServiceContextHolder(that));
+ }
+
+ /**
+ * Extract the ServiceContext from given Any.
+ * This method uses the ServiceContextHolder.
+ *
+ * @throws BAD_OPERATION if the passed Any does not contain ServiceContext.
+ */
+ public static ServiceContext extract(Any any)
+ {
+ try
+ {
+ return ((ServiceContextHolder) any.extract_Streamable()).value;
+ }
+ catch (ClassCastException cex)
+ {
+ BAD_OPERATION bad = new BAD_OPERATION("ServiceContext expected");
+ bad.initCause(cex);
+ throw bad;
+ }
+ }
+
+ /**
+ * Get the ServiceContext repository id.
+ *
+ * @return "IDL:omg.org/IOP/ServiceContext:1.0", always.
+ */
+ public static String id()
+ {
+ return "IDL:omg.org/IOP/ServiceContext:1.0";
+ }
+
+ /**
+ * Read the context from the CDR intput stream (first id, then
+ * data as a flexible length byte sequence).
+ *
+ * @param input a org.omg.CORBA.portable stream to read from.
+ */
+ public static ServiceContext read(InputStream input)
+ {
+ ServiceContext value = new ServiceContext();
+ value.context_id = input.read_long();
+ value.context_data = new byte[ input.read_long() ];
+ for (int i0 = 0; i0 < value.context_data.length; i0++)
+ value.context_data [ i0 ] = input.read_octet();
+ return value;
+ }
+
+ /**
+ * Write the context to the CDR output stream (first id, then
+ * data as a flexible length byte sequence).
+ *
+ * @param output a org.omg.CORBA.portable stream stream to write into.
+ * @param value a value to write.
+ */
+ public static void write(OutputStream output, ServiceContext value)
+ {
+ output.write_long(value.context_id);
+ output.write_long(value.context_data.length);
+ for (int i0 = 0; i0 < value.context_data.length; i0++)
+ output.write_octet(value.context_data [ i0 ]);
+ }
+} \ No newline at end of file
diff --git a/libjava/classpath/org/omg/IOP/ServiceContextHolder.java b/libjava/classpath/org/omg/IOP/ServiceContextHolder.java
new file mode 100644
index 00000000000..28dcb3ea5af
--- /dev/null
+++ b/libjava/classpath/org/omg/IOP/ServiceContextHolder.java
@@ -0,0 +1,103 @@
+/* ServiceContextHolder.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;
+
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+import org.omg.CORBA.portable.Streamable;
+
+/**
+* A holder for the structure {@link ServiceContext}.
+*
+* @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+*/
+public class ServiceContextHolder
+ implements Streamable
+{
+ /**
+ * The stored ServiceContext value.
+ */
+ public ServiceContext value;
+
+ /**
+ * Create the unitialised instance, leaving the value field
+ * with default <code>null</code> value.
+ */
+ public ServiceContextHolder()
+ {
+ }
+
+ /**
+ * Create the initialised instance.
+ * @param initialValue the value that will be assigned to
+ * the <code>value</code> field.
+ */
+ public ServiceContextHolder(ServiceContext initialValue)
+ {
+ value = initialValue;
+ }
+
+ /**
+ * Fill in the {@link value} by data from the CDR stream.
+ *
+ * @param input the org.omg.CORBA.portable stream to read.
+ */
+ public void _read(InputStream input)
+ {
+ value = ServiceContextHelper.read(input);
+ }
+
+ /**
+ * Write the stored value into the CDR stream.
+ *
+ * @param output the org.omg.CORBA.portable stream to write.
+ */
+ public void _write(OutputStream output)
+ {
+ ServiceContextHelper.write(output, value);
+ }
+
+ /**
+ * Get the typecode of the ServiceContext.
+ */
+ public org.omg.CORBA.TypeCode _type()
+ {
+ return ServiceContextHelper.type();
+ }
+} \ No newline at end of file
diff --git a/libjava/classpath/org/omg/IOP/ServiceContextListHelper.java b/libjava/classpath/org/omg/IOP/ServiceContextListHelper.java
new file mode 100644
index 00000000000..11bbe253fea
--- /dev/null
+++ b/libjava/classpath/org/omg/IOP/ServiceContextListHelper.java
@@ -0,0 +1,142 @@
+/* ServiceContextListHelper.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;
+
+import org.omg.CORBA.Any;
+import org.omg.CORBA.BAD_OPERATION;
+import org.omg.CORBA.ORB;
+import org.omg.CORBA.TypeCode;
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+
+/**
+* The helper operations for the
+* CORBA object {@link ServiceContext[]}.
+*
+* @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+*/
+public abstract class ServiceContextListHelper
+{
+ /**
+ * The cached {@link ServiceContext[]} typecode, computed once.
+ */
+ private static TypeCode typeCode;
+
+ /**
+ * Get the type code of the {@link ServiceContext[]}.
+ */
+ public static TypeCode type()
+ {
+ if (typeCode == null)
+ typeCode = ORB.init().create_interface_tc(id(), "ServiceContextList");
+ return typeCode;
+ }
+
+ /**
+ * Insert the ServiceContext[] into the given Any.
+ *
+ * @param any the Any to insert into.
+ * @param that the ServiceContext[] to insert.
+ */
+ public static void insert(Any any, ServiceContext[] that)
+ {
+ any.insert_Streamable(new ServiceContextListHolder(that));
+ }
+
+ /**
+ * Extract the ServiceContext[] from given Any.
+ *
+ * @throws BAD_OPERATION if the passed Any does not contain ServiceContext[].
+ */
+ public static ServiceContext[] extract(Any any)
+ {
+ try
+ {
+ ServiceContextListHolder holder =
+ (ServiceContextListHolder) any.extract_Streamable();
+ return holder.value;
+ }
+ catch (ClassCastException ex)
+ {
+ throw new BAD_OPERATION("ServiceContext[] expected.");
+ }
+ }
+
+ /**
+ * Get the ServiceContext[] repository id.
+ *
+ * @return "IDL:omg.org/IOP/ServiceContextList:1.0", always.
+ */
+ public static String id()
+ {
+ return "IDL:omg.org/IOP/ServiceContextList:1.0";
+ }
+
+ /**
+ * Read the ServiceContext[] from the CDR intput stream as a flexible lenth
+ * sequence.
+ *
+ * @param input a org.omg.CORBA.portable stream to read from.
+ */
+ public static ServiceContext[] read(InputStream input)
+ {
+ ServiceContext[] value = new ServiceContext[ input.read_long() ];
+ for (int i = 0; i < value.length; i++)
+ {
+ value [ i ] = ServiceContextHelper.read(input);
+ }
+ return value;
+ }
+
+ /**
+ * Write the ServiceContext[] to the CDR output stream as a flexible length
+ * sequence.
+ *
+ * @param output a org.omg.CORBA.portable stream stream to write into.
+ * @param value a value to write.
+ */
+ public static void write(OutputStream output, ServiceContext[] value)
+ {
+ output.write_long(value.length);
+ for (int i = 0; i < value.length; i++)
+ {
+ ServiceContextHelper.write(output, value [ i ]);
+ }
+ }
+} \ No newline at end of file
diff --git a/libjava/classpath/org/omg/IOP/ServiceContextListHolder.java b/libjava/classpath/org/omg/IOP/ServiceContextListHolder.java
new file mode 100644
index 00000000000..2a186101dd1
--- /dev/null
+++ b/libjava/classpath/org/omg/IOP/ServiceContextListHolder.java
@@ -0,0 +1,103 @@
+/* ServiceContextListHolder.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;
+
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+import org.omg.CORBA.portable.Streamable;
+
+/**
+* A holder for the sequence of the {@link ServiceContext}s.
+*
+* @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+*/
+public class ServiceContextListHolder
+ implements Streamable
+{
+ /**
+ * The stored ServiceContext[] value.
+ */
+ public ServiceContext[] value;
+
+ /**
+ * Create the unitialised instance, leaving the value field
+ * with default <code>null</code> value.
+ */
+ public ServiceContextListHolder()
+ {
+ }
+
+ /**
+ * Create the initialised instance.
+ * @param initialValue the value that will be assigned to
+ * the <code>value</code> field.
+ */
+ public ServiceContextListHolder(ServiceContext[] initialValue)
+ {
+ value = initialValue;
+ }
+
+ /**
+ * Fill in the {@link value} by data from the CDR stream.
+ *
+ * @param input the org.omg.CORBA.portable stream to read.
+ */
+ public void _read(InputStream input)
+ {
+ value = ServiceContextListHelper.read(input);
+ }
+
+ /**
+ * Write the stored value into the CDR stream.
+ *
+ * @param output the org.omg.CORBA.portable stream to write.
+ */
+ public void _write(OutputStream output)
+ {
+ ServiceContextListHelper.write(output, value);
+ }
+
+ /**
+ * Get the typecode of the ServiceContext[].
+ */
+ public org.omg.CORBA.TypeCode _type()
+ {
+ return ServiceContextListHelper.type();
+ }
+} \ No newline at end of file
diff --git a/libjava/classpath/org/omg/IOP/ServiceIdHelper.java b/libjava/classpath/org/omg/IOP/ServiceIdHelper.java
new file mode 100644
index 00000000000..fac0746a82a
--- /dev/null
+++ b/libjava/classpath/org/omg/IOP/ServiceIdHelper.java
@@ -0,0 +1,123 @@
+/* ServiceIdHelper.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;
+
+import org.omg.CORBA.Any;
+import org.omg.CORBA.BAD_OPERATION;
+import org.omg.CORBA.ORB;
+import org.omg.CORBA.StructMember;
+import org.omg.CORBA.TCKind;
+import org.omg.CORBA.TypeCode;
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+
+/**
+* A helper operations for a context service id. A service Id is an integer
+* constant and needs no helper, but the one is included to
+* to facilitate the automated code handling.
+*
+* @specnote In this implementation, this class is not in use. Its "logical"
+* place is the read/write methods of the ServiceContextHelper, to handle the
+* first member (int) of the context record.
+*
+* @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+*/
+public abstract class ServiceIdHelper
+{
+ /**
+ * Create the ServiceId typecode (alias of CORBA ulong, named "ServiceId".
+ */
+ public static TypeCode type()
+ {
+ ORB orb = ORB.init();
+ return orb.create_alias_tc("IDL:omg.org/IOP/ServiceId:1.0", "ServiceId",
+ orb.get_primitive_tc(TCKind.tk_ulong)
+ );
+ }
+
+ /**
+ * Insert the int into the given Any.
+ */
+ public static void insert(Any any, int that)
+ {
+ any.insert_ulong(that);
+ }
+
+ /**
+ * Extract the int from given Any.
+ * This method uses the ServiceContextHolder.
+ *
+ * @throws BAD_OPERATION if the passed Any does not contain int.
+ */
+ public static int extract(Any any)
+ {
+ return any.extract_ulong();
+ }
+
+ /**
+ * Get the int repository id.
+ *
+ * @return "IDL:omg.org/IOP/ServiceId:1.0", always.
+ */
+ public static String id()
+ {
+ return "IDL:omg.org/IOP/ServiceId:1.0";
+ }
+
+ /**
+ * Read the ServiceId from the CDR intput stream.
+ *
+ * @param input a org.omg.CORBA.portable stream to read from.
+ */
+ public static int read(InputStream input)
+ {
+ return input.read_ulong();
+ }
+
+ /**
+ * Write the ServiceId to the CDR output stream.
+ *
+ * @param output a org.omg.CORBA.portable stream stream to write into.
+ * @param value a value to write.
+ */
+ public static void write(OutputStream output, int value)
+ {
+ output.write_ulong(value);
+ }
+} \ No newline at end of file
diff --git a/libjava/classpath/org/omg/IOP/TAG_ALTERNATE_IIOP_ADDRESS.java b/libjava/classpath/org/omg/IOP/TAG_ALTERNATE_IIOP_ADDRESS.java
new file mode 100644
index 00000000000..13cb1c689cd
--- /dev/null
+++ b/libjava/classpath/org/omg/IOP/TAG_ALTERNATE_IIOP_ADDRESS.java
@@ -0,0 +1,59 @@
+/* TAG_ALTERNATE_IIOP_ADDRESS.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;
+
+ /**
+ * Holds an integer constant of the TAG_ALTERNATE_IIOP_ADDRESS Component that
+ * may occur zero or more times in the Internet of Multiple components profile.
+ * The tag contains the possible alternative address (host and port) of
+ * the object being defined by IOR profile.
+ * This tag is supported since GIOP 1.2.
+ *
+ * @see TAG_INTERNET_IOP
+ * @see TAG_MULTIPLE_COMPONENTS
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public interface TAG_ALTERNATE_IIOP_ADDRESS
+{
+ /**
+ * Specifies the TAG_ALTERNATE_IIOP_ADDRESS value, 3.
+ */
+ int value = 3;
+}
diff --git a/libjava/classpath/org/omg/IOP/TAG_CODE_SETS.java b/libjava/classpath/org/omg/IOP/TAG_CODE_SETS.java
new file mode 100644
index 00000000000..cc775248379
--- /dev/null
+++ b/libjava/classpath/org/omg/IOP/TAG_CODE_SETS.java
@@ -0,0 +1,69 @@
+/* TAG_CODE_SETS.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>
+ * Holds the integer identifier of the code sets profile. The code sets
+ * profile provides information about the native and supported encodings
+ * for the "narrow" (usually 8 bit) and "wide" (usually 16 bit) characters.
+ * In Gnu Classpath implementation the class, responsible for providing
+ * this information is {@link gnu.CORBA.CharSets_OSF}.
+ * </p>
+ * <p>
+ * If this profile is missing, it is assumed, that the "narrow" characters
+ * are encoded in ISO 8859-1. However there is no default encoding for the
+ * "wide" characters, and, if this profile is missing, the INV_OBJREF
+ * minor code 1 is thrown.
+ * </p>
+ * <p>
+ * The "narrow" characters are used in char and string.
+ * The "wide" characters are used in wchar and wstring and are not
+ * supported by GIOP 1.0.
+ * </p>
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public interface TAG_CODE_SETS
+{
+ /**
+ * Specifies the TAG_CODE_SETS value, 1.
+ */
+ int value = 1;
+}
diff --git a/libjava/classpath/org/omg/IOP/TAG_INTERNET_IOP.java b/libjava/classpath/org/omg/IOP/TAG_INTERNET_IOP.java
new file mode 100644
index 00000000000..59eed9d9fe8
--- /dev/null
+++ b/libjava/classpath/org/omg/IOP/TAG_INTERNET_IOP.java
@@ -0,0 +1,55 @@
+/* TAG_INTERNET_IOP.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;
+
+ /**
+ * Holds the integer identifier of the internet profile. The internet
+ * profile contains (in the given order) a supported GIOP
+ * version, an address of the remote host, a port of the remote host
+ * and an object key as the byte array.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public interface TAG_INTERNET_IOP
+{
+ /**
+ * Specifies the TAG_INTERNET_IOP value, 0.
+ */
+ int value = 0;
+}
diff --git a/libjava/classpath/org/omg/IOP/TAG_JAVA_CODEBASE.java b/libjava/classpath/org/omg/IOP/TAG_JAVA_CODEBASE.java
new file mode 100644
index 00000000000..df5a171fa40
--- /dev/null
+++ b/libjava/classpath/org/omg/IOP/TAG_JAVA_CODEBASE.java
@@ -0,0 +1,59 @@
+/* TAG_JAVA_CODEBASE.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>
+ * Holds an integer identifier of the TAG_JAVA_CODEBASE profile. This profile
+ * provides a space separated list of URLs, from where the required
+ * stubs and ties can be downloaded.
+ * </p><p>
+ * The this IOR profile component is used to provide the code source for
+ * stubs and ties. The code source for values and value helpers is
+ * transmitted when transferring the value itself.
+ * </p>
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public interface TAG_JAVA_CODEBASE
+{
+ /**
+ * Specifies the TAG_JAVA_CODEBASE value, 25.
+ */
+ int value = 25;
+}
diff --git a/libjava/classpath/org/omg/IOP/TAG_MULTIPLE_COMPONENTS.java b/libjava/classpath/org/omg/IOP/TAG_MULTIPLE_COMPONENTS.java
new file mode 100644
index 00000000000..5cb3cc007ab
--- /dev/null
+++ b/libjava/classpath/org/omg/IOP/TAG_MULTIPLE_COMPONENTS.java
@@ -0,0 +1,52 @@
+/* TAG_MULTIPLE_COMPONENTS.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;
+
+ /**
+ * Holds the integer identifier of the multiple components profile.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public interface TAG_MULTIPLE_COMPONENTS
+{
+ /**
+ * Specifies the TAG_MULTIPLE_COMPONENTS value, 1.
+ */
+ int value = 1;
+}
diff --git a/libjava/classpath/org/omg/IOP/TAG_ORB_TYPE.java b/libjava/classpath/org/omg/IOP/TAG_ORB_TYPE.java
new file mode 100644
index 00000000000..2fe7714f387
--- /dev/null
+++ b/libjava/classpath/org/omg/IOP/TAG_ORB_TYPE.java
@@ -0,0 +1,67 @@
+/* TAG_ORB_TYPE.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>
+ * Holds an integer constant of the TAG_ORB_TYPE Component that defines
+ * the kind or CORBA implementation of ORB the reference is comming from.
+ * This information may be useful to work around problems with that
+ * particular ORB, or exploit shared efficiencies. This tag contains
+ * a single unsigned long value; these values are managed by OMG group.
+ * </p><p>
+ * Anyone may register any ORB types by submitting a one-paragraph
+ * description of the ORB type to the OMG, and will receive a new ORB
+ * type ID in return. A list of all ORB type descriptions should be
+ * available on the OMG web server.
+ * </p><p>
+ * TODO Register the GNU Classpath kind of ORB. Not registered at the moment.
+ * <p>
+ * @see TAG_INTERNET_IOP
+ * @see TAG_MULTIPLE_COMPONENTS
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public interface TAG_ORB_TYPE
+{
+ /**
+ * Specifies the TAG_ORB_TYPE value, 0.
+ */
+ int value = 0;
+}
diff --git a/libjava/classpath/org/omg/IOP/TAG_POLICIES.java b/libjava/classpath/org/omg/IOP/TAG_POLICIES.java
new file mode 100644
index 00000000000..65ccff88cdc
--- /dev/null
+++ b/libjava/classpath/org/omg/IOP/TAG_POLICIES.java
@@ -0,0 +1,54 @@
+/* TAG_POLICIES.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;
+
+ /**
+ * An integer identifier for the TAG_POLICIES component. This component
+ * contains the sequence of QoS (Quality of Service) policies exported
+ * with the object reference by an object adapter.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public interface TAG_POLICIES
+{
+ /**
+ * Specifies the TAG_POLICIES value, 2.
+ */
+ int value = 2;
+}
diff --git a/libjava/classpath/org/omg/IOP/TaggedComponent.java b/libjava/classpath/org/omg/IOP/TaggedComponent.java
new file mode 100644
index 00000000000..b8aa17f2d65
--- /dev/null
+++ b/libjava/classpath/org/omg/IOP/TaggedComponent.java
@@ -0,0 +1,93 @@
+/* TaggedComponent.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;
+
+import org.omg.CORBA.portable.IDLEntity;
+
+import java.io.Serializable;
+
+/**
+* The tagged component in a part of the {@link TaggedProfile}.
+* The examples of the possible components inside the tag are
+* {@link TAG_CODE_SETS}, {@link TAG_ALTERNATE_IIOP_ADDRESS},
+* {@link TAG_JAVA_CODEBASE}, {@link TAG_ORB_TYPE} and {@link TAG_POLICIES}.
+* The complete list (over 20 possible components) can be found
+* in OMG specification. Some of these components occur only once
+* (in the same TaggedProfile), others can be repeated.
+*
+* @see TaggedComponentHolder
+* @see TaggedComponentHelper
+*
+* @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+*/
+public class TaggedComponent
+ implements IDLEntity, Serializable
+{
+ /**
+ * Use serialVersionUID (v1.4) for interoperability.
+ */
+ private static final long serialVersionUID = -2084695346022761692L;
+
+ /**
+ * The integer tag identifier, for instance, TAG_CODE_SETS.value.
+ */
+ public int tag;
+
+ /**
+ * The tag component data.
+ */
+ public byte[] component_data;
+
+ /**
+ * Create the unitialised instance, assigning to
+ * the all fields java default values.
+ */
+ public TaggedComponent()
+ {
+ }
+
+ /**
+ * Create the instance, initialising the fields to the given values.
+ */
+ public TaggedComponent(int a_tag, byte[] a_component_data)
+ {
+ this.tag = a_tag;
+ this.component_data = a_component_data;
+ }
+} \ No newline at end of file
diff --git a/libjava/classpath/org/omg/IOP/TaggedComponentHelper.java b/libjava/classpath/org/omg/IOP/TaggedComponentHelper.java
new file mode 100644
index 00000000000..f432165429f
--- /dev/null
+++ b/libjava/classpath/org/omg/IOP/TaggedComponentHelper.java
@@ -0,0 +1,167 @@
+/* TaggedComponentHelper.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;
+
+import org.omg.CORBA.Any;
+import org.omg.CORBA.BAD_OPERATION;
+import org.omg.CORBA.ORB;
+import org.omg.CORBA.StructMember;
+import org.omg.CORBA.TCKind;
+import org.omg.CORBA.TypeCode;
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+
+/**
+* A helper operations for the {@link TaggedComponent}.
+*
+* @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+*/
+public abstract class TaggedComponentHelper
+{
+ /**
+ * The cached typecode value, computed only once.
+ */
+ private static TypeCode typeCode;
+
+ /**
+ * Create the TaggedComponent typecode (structure,
+ * named "TaggedComponent").
+ * The typecode states that the structure contains the
+ * following fields: tag, component_data.
+ */
+ public static TypeCode type()
+ {
+ if (typeCode == null)
+ {
+ ORB orb = ORB.init();
+ StructMember[] members = new StructMember[ 2 ];
+
+ TypeCode field;
+
+ field =
+ orb.create_alias_tc("IDL:omg.org/IOP/ComponentId:1.0", "ComponentId",
+ orb.get_primitive_tc(TCKind.tk_ulong)
+ );
+ members [ 0 ] = new StructMember("tag", field, null);
+
+ field =
+ orb.create_sequence_tc(0, orb.get_primitive_tc(TCKind.tk_octet));
+ members [ 1 ] = new StructMember("component_data", field, null);
+ typeCode = orb.create_struct_tc(id(), "TaggedComponent", members);
+ }
+ return typeCode;
+ }
+
+ /**
+ * Insert the TaggedComponent into the given Any.
+ * This method uses the TaggedComponentHolder.
+ *
+ * @param any the Any to insert into.
+ * @param that the TaggedComponent to insert.
+ */
+ public static void insert(Any any, TaggedComponent that)
+ {
+ any.insert_Streamable(new TaggedComponentHolder(that));
+ }
+
+ /**
+ * Extract the TaggedComponent from given Any.
+ * This method uses the TaggedComponentHolder.
+ *
+ * @throws BAD_OPERATION if the passed Any does not contain TaggedComponent.
+ */
+ public static TaggedComponent extract(Any any)
+ {
+ try
+ {
+ return ((TaggedComponentHolder) any.extract_Streamable()).value;
+ }
+ catch (ClassCastException cex)
+ {
+ BAD_OPERATION bad = new BAD_OPERATION("TaggedComponent expected");
+ bad.initCause(cex);
+ throw bad;
+ }
+ }
+
+ /**
+ * Get the TaggedComponent repository id.
+ *
+ * @return "IDL:omg.org/IOP/TaggedComponent:1.0", always.
+ */
+ public static String id()
+ {
+ return "IDL:omg.org/IOP/TaggedComponent:1.0";
+ }
+
+ /**
+ * Read the structure from the CDR intput stream. Expects the integer
+ * identifier of the tag, then the size of the tag data
+ * and then the specified number of bytes, representing the data
+ * of the tag.
+ *
+ * @param input a org.omg.CORBA.portable stream to read from.
+ */
+ public static TaggedComponent read(InputStream input)
+ {
+ TaggedComponent value = new TaggedComponent();
+ value.tag = input.read_long();
+ value.component_data = new byte[ input.read_long() ];
+ for (int i0 = 0; i0 < value.component_data.length; i0++)
+ value.component_data [ i0 ] = input.read_octet();
+ return value;
+ }
+
+ /**
+ * Write the structure to the CDR output stream.
+ * Writes the integer identifier of the tag, then the size of the tag data
+ * and then the specified number of bytes, representing the data
+ * of the tag.
+ *
+ * @param output a org.omg.CORBA.portable stream stream to write into.
+ * @param value a value to write.
+ */
+ public static void write(OutputStream output, TaggedComponent value)
+ {
+ output.write_long(value.tag);
+ output.write_long(value.component_data.length);
+ for (int i0 = 0; i0 < value.component_data.length; i0++)
+ output.write_octet(value.component_data [ i0 ]);
+ }
+} \ No newline at end of file
diff --git a/libjava/classpath/org/omg/IOP/TaggedComponentHolder.java b/libjava/classpath/org/omg/IOP/TaggedComponentHolder.java
new file mode 100644
index 00000000000..28df24f119c
--- /dev/null
+++ b/libjava/classpath/org/omg/IOP/TaggedComponentHolder.java
@@ -0,0 +1,103 @@
+/* TaggedComponentHolder.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;
+
+import org.omg.CORBA.portable.Streamable;
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+
+ /**
+ * A holder for the structure {@link TaggedComponent}.
+ *
+* @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public class TaggedComponentHolder
+ implements Streamable
+{
+ /**
+ * The stored TaggedComponent value.
+ */
+ public TaggedComponent value;
+
+ /**
+ * Create the unitialised instance, leaving the value field
+ * with default <code>null</code> value.
+ */
+ public TaggedComponentHolder()
+ {
+ }
+
+ /**
+ * Create the initialised instance.
+ * @param initialValue the value that will be assigned to
+ * the <code>value</code> field.
+ */
+ public TaggedComponentHolder(TaggedComponent initialValue)
+ {
+ value = initialValue;
+ }
+
+ /**
+ * Fill in the {@link value} by data from the CDR stream.
+ *
+ * @param input the org.omg.CORBA.portable stream to read.
+ */
+ public void _read(InputStream input)
+ {
+ value = TaggedComponentHelper .read(input);
+ }
+
+ /**
+ * Write the stored value into the CDR stream.
+ *
+ * @param output the org.omg.CORBA.portable stream to write.
+ */
+ public void _write(OutputStream output)
+ {
+ TaggedComponentHelper .write(output, value);
+ }
+
+ /**
+ * Get the typecode of the TaggedComponent.
+ */
+ public org.omg.CORBA.TypeCode _type()
+ {
+ return TaggedComponentHelper. type();
+ }
+}
diff --git a/libjava/classpath/org/omg/IOP/TaggedProfile.java b/libjava/classpath/org/omg/IOP/TaggedProfile.java
new file mode 100644
index 00000000000..66494fdb437
--- /dev/null
+++ b/libjava/classpath/org/omg/IOP/TaggedProfile.java
@@ -0,0 +1,110 @@
+/* TaggedProfile.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;
+
+import org.omg.CORBA.portable.IDLEntity;
+
+import java.io.Serializable;
+
+/**
+* The TaggedProfile if part of the {@link IOR}, defining a single specific
+* aspect of the object related information. The content of profile depends
+* on this information. It is represented here just as an array of
+* bytes. The OMG currently defines three types of the tagged profile:
+* <ul>
+* <li>The Internet profile, identified by {@link TAG_INTERNET_IOP},
+* supports the Internet Inter-ORB Protocol.
+* </li>
+* <li>The Multiple Components profile, identified by
+* {@link TAG_MULTIPLE_COMPONENTS}, may be used to carry various IOR
+* tagged components.
+* <li>
+* </li>
+* <li>The SCCP IOP profile (described in OMG CORBA/IN Interworking
+* specification).</li>
+* </ul>
+*
+* The tagged profile may have its internal tagged components. The examples
+* of the possible components inside the tag are {@link TAG_CODE_SETS},
+* {@link TAG_ALTERNATE_IIOP_ADDRESS}, {@link TAG_JAVA_CODEBASE},
+* {@link TAG_ORB_TYPE} and {@link TAG_POLICIES}. The complete list can only
+* be found in OMG specification. Some of them occur only once
+* (in the same TaggedProfile), others can be repeated.
+*
+* @see TaggedProfileHolder
+* @see TaggedProfileHelper
+*
+* @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+*/
+public class TaggedProfile
+ implements IDLEntity, Serializable
+{
+ /**
+ * Use serialVersionUID (v1.4) for interoperability.
+ */
+ private static final long serialVersionUID = -461232684387903343L;
+
+ /**
+ * The integer tag identifier, typically one of TAG_INTERNET_IOP.value or
+ * TAG_MULTIPLE_COMPONENTS.value.
+ */
+ public int tag;
+
+ /**
+ * The profile_data, represented here in the form of the array of bytes.
+ */
+ public byte[] profile_data;
+
+ /**
+ * Create the unitialised instance, assigning to
+ * the all fields java default values.
+ */
+ public TaggedProfile()
+ {
+ }
+
+ /**
+ * Create the instance, initialising the fields to the given values.
+ */
+ public TaggedProfile(int a_tag, byte[] a_profile_data)
+ {
+ tag = a_tag;
+ profile_data = a_profile_data;
+ }
+} \ No newline at end of file
diff --git a/libjava/classpath/org/omg/IOP/TaggedProfileHelper.java b/libjava/classpath/org/omg/IOP/TaggedProfileHelper.java
new file mode 100644
index 00000000000..0433e10cf6d
--- /dev/null
+++ b/libjava/classpath/org/omg/IOP/TaggedProfileHelper.java
@@ -0,0 +1,161 @@
+/* TaggedProfileHelper.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;
+
+import org.omg.CORBA.Any;
+import org.omg.CORBA.BAD_OPERATION;
+import org.omg.CORBA.ORB;
+import org.omg.CORBA.StructMember;
+import org.omg.CORBA.TCKind;
+import org.omg.CORBA.TypeCode;
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+
+/**
+* A helper operations for the structure {@link TaggedProfile}.
+*
+* @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+*/
+public abstract class TaggedProfileHelper
+{
+ /**
+ * The cached typecode value, computed only once.
+ */
+ private static TypeCode typeCode;
+
+ /**
+ * Create the TaggedProfile typecode (structure,
+ * named "TaggedProfile").
+ * The typecode states that the structure contains the
+ * following fields: tag, profile_data.
+ */
+ public static TypeCode type()
+ {
+ if (typeCode == null)
+ {
+ ORB orb = ORB.init();
+ StructMember[] members = new StructMember[ 2 ];
+
+ TypeCode field;
+
+ field =
+ orb.create_alias_tc("IDL:omg.org/IOP/ProfileId:1.0", "ProfileId",
+ orb.get_primitive_tc(TCKind.tk_ulong)
+ );
+ members [ 0 ] = new StructMember("tag", field, null);
+
+ field =
+ orb.create_sequence_tc(0, orb.get_primitive_tc(TCKind.tk_octet));
+ members [ 1 ] = new StructMember("profile_data", field, null);
+ typeCode = orb.create_struct_tc(id(), "TaggedProfile", members);
+ }
+ return typeCode;
+ }
+
+ /**
+ * Insert the TaggedProfile into the given Any.
+ * This method uses the TaggedProfileHolder.
+ *
+ * @param any the Any to insert into.
+ * @param that the TaggedProfile to insert.
+ */
+ public static void insert(Any any, TaggedProfile that)
+ {
+ any.insert_Streamable(new TaggedProfileHolder(that));
+ }
+
+ /**
+ * Extract the TaggedProfile from given Any.
+ * This method uses the TaggedProfileHolder.
+ *
+ * @throws BAD_OPERATION if the passed Any does not contain TaggedProfile.
+ */
+ public static TaggedProfile extract(Any any)
+ {
+ try
+ {
+ return ((TaggedProfileHolder) any.extract_Streamable()).value;
+ }
+ catch (ClassCastException cex)
+ {
+ BAD_OPERATION bad = new BAD_OPERATION("TaggedProfile expected");
+ bad.initCause(cex);
+ throw bad;
+ }
+ }
+
+ /**
+ * Get the TaggedProfile repository id.
+ *
+ * @return "IDL:omg.org/IOP/TaggedProfile:1.0", always.
+ */
+ public static String id()
+ {
+ return "IDL:omg.org/IOP/TaggedProfile:1.0";
+ }
+
+ /**
+ * Read the structure from the CDR intput stream.
+ *
+ * @param input a org.omg.CORBA.portable stream to read from.
+ */
+ public static TaggedProfile read(InputStream input)
+ {
+ TaggedProfile value = new TaggedProfile();
+ value.tag = input.read_long();
+ value.profile_data = new byte[ input.read_long() ];
+ for (int i0 = 0; i0 < value.profile_data.length; i0++)
+ value.profile_data [ i0 ] = input.read_octet();
+ return value;
+ }
+
+ /**
+ * Write the structure to the CDR output stream.
+ *
+ * @param output a org.omg.CORBA.portable stream stream to write into.
+ * @param value a value to write.
+ */
+ public static void write(OutputStream output, TaggedProfile value)
+ {
+ output.write_long(value.tag);
+ output.write_long(value.profile_data.length);
+ for (int i0 = 0; i0 < value.profile_data.length; i0++)
+ output.write_octet(value.profile_data [ i0 ]);
+ }
+} \ No newline at end of file
diff --git a/libjava/classpath/org/omg/IOP/TaggedProfileHolder.java b/libjava/classpath/org/omg/IOP/TaggedProfileHolder.java
new file mode 100644
index 00000000000..7edb1d46b9a
--- /dev/null
+++ b/libjava/classpath/org/omg/IOP/TaggedProfileHolder.java
@@ -0,0 +1,103 @@
+/* TaggedProfileHolder.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;
+
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+import org.omg.CORBA.portable.Streamable;
+
+/**
+* A holder for the structure {@link TaggedProfile}.
+*
+* @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+*/
+public class TaggedProfileHolder
+ implements Streamable
+{
+ /**
+ * The stored TaggedProfile value.
+ */
+ public TaggedProfile value;
+
+ /**
+ * Create the unitialised instance, leaving the value field
+ * with default <code>null</code> value.
+ */
+ public TaggedProfileHolder()
+ {
+ }
+
+ /**
+ * Create the initialised instance.
+ * @param initialValue the value that will be assigned to
+ * the <code>value</code> field.
+ */
+ public TaggedProfileHolder(TaggedProfile initialValue)
+ {
+ value = initialValue;
+ }
+
+ /**
+ * Fill in the {@link value} by data from the CDR stream.
+ *
+ * @param input the org.omg.CORBA.portable stream to read.
+ */
+ public void _read(InputStream input)
+ {
+ value = TaggedProfileHelper.read(input);
+ }
+
+ /**
+ * Write the stored value into the CDR stream.
+ *
+ * @param output the org.omg.CORBA.portable stream to write.
+ */
+ public void _write(OutputStream output)
+ {
+ TaggedProfileHelper.write(output, value);
+ }
+
+ /**
+ * Get the typecode of the TaggedProfile.
+ */
+ public org.omg.CORBA.TypeCode _type()
+ {
+ return TaggedProfileHelper.type();
+ }
+} \ No newline at end of file
diff --git a/libjava/classpath/org/omg/IOP/TransactionService.java b/libjava/classpath/org/omg/IOP/TransactionService.java
new file mode 100644
index 00000000000..2d987316c97
--- /dev/null
+++ b/libjava/classpath/org/omg/IOP/TransactionService.java
@@ -0,0 +1,56 @@
+/* TransactionService.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;
+
+
+/**
+* Holds the integer identifier of the TransactionService context.
+* The content of that data structure is defined by OMG as
+* CosTransactions::PropogationContext in the Object Transaction
+* Service specification (formal/00-06-28).
+*
+* @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+*/
+public interface TransactionService
+{
+ /**
+ * Specifies the TransactionService value, 0.
+ */
+ int value = 0;
+} \ No newline at end of file
diff --git a/libjava/classpath/org/omg/Messaging/SYNC_WITH_TRANSPORT.java b/libjava/classpath/org/omg/Messaging/SYNC_WITH_TRANSPORT.java
new file mode 100644
index 00000000000..0c31480b341
--- /dev/null
+++ b/libjava/classpath/org/omg/Messaging/SYNC_WITH_TRANSPORT.java
@@ -0,0 +1,74 @@
+/* SYNC_WITH_TRANSPORT.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.Messaging;
+
+
+/**
+ * A CORBA synchronization mode, defining how far the request shall
+ * progress before control is returned to the client for one way
+ * operations (when no response is required). OMG specification
+ * defines the following modes:
+ * <ul>
+ * <li>
+ * SYNC_NONE (0) - The ORB returns control before sending the request message.
+ * </li><li>
+ * SYNC_WITH_TRANSPORT (1) - The ORB returns control to the client only after the
+ * transport has accepted the request message.
+ * </li><li>
+ * SYNC_WITH_SERVER (2) - The ORB waits for the reply message from the
+ * server side ORB.
+ * </li><li>
+ * SYNC_WITH_TARGET (3) is equivalent for the synchronous, no one
+ * way operations. It is the most realiable, also the slowest one.
+ * </ul>
+ * The java API specification up till 1.4 inclusive defines only one
+ * constant, SYNC_WITH_TRANSPORT.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public interface SYNC_WITH_TRANSPORT
+{
+ /**
+ * The mode, indicating, that the ORB returns control to the client only
+ * after the transport has accepted the request message. There is stil no
+ * guarantee that the request will be delivered, but the server should
+ * send a reply message.
+ */
+ short value = 1;
+} \ No newline at end of file
diff --git a/libjava/classpath/org/omg/Messaging/SyncScopeHelper.java b/libjava/classpath/org/omg/Messaging/SyncScopeHelper.java
new file mode 100644
index 00000000000..7d8b412fe5f
--- /dev/null
+++ b/libjava/classpath/org/omg/Messaging/SyncScopeHelper.java
@@ -0,0 +1,121 @@
+/* SyncScopeHelper.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.Messaging;
+
+import gnu.CORBA.primitiveTypeCode;
+import gnu.CORBA.recordTypeCode;
+
+import org.omg.CORBA.Any;
+import org.omg.CORBA.TCKind;
+import org.omg.CORBA.TypeCode;
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+
+/**
+ * A helper operations for synchronization scope as an alias of
+ * <code>short</code>.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ *
+ * @see SYNC_WITH_TRANSPORT
+ */
+public class SyncScopeHelper
+{
+ /**
+ * A cached typecode value, computed only once.
+ */
+ private static TypeCode typecode;
+
+ /**
+ * Delegates call to {@link Any.extract_short()}.
+ */
+ public static short extract(Any a)
+ {
+ return a.extract_short();
+ }
+
+ /**
+ * Returns synchronization scope repository id.
+ *
+ * @return "IDL:omg.org/Messaging/SyncScope:1.0", always.
+ */
+ public static String id()
+ {
+ return "IDL:omg.org/Messaging/SyncScope:1.0";
+ }
+
+ /**
+ * Delegates call to {@link Any.insert_short(short)}.
+ */
+ public static void insert(Any a, short that)
+ {
+ a.insert_short(that);
+ }
+
+ /**
+ * Delegates call to {@link InputStream.read_short()}.
+ */
+ public static short read(InputStream istream)
+ {
+ return istream.read_short();
+ }
+
+ /**
+ * Returns a typecode of the synchronization scope, stating it
+ * is an alias of <code>short</code>, named "SyncScope".
+ *
+ * @return a typecode of synchronization scope.
+ */
+ public static TypeCode type()
+ {
+ recordTypeCode r = new recordTypeCode(TCKind.tk_alias);
+ r.setName("SyncScope");
+ r.setId(id());
+ r.setContentType(new primitiveTypeCode(TCKind.tk_short));
+ return r;
+ }
+
+ /**
+ * Delegates call to {@link OutputStream.write_short()}.
+ */
+ public static void write(OutputStream ostream, short value)
+ {
+ ostream.write_short(value);
+ }
+} \ No newline at end of file
diff --git a/libjava/classpath/org/omg/Messaging/package.html b/libjava/classpath/org/omg/Messaging/package.html
new file mode 100644
index 00000000000..925f684694d
--- /dev/null
+++ b/libjava/classpath/org/omg/Messaging/package.html
@@ -0,0 +1,64 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
+<!-- package.html --
+ Copyright (C) 2002 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.Messaging</title></head>
+
+<body>
+Contains CORBA synchronization modes, specifying how far the request shall
+progress before control is returned to the client for one way operations.
+The one way operation is an operation when no response is required.
+OMG specification defines the following modes:
+<ul>
+<li>
+SYNC_NONE (0) - The ORB returns control before sending the request message.
+</li><li>
+SYNC_WITH_TRANSPORT (1) - The ORB returns control to the client only after the
+transport has accepted the request message. There is stil no guarantee that the
+request will be delivered.
+</li><li>
+SYNC_WITH_SERVER (2) - The ORB waits for the reply message from the server side ORB.
+</li><li>
+SYNC_WITH_TARGET (3) is equivalent for the synchronous, no one way operations.
+It is the most realiable, also the slowest one.
+</ul>
+The java API specification up till 1.4 inclusive defines only one
+constant, SYNC_WITH_TRANSPORT. Others may appear in the future versions.
+
+@author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)</body>
+</html>
diff --git a/libjava/classpath/org/omg/PortableInterceptor/LOCATION_FORWARD.java b/libjava/classpath/org/omg/PortableInterceptor/LOCATION_FORWARD.java
new file mode 100644
index 00000000000..2a84125db2d
--- /dev/null
+++ b/libjava/classpath/org/omg/PortableInterceptor/LOCATION_FORWARD.java
@@ -0,0 +1,53 @@
+/* LOCATION_FORWARD.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.PortableInterceptor;
+
+ /**
+ * A reply status flag, indicating, that the object has
+ * moved (temporary or permanently) to another location.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public interface LOCATION_FORWARD
+{
+ /**
+ * Specifies the LOCATION_FORWARD value, 3.
+ */
+ short value = 3;
+}
diff --git a/libjava/classpath/org/omg/PortableInterceptor/ORBInitInfoPackage/DuplicateName.java b/libjava/classpath/org/omg/PortableInterceptor/ORBInitInfoPackage/DuplicateName.java
new file mode 100644
index 00000000000..365aaf4777c
--- /dev/null
+++ b/libjava/classpath/org/omg/PortableInterceptor/ORBInitInfoPackage/DuplicateName.java
@@ -0,0 +1,103 @@
+/* DuplicateName.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.PortableInterceptor.ORBInitInfoPackage;
+
+import org.omg.CORBA.UserException;
+import org.omg.CORBA.portable.IDLEntity;
+
+import java.io.Serializable;
+import gnu.CORBA.*;
+
+/**
+* This exception is raised on an attempt to register a second
+* {@link org.omg.PortableInterceptor#Interceptor} with the same name.
+* For each {@link org.omg.PortableInterceptor#Interceptor} type, only
+* one {@link org.omg.PortableInterceptor#Interceptor} of a given name can
+* be registered with the {@link org.omg.CORBA.ORB}.
+*
+* @see org.omg.PortableInterceptor.ORBInitInfoOperations
+*
+* @author Audrius Meskauskas, Lithiania (AudriusA@Bioinformatics.org)
+*/
+public class DuplicateName
+ extends UserException
+ implements IDLEntity, Serializable
+{
+ /**
+ * Use serialVersionUID (v1.4) for interoperability.
+ */
+ private static final long serialVersionUID = 7748239257677851130L;
+
+ /**
+ * The name field.
+ */
+ public String name;
+
+ /**
+ * Create DuplicateName with no explaining message field {@link #name}
+ * initialised to null.
+ */
+ public DuplicateName()
+ {
+ }
+
+ /**
+ * Create the DuplicateName with explaining message and field {@link #name}
+ * initialised to the given value.
+ *
+ * @param why a string, explaining, why this exception has been thrown.
+ * @param a_name a value for name.
+ */
+ public DuplicateName(String why, String a_name)
+ {
+ super(why);
+ this.name = a_name;
+ }
+
+ /**
+ * Create the DuplicateName without explaining message and and field
+ * {@link #name} initialised to the given value.
+ *
+ * @param a_name a value for name.
+ */
+ public DuplicateName(String a_name)
+ {
+ this.name = a_name;
+ }
+} \ No newline at end of file
diff --git a/libjava/classpath/org/omg/PortableInterceptor/ORBInitInfoPackage/DuplicateNameHelper.java b/libjava/classpath/org/omg/PortableInterceptor/ORBInitInfoPackage/DuplicateNameHelper.java
new file mode 100644
index 00000000000..6c93cff1dff
--- /dev/null
+++ b/libjava/classpath/org/omg/PortableInterceptor/ORBInitInfoPackage/DuplicateNameHelper.java
@@ -0,0 +1,154 @@
+/* DuplicateNameHelper.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.PortableInterceptor.ORBInitInfoPackage;
+
+import org.omg.CORBA.Any;
+import org.omg.CORBA.BAD_OPERATION;
+import org.omg.CORBA.ORB;
+import org.omg.CORBA.StructMember;
+import org.omg.CORBA.TCKind;
+import org.omg.CORBA.TypeCode;
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+import gnu.CORBA.*;
+
+/**
+* The helper operations for the exception {@link DuplicateName}.
+*
+* @author Audrius Meskauskas, Lithiania (AudriusA@Bioinformatics.org)
+*/
+public abstract class DuplicateNameHelper
+{
+ /**
+ * The cached typecode value, computed only once.
+ */
+ private static TypeCode typeCode;
+
+ /**
+ * Create the DuplicateName typecode (structure,
+ * named "DuplicateName").
+ * The typecode states that the structure contains the
+ * following fields: name.
+ */
+ public static TypeCode type()
+ {
+ if (typeCode == null)
+ {
+ ORB orb = ORB.init();
+ StructMember[] members = new StructMember[ 1 ];
+
+ TypeCode field;
+
+ field = orb.get_primitive_tc(TCKind.tk_string);
+ members [ 0 ] = new StructMember("name", field, null);
+ typeCode = orb.create_exception_tc(id(), "DuplicateName", members);
+ }
+ return typeCode;
+ }
+
+ /**
+ * Insert the DuplicateName into the given Any.
+ * This method uses the DuplicateNameHolder.
+ *
+ * @param any the Any to insert into.
+ * @param that the DuplicateName to insert.
+ */
+ public static void insert(Any any, DuplicateName that)
+ {
+ any.insert_Streamable(new DuplicateNameHolder(that));
+ }
+
+ /**
+ * Extract the DuplicateName from given Any.
+ * This method uses the DuplicateNameHolder.
+ *
+ * @throws BAD_OPERATION if the passed Any does not contain DuplicateName.
+ */
+ public static DuplicateName extract(Any any)
+ {
+ try
+ {
+ return ((DuplicateNameHolder) any.extract_Streamable()).value;
+ }
+ catch (ClassCastException cex)
+ {
+ BAD_OPERATION bad = new BAD_OPERATION("DuplicateName expected");
+ bad.initCause(cex);
+ throw bad;
+ }
+ }
+
+ /**
+ * Get the DuplicateName repository id.
+ *
+ * @return "IDL:omg.org/PortableInterceptor/ORBInitInfo/DuplicateName:1.0".
+ */
+ public static String id()
+ {
+ return "IDL:omg.org/PortableInterceptor/ORBInitInfo/DuplicateName:1.0";
+ }
+
+ /**
+ * Read the exception from the CDR intput stream.
+ *
+ * @param input a org.omg.CORBA.portable stream to read from.
+ */
+ public static DuplicateName read(InputStream input)
+ {
+ // Read the exception repository id.
+ String id = input.read_string();
+ DuplicateName value = new DuplicateName();
+
+ value.name = input.read_string();
+ return value;
+ }
+
+ /**
+ * Write the exception to the CDR output stream.
+ *
+ * @param output a org.omg.CORBA.portable stream stream to write into.
+ * @param value a value to write.
+ */
+ public static void write(OutputStream output, DuplicateName value)
+ {
+ // Write the exception repository id.
+ output.write_string(id());
+ output.write_string(value.name);
+ }
+} \ No newline at end of file
diff --git a/libjava/classpath/org/omg/PortableInterceptor/ORBInitInfoPackage/InvalidName.java b/libjava/classpath/org/omg/PortableInterceptor/ORBInitInfoPackage/InvalidName.java
new file mode 100644
index 00000000000..ecdde8b47dc
--- /dev/null
+++ b/libjava/classpath/org/omg/PortableInterceptor/ORBInitInfoPackage/InvalidName.java
@@ -0,0 +1,80 @@
+/* InvalidName.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.PortableInterceptor.ORBInitInfoPackage;
+
+import org.omg.CORBA.UserException;
+import org.omg.CORBA.portable.IDLEntity;
+
+import java.io.Serializable;
+
+/**
+* This exception is raised by methods in
+* {@link org.omg.PortableInterceptor.ORBInitInfoOperations} on the attempt to
+* register or resolve an invalid name like empty string. The already
+* registered names (including the default names, defined by OMG) are also
+* invalid for registration.
+*
+* @author Audrius Meskauskas, Lithiania (AudriusA@Bioinformatics.org)
+*/
+public class InvalidName
+ extends UserException
+ implements IDLEntity, Serializable
+{
+ /**
+ * Use serialVersionUID (v1.4) for interoperability.
+ */
+ private static final long serialVersionUID = -4599417794753377115L;
+
+ /**
+ * Create InvalidName with no explaining message.
+ */
+ public InvalidName()
+ {
+ }
+
+ /**
+ * Create the InvalidName with explaining message.
+ *
+ * @param why a string, explaining, why this exception has been thrown.
+ */
+ public InvalidName(String why)
+ {
+ super(why);
+ }
+} \ No newline at end of file
diff --git a/libjava/classpath/org/omg/PortableInterceptor/ORBInitInfoPackage/InvalidNameHelper.java b/libjava/classpath/org/omg/PortableInterceptor/ORBInitInfoPackage/InvalidNameHelper.java
new file mode 100644
index 00000000000..841d6f99aff
--- /dev/null
+++ b/libjava/classpath/org/omg/PortableInterceptor/ORBInitInfoPackage/InvalidNameHelper.java
@@ -0,0 +1,146 @@
+/* InvalidNameHelper.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.PortableInterceptor.ORBInitInfoPackage;
+
+import gnu.CORBA.EmptyExceptionHolder;
+
+import org.omg.CORBA.Any;
+import org.omg.CORBA.BAD_OPERATION;
+import org.omg.CORBA.ORB;
+import org.omg.CORBA.StructMember;
+import org.omg.CORBA.TCKind;
+import org.omg.CORBA.TypeCode;
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+
+/**
+* The helper operations for the exception {@link InvalidName}.
+*
+* @author Audrius Meskauskas, Lithiania (AudriusA@Bioinformatics.org)
+*/
+public abstract class InvalidNameHelper
+{
+ /**
+ * The cached typecode value, computed only once.
+ */
+ private static TypeCode typeCode;
+
+ /**
+ * Create the InvalidName typecode (structure,
+ * named "InvalidName").
+ */
+ public static TypeCode type()
+ {
+ if (typeCode == null)
+ {
+ ORB orb = ORB.init();
+ StructMember[] members = new StructMember[ 0 ];
+ typeCode = orb.create_exception_tc(id(), "InvalidName", members);
+ }
+ return typeCode;
+ }
+
+ /**
+ * Insert the InvalidName into the given Any.
+ *
+ * @param any the Any to insert into.
+ * @param that the InvalidName to insert.
+ */
+ public static void insert(Any any, InvalidName that)
+ {
+ any.insert_Streamable(new EmptyExceptionHolder(that, type()));
+ }
+
+ /**
+ * Extract the InvalidName from given Any.
+ *
+ * @throws BAD_OPERATION if the passed Any does not contain InvalidName.
+ */
+ public static InvalidName extract(Any any)
+ {
+ try
+ {
+ EmptyExceptionHolder h =
+ (EmptyExceptionHolder) any.extract_Streamable();
+ return (InvalidName) h.value;
+ }
+ catch (ClassCastException cex)
+ {
+ BAD_OPERATION bad = new BAD_OPERATION("InvalidName expected");
+ bad.initCause(cex);
+ throw bad;
+ }
+ }
+
+ /**
+ * Get the InvalidName repository id.
+ *
+ * @return "IDL:omg.org/PortableInterceptor/ORBInitInfo/InvalidName:1.0".
+ */
+ public static String id()
+ {
+ return "IDL:omg.org/PortableInterceptor/ORBInitInfo/InvalidName:1.0";
+ }
+
+ /**
+ * Read the exception from the CDR intput stream.
+ *
+ * @param input a org.omg.CORBA.portable stream to read from.
+ */
+ public static InvalidName read(InputStream input)
+ {
+ // Read the exception repository id.
+ String id = input.read_string();
+ InvalidName value = new InvalidName(id);
+
+ return value;
+ }
+
+ /**
+ * Write the exception to the CDR output stream.
+ *
+ * @param output a org.omg.CORBA.portable stream stream to write into.
+ * @param value a value to write.
+ */
+ public static void write(OutputStream output, InvalidName value)
+ {
+ // Write the exception repository id.
+ output.write_string(id());
+ }
+} \ No newline at end of file
diff --git a/libjava/classpath/org/omg/PortableInterceptor/ORBInitInfoPackage/ObjectIdHelper.java b/libjava/classpath/org/omg/PortableInterceptor/ORBInitInfoPackage/ObjectIdHelper.java
new file mode 100644
index 00000000000..d0946e3fa00
--- /dev/null
+++ b/libjava/classpath/org/omg/PortableInterceptor/ORBInitInfoPackage/ObjectIdHelper.java
@@ -0,0 +1,117 @@
+/* ObjectIdHelper.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.PortableInterceptor.ORBInitInfoPackage;
+
+import gnu.CORBA.Restricted_ORB;
+
+import org.omg.CORBA.Any;
+import org.omg.CORBA.ORB;
+import org.omg.CORBA.TypeCode;
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+
+/**
+ * The Object Id is defined in OMG specification just as a narrow (not wide)
+ * string. As such, the Object Id needs no helper, but one is included in
+ * the API anyway.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public class ObjectIdHelper
+{
+ /**
+ * Insert the Object Id into Any (uses {@link Any.insert_string}).
+ *
+ * @param a the Any to insert into.
+ * @param that the string to insert.
+ */
+ public static void insert(Any a, String that)
+ {
+ a.insert_string(that);
+ }
+
+ /**
+ * Extract the Object Id from Any ((uses {@link Any.extract_string}).
+ *
+ * @param a the Any to extract from.
+ */
+ public static String extract(Any a)
+ {
+ return a.extract_string();
+ }
+
+ /**
+ * Return an alias typecode.
+ */
+ public static TypeCode type()
+ {
+ ORB orb = Restricted_ORB.Singleton;
+ return orb.create_alias_tc(id(), "Object Id", orb.create_string_tc(0));
+ }
+
+ /**
+ * Return the Object Id repository id.
+ * @return "IDL:omg.org/PortableInterceptor/ORBInitInfo/ObjectId:1.0", always.
+ */
+ public static String id()
+ {
+ return "IDL:omg.org/PortableInterceptor/ORBInitInfo/ObjectId:1.0";
+ }
+
+ /**
+ * Calls {@link InputStream#read_string()}.
+ *
+ * @param instream the stream to read from.
+ */
+ public static String read(InputStream input)
+ {
+ return input.read_string();
+ }
+
+ /**
+ * Calls {@link OutputStream#write_string()}.
+ *
+ * @param ostream the stream to write into.
+ * @param value the string (Object Id) value to write.
+ */
+ public static void write(OutputStream output, String value)
+ {
+ output.write_string(value);
+ }
+} \ No newline at end of file
diff --git a/libjava/classpath/org/omg/PortableInterceptor/SUCCESSFUL.java b/libjava/classpath/org/omg/PortableInterceptor/SUCCESSFUL.java
new file mode 100644
index 00000000000..15cc32fbd2d
--- /dev/null
+++ b/libjava/classpath/org/omg/PortableInterceptor/SUCCESSFUL.java
@@ -0,0 +1,53 @@
+/* SUCCESSFUL.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.PortableInterceptor;
+
+/**
+ * A reply status flag, indicating, that the remote method
+ * has been called and returned without exception.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public interface SUCCESSFUL
+{
+ /**
+ * Specifies the SUCCESSFUL value, 0.
+ */
+ short value = 0;
+}
diff --git a/libjava/classpath/org/omg/PortableInterceptor/SYSTEM_EXCEPTION.java b/libjava/classpath/org/omg/PortableInterceptor/SYSTEM_EXCEPTION.java
new file mode 100644
index 00000000000..a62ade9b158
--- /dev/null
+++ b/libjava/classpath/org/omg/PortableInterceptor/SYSTEM_EXCEPTION.java
@@ -0,0 +1,54 @@
+/* SYSTEM_EXCEPTION.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.PortableInterceptor;
+
+/**
+ * A reply status flag, indicating, that the
+ * {@link org.omg.CORBA.SystemException}
+ * has been thrown while calling or from inside the remote method.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public interface SYSTEM_EXCEPTION
+{
+ /**
+ * Specifies the SYSTEM_EXCEPTION value, 1.
+ */
+ short value = 1;
+}
diff --git a/libjava/classpath/org/omg/PortableInterceptor/TRANSPORT_RETRY.java b/libjava/classpath/org/omg/PortableInterceptor/TRANSPORT_RETRY.java
new file mode 100644
index 00000000000..adc60da19fe
--- /dev/null
+++ b/libjava/classpath/org/omg/PortableInterceptor/TRANSPORT_RETRY.java
@@ -0,0 +1,54 @@
+/* TRANSPORT_RETRY.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.PortableInterceptor;
+
+ /**
+ * A reply status, indicating the necessity of the transport retry.
+ * This may happen, for example, if the GIOP message status flag
+ * is equal to NEEDS_ADDRESSING_MODE.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public interface TRANSPORT_RETRY
+{
+ /**
+ * Specifies the TRANSPORT_RETRY value, 4.
+ */
+ short value = 4;
+}
diff --git a/libjava/classpath/org/omg/PortableInterceptor/USER_EXCEPTION.java b/libjava/classpath/org/omg/PortableInterceptor/USER_EXCEPTION.java
new file mode 100644
index 00000000000..e5579381424
--- /dev/null
+++ b/libjava/classpath/org/omg/PortableInterceptor/USER_EXCEPTION.java
@@ -0,0 +1,54 @@
+/* USER_EXCEPTION.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.PortableInterceptor;
+
+/**
+ * A reply status flag, indicating, that the
+ * {@link org.omg.CORBA.UserException}
+ * has been thrown from inside the remote method.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public interface USER_EXCEPTION
+{
+ /**
+ * Specifies the USER_EXCEPTION value, 2.
+ */
+ short value = 2;
+}
diff --git a/libjava/classpath/org/omg/PortableServer/CurrentPackage/NoContext.java b/libjava/classpath/org/omg/PortableServer/CurrentPackage/NoContext.java
new file mode 100644
index 00000000000..eaefee30699
--- /dev/null
+++ b/libjava/classpath/org/omg/PortableServer/CurrentPackage/NoContext.java
@@ -0,0 +1,82 @@
+/* NoContext.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.PortableServer.CurrentPackage;
+
+import org.omg.CORBA.UserException;
+import org.omg.CORBA.portable.IDLEntity;
+
+import java.io.Serializable;
+
+/**
+* This exception may be thrown by methods in
+* {@link org.omg.PortableServer.CurrentOperations}
+* if they are invoked outside the context of a POA-dispatched operation.
+*
+* @see org.omg.PortableServer.CurrentOperations#get_POA()
+* @see org.omg.PortableServer.CurrentOperations#get_object_id()
+*
+* @author Audrius Meskauskas, Lithiania (AudriusA@Bioinformatics.org)
+*/
+public class NoContext
+ extends UserException
+ implements IDLEntity, Serializable
+{
+ /**
+ * Use serialVersionUID (v1.4) for interoperability.
+ */
+ private static final long serialVersionUID = 4345975812295650198L;
+
+ /**
+ * Create NoContext with no explaining message and all fields initialised to
+ * default values.
+ */
+ public NoContext()
+ {
+ }
+
+ /**
+ * Create the NoContext with explaining message.
+ *
+ * @param why a string, explaining, why this exception has been thrown.
+ */
+ public NoContext(String why)
+ {
+ super(why);
+ }
+} \ No newline at end of file
diff --git a/libjava/classpath/org/omg/PortableServer/CurrentPackage/NoContextHelper.java b/libjava/classpath/org/omg/PortableServer/CurrentPackage/NoContextHelper.java
new file mode 100644
index 00000000000..0ba6352001f
--- /dev/null
+++ b/libjava/classpath/org/omg/PortableServer/CurrentPackage/NoContextHelper.java
@@ -0,0 +1,148 @@
+/* NoContextHelper.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.PortableServer.CurrentPackage;
+
+import gnu.CORBA.EmptyExceptionHolder;
+
+import org.omg.CORBA.Any;
+import org.omg.CORBA.BAD_OPERATION;
+import org.omg.CORBA.ORB;
+import org.omg.CORBA.StructMember;
+import org.omg.CORBA.TCKind;
+import org.omg.CORBA.TypeCode;
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+
+/**
+* The helper operations for the exception {@link NoContext}.
+*
+* @author Audrius Meskauskas, Lithiania (AudriusA@Bioinformatics.org)
+*/
+public abstract class NoContextHelper
+{
+ /**
+ * The cached typecode value, computed only once.
+ */
+ private static TypeCode typeCode;
+
+ /**
+ * Create the NoContext typecode (structure,
+ * named "NoContext").
+ */
+ public static TypeCode type()
+ {
+ if (typeCode == null)
+ {
+ ORB orb = ORB.init();
+ StructMember[] members = new StructMember[ 0 ];
+ typeCode = orb.create_exception_tc(id(), "NoContext", members);
+ }
+ return typeCode;
+ }
+
+ /* Every user exception with no user defined fields can use EmptyExceptionHolder */
+
+ /**
+ * Insert the NoContext into the given Any.
+ *
+ * @param any the Any to insert into.
+ * @param that the NoContext to insert.
+ */
+ public static void insert(Any any, NoContext that)
+ {
+ any.insert_Streamable(new EmptyExceptionHolder(that, type()));
+ }
+
+ /**
+ * Extract the NoContext from given Any.
+ *
+ * @throws BAD_OPERATION if the passed Any does not contain NoContext.
+ */
+ public static NoContext extract(Any any)
+ {
+ try
+ {
+ EmptyExceptionHolder h =
+ (EmptyExceptionHolder) any.extract_Streamable();
+ return (NoContext) h.value;
+ }
+ catch (ClassCastException cex)
+ {
+ BAD_OPERATION bad = new BAD_OPERATION("NoContext expected");
+ bad.initCause(cex);
+ throw bad;
+ }
+ }
+
+ /**
+ * Get the NoContext repository id.
+ *
+ * @return "IDL:omg.org/PortableServer/Current/NoContext:1.0", always.
+ */
+ public static String id()
+ {
+ return "IDL:omg.org/PortableServer/Current/NoContext:1.0";
+ }
+
+ /**
+ * Read the exception from the CDR intput stream.
+ *
+ * @param input a org.omg.CORBA.portable stream to read from.
+ */
+ public static NoContext read(InputStream input)
+ {
+ // Read the exception repository id.
+ String id = input.read_string();
+ NoContext value = new NoContext(id);
+
+ return value;
+ }
+
+ /**
+ * Write the exception to the CDR output stream.
+ *
+ * @param output a org.omg.CORBA.portable stream stream to write into.
+ * @param value a value to write.
+ */
+ public static void write(OutputStream output, NoContext value)
+ {
+ // Write the exception repository id.
+ output.write_string(id());
+ }
+} \ No newline at end of file
diff --git a/libjava/classpath/org/omg/PortableServer/ID_ASSIGNMENT_POLICY_ID.java b/libjava/classpath/org/omg/PortableServer/ID_ASSIGNMENT_POLICY_ID.java
new file mode 100644
index 00000000000..a283ce6bb99
--- /dev/null
+++ b/libjava/classpath/org/omg/PortableServer/ID_ASSIGNMENT_POLICY_ID.java
@@ -0,0 +1,53 @@
+/* ID_ASSIGNMENT_POLICY_ID.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.PortableServer;
+
+
+/**
+* Holds an integer {@link IdAssignmentPolicy } identifier.
+*
+* @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+*/
+public interface ID_ASSIGNMENT_POLICY_ID
+{
+ /**
+ * Specifies the ID_ASSIGNMENT_POLICY_ID value, 19.
+ */
+ int value = 19;
+} \ No newline at end of file
diff --git a/libjava/classpath/org/omg/PortableServer/ID_UNIQUENESS_POLICY_ID.java b/libjava/classpath/org/omg/PortableServer/ID_UNIQUENESS_POLICY_ID.java
new file mode 100644
index 00000000000..8518831d686
--- /dev/null
+++ b/libjava/classpath/org/omg/PortableServer/ID_UNIQUENESS_POLICY_ID.java
@@ -0,0 +1,53 @@
+/* ID_UNIQUENESS_POLICY_ID.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.PortableServer;
+
+
+/**
+* Holds an integer {@link IdUniquenessPolicy} identifier.
+*
+* @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+*/
+public interface ID_UNIQUENESS_POLICY_ID
+{
+ /**
+ * Specifies the ID_UNIQUENESS_POLICY_ID value, 18.
+ */
+ int value = 18;
+} \ No newline at end of file
diff --git a/libjava/classpath/org/omg/PortableServer/IMPLICIT_ACTIVATION_POLICY_ID.java b/libjava/classpath/org/omg/PortableServer/IMPLICIT_ACTIVATION_POLICY_ID.java
new file mode 100644
index 00000000000..c46e79881bd
--- /dev/null
+++ b/libjava/classpath/org/omg/PortableServer/IMPLICIT_ACTIVATION_POLICY_ID.java
@@ -0,0 +1,53 @@
+/* IMPLICIT_ACTIVATION_POLICY_ID.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.PortableServer;
+
+
+/**
+* Holds an integer {@link ImplicitActivationPolicy} identifier.
+*
+* @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+*/
+public interface IMPLICIT_ACTIVATION_POLICY_ID
+{
+ /**
+ * Specifies the IMPLICIT_ACTIVATION_POLICY_ID value, 20.
+ */
+ int value = 20;
+} \ No newline at end of file
diff --git a/libjava/classpath/org/omg/PortableServer/IdAssignmentPolicyValue.java b/libjava/classpath/org/omg/PortableServer/IdAssignmentPolicyValue.java
new file mode 100644
index 00000000000..2dda0ef2b61
--- /dev/null
+++ b/libjava/classpath/org/omg/PortableServer/IdAssignmentPolicyValue.java
@@ -0,0 +1,153 @@
+/* IdAssignmentPolicyValue.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.PortableServer;
+
+import org.omg.CORBA.BAD_OPERATION;
+import org.omg.CORBA.portable.IDLEntity;
+
+import java.io.Serializable;
+
+/**
+* Specifies the Object Id assignment policy.
+* <ul>
+* <li>USER_ID Objects created with that POA obtain they Object Ids from the
+* application.
+* </li>
+* <li>SYSTEM_ID Objects created with that POA obtain they Object Ids from POA.
+* If the POA also has the PERSISTENT policy, these Object Ids must be
+* unique across all instantiations of the same POA.
+* </li>
+* </ul>
+* @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+*/
+public class IdAssignmentPolicyValue
+ implements Serializable, IDLEntity
+{
+ /**
+ * Use serialVersionUID (V1.4) for interoperability.
+ */
+ private static final long serialVersionUID = 2024380631469554382L;
+
+ /**
+ * The value field for the current instance.
+ */
+ private final int _value;
+
+ /**
+ * The possible value of this enumeration (USER_ID).
+ */
+ public static final int _USER_ID = 0;
+
+ /**
+ * An instance of IdAssignmentPolicyValue, initialized to USER_ID.
+ */
+ public static final IdAssignmentPolicyValue USER_ID =
+ new IdAssignmentPolicyValue(_USER_ID);
+
+ /**
+ * The possible value of this enumeration (SYSTEM_ID),.
+ */
+ public static final int _SYSTEM_ID = 1;
+
+ /**
+ * An instance of IdAssignmentPolicyValue, initialized to SYSTEM_ID,
+ * indicating, that the objects created with that POA obtain they
+ * Object Ids from POA.
+ */
+ public static final IdAssignmentPolicyValue SYSTEM_ID =
+ new IdAssignmentPolicyValue(_SYSTEM_ID);
+
+ /**
+ * The private array that maps integer codes to the enumeration
+ * values.
+ */
+ private static final IdAssignmentPolicyValue[] enume =
+ new IdAssignmentPolicyValue[] { USER_ID, SYSTEM_ID };
+
+ /**
+ * The private array of state names.
+ */
+ private static final String[] state_names =
+ new String[] { "USER_ID", "SYSTEM_ID" };
+
+ /**
+ * Normally, no new instances are required, so the constructor is protected.
+ */
+ protected IdAssignmentPolicyValue(int a_value)
+ {
+ _value = a_value;
+ }
+
+ /**
+ * Returns the IdAssignmentPolicyValue, matching the given integer constant.
+ *
+ * @param code one of _USER_ID, _SYSTEM_ID.
+ * @return one of USER_ID, SYSTEM_ID.
+ * @throws BAD_PARAM if the parameter is not one of the valid values.
+ */
+ public static IdAssignmentPolicyValue from_int(int code)
+ {
+ try
+ {
+ return enume [ code ];
+ }
+ catch (ArrayIndexOutOfBoundsException ex)
+ {
+ throw new BAD_OPERATION("Invalid enumeration code " + code);
+ }
+ }
+
+ /**
+ * Returns a short string representation.
+ * @return the name of the current enumeration value.
+ */
+ public String toString()
+ {
+ return state_names [ _value ];
+ }
+
+ /**
+ * Returns the integer code of the policy value.
+ * @return _USER_ID or _SYSTEM_ID.
+ */
+ public int value()
+ {
+ return _value;
+ }
+} \ No newline at end of file
diff --git a/libjava/classpath/org/omg/PortableServer/IdUniquenessPolicyValue.java b/libjava/classpath/org/omg/PortableServer/IdUniquenessPolicyValue.java
new file mode 100644
index 00000000000..d0992d9dbe2
--- /dev/null
+++ b/libjava/classpath/org/omg/PortableServer/IdUniquenessPolicyValue.java
@@ -0,0 +1,153 @@
+/* IdUniquenessPolicyValue.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.PortableServer;
+
+import org.omg.CORBA.BAD_OPERATION;
+import org.omg.CORBA.portable.IDLEntity;
+
+import java.io.Serializable;
+
+/**
+* Specifies the Object Id uniqueness policy.
+*
+* This enumeration can obtain the following values:
+* <ul>
+* <li>UNIQUE_ID a servant activated with that POA supports exactly one Object Id.
+* </li>
+* <li>MULTIPLE_ID a servant activated with that POA supports
+* multiple Object Ids.
+* </li>
+* </ul>
+* @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+*/
+public class IdUniquenessPolicyValue
+ implements Serializable, IDLEntity
+{
+ /**
+ * Use serialVersionUID (V1.4) for interoperability.
+ */
+ private static final long serialVersionUID = 2698951826884611346L;
+
+ /**
+ * The value field for the current instance.
+ */
+ private final int _value;
+
+ /**
+ * The possible value of this enumeration (UNIQUE_ID).
+ */
+ public static final int _UNIQUE_ID = 0;
+
+ /**
+ * Indicates that a servant activated with that POA, supports one and only
+ * one OBject Id.
+ */
+ public static final IdUniquenessPolicyValue UNIQUE_ID =
+ new IdUniquenessPolicyValue(_UNIQUE_ID);
+
+ /**
+ * The possible value of this enumeration (MULTIPLE_ID).
+ */
+ public static final int _MULTIPLE_ID = 1;
+
+ /**
+ * Indicates that a servant activated with that POA is able to support the
+ * multiple Object Ids.
+ */
+ public static final IdUniquenessPolicyValue MULTIPLE_ID =
+ new IdUniquenessPolicyValue(_MULTIPLE_ID);
+
+ /**
+ * The private array that maps integer codes to the enumeration
+ * values.
+ */
+ private static final IdUniquenessPolicyValue[] enume =
+ new IdUniquenessPolicyValue[] { UNIQUE_ID, MULTIPLE_ID };
+
+ /**
+ * The private array of state names.
+ */
+ private static final String[] state_names =
+ new String[] { "UNIQUE_ID", "MULTIPLE_ID" };
+
+ /**
+ * Normally, no new instances are required, so the constructor is protected.
+ */
+ protected IdUniquenessPolicyValue(int a_value)
+ {
+ _value = a_value;
+ }
+
+ /**
+ * Returns the IdUniquenessPolicyValue, matching the given integer constant.
+ *
+ * @param code one of _UNIQUE_ID, _MULTIPLE_ID.
+ * @return one of UNIQUE_ID, MULTIPLE_ID.
+ * @throws BAD_PARAM if the parameter is not one of the valid values.
+ */
+ public static IdUniquenessPolicyValue from_int(int code)
+ {
+ try
+ {
+ return enume [ code ];
+ }
+ catch (ArrayIndexOutOfBoundsException ex)
+ {
+ throw new BAD_OPERATION("Invalid enumeration code " + code);
+ }
+ }
+
+ /**
+ * Returns a short string representation.
+ * @return the name of the current enumeration value.
+ */
+ public String toString()
+ {
+ return state_names [ _value ];
+ }
+
+ /**
+ * Returns the integer code of the policy value.
+ * @return _UNIQUE_ID or _MULTIPLE_ID.
+ */
+ public int value()
+ {
+ return _value;
+ }
+} \ No newline at end of file
diff --git a/libjava/classpath/org/omg/PortableServer/ImplicitActivationPolicyValue.java b/libjava/classpath/org/omg/PortableServer/ImplicitActivationPolicyValue.java
new file mode 100644
index 00000000000..8d2913bf66f
--- /dev/null
+++ b/libjava/classpath/org/omg/PortableServer/ImplicitActivationPolicyValue.java
@@ -0,0 +1,153 @@
+/* ImplicitActivationPolicyValue.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.PortableServer;
+
+import org.omg.CORBA.BAD_OPERATION;
+import org.omg.CORBA.portable.IDLEntity;
+
+import java.io.Serializable;
+
+/**
+* Specifies the implicit activation policy.
+*
+* This enumeration can obtain the following values:
+* <ul>
+* <li>IMPLICIT_ACTIVATION The POA supports implicit activation of servants.
+* ({@link IdAssignmentPolicyValue#SYSTEM_ID} and
+* {@link ServantRetentionPolicyValue#RETAIN} policies required).</li>
+* <li>NO_IMPLICIT_ACTIVATION The POA does not support implicit activation.</li>
+* </ul>
+* @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+*/
+public class ImplicitActivationPolicyValue
+ implements Serializable, IDLEntity
+{
+ /**
+ * Use serialVersionUID (V1.4) for interoperability.
+ */
+ private static final long serialVersionUID = 3826572456602949295L;
+
+ /**
+ * The value field for the current instance.
+ */
+ private final int _value;
+
+ /**
+ * The possible value of this enumeration (IMPLICIT_ACTIVATION).
+ */
+ public static final int _IMPLICIT_ACTIVATION = 0;
+
+ /**
+ * An instance of ImplicitActivationPolicyValue, initialized to IMPLICIT_ACTIVATION.
+ */
+ public static final ImplicitActivationPolicyValue IMPLICIT_ACTIVATION =
+ new ImplicitActivationPolicyValue(_IMPLICIT_ACTIVATION);
+
+ /**
+ * The possible value of this enumeration (NO_IMPLICIT_ACTIVATION).
+ */
+ public static final int _NO_IMPLICIT_ACTIVATION = 1;
+
+ /**
+ * An instance of ImplicitActivationPolicyValue, initialized to NO_IMPLICIT_ACTIVATION.
+ */
+ public static final ImplicitActivationPolicyValue NO_IMPLICIT_ACTIVATION =
+ new ImplicitActivationPolicyValue(_NO_IMPLICIT_ACTIVATION);
+
+ /**
+ * The private array that maps integer codes to the enumeration
+ * values.
+ */
+ private static final ImplicitActivationPolicyValue[] enume =
+ new ImplicitActivationPolicyValue[]
+ {
+ IMPLICIT_ACTIVATION, NO_IMPLICIT_ACTIVATION
+ };
+
+ /**
+ * The private array of state names.
+ */
+ private static final String[] state_names =
+ new String[] { "IMPLICIT_ACTIVATION", "NO_IMPLICIT_ACTIVATION" };
+
+ /**
+ * Normally, no new instances are required, so the constructor is protected.
+ */
+ protected ImplicitActivationPolicyValue(int a_value)
+ {
+ _value = a_value;
+ }
+
+ /**
+ * Returns the ImplicitActivationPolicyValue, matching the given integer constant.
+ *
+ * @param code one of _IMPLICIT_ACTIVATION, _NO_IMPLICIT_ACTIVATION.
+ * @return one of IMPLICIT_ACTIVATION, NO_IMPLICIT_ACTIVATION.
+ * @throws BAD_PARAM if the parameter is not one of the valid values.
+ */
+ public static ImplicitActivationPolicyValue from_int(int code)
+ {
+ try
+ {
+ return enume [ code ];
+ }
+ catch (ArrayIndexOutOfBoundsException ex)
+ {
+ throw new BAD_OPERATION("Invalid enumeration code " + code);
+ }
+ }
+
+ /**
+ * Returns a short string representation.
+ * @return the name of the current enumeration value.
+ */
+ public String toString()
+ {
+ return state_names [ _value ];
+ }
+
+ /**
+ * Returns the integer code of the policy value.
+ * @return _IMPLICIT_ACTIVATION or _NO_IMPLICIT_ACTIVATION.
+ */
+ public int value()
+ {
+ return _value;
+ }
+} \ No newline at end of file
diff --git a/libjava/classpath/org/omg/PortableServer/LIFESPAN_POLICY_ID.java b/libjava/classpath/org/omg/PortableServer/LIFESPAN_POLICY_ID.java
new file mode 100644
index 00000000000..87b93af0267
--- /dev/null
+++ b/libjava/classpath/org/omg/PortableServer/LIFESPAN_POLICY_ID.java
@@ -0,0 +1,52 @@
+/* LIFESPAN_POLICY_ID.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.PortableServer;
+
+ /**
+ * Holds an integer {@link LifespanPolicy} identifier.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public interface LIFESPAN_POLICY_ID
+{
+ /**
+ * Specifies the LIFESPAN_POLICY_ID value, 17.
+ */
+ int value = 17;
+}
diff --git a/libjava/classpath/org/omg/PortableServer/LifespanPolicyValue.java b/libjava/classpath/org/omg/PortableServer/LifespanPolicyValue.java
new file mode 100644
index 00000000000..1e046c4e941
--- /dev/null
+++ b/libjava/classpath/org/omg/PortableServer/LifespanPolicyValue.java
@@ -0,0 +1,150 @@
+/* LifespanPolicyValue.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.PortableServer;
+
+import org.omg.CORBA.BAD_OPERATION;
+import org.omg.CORBA.portable.IDLEntity;
+
+import java.io.Serializable;
+
+/**
+* Specifies the object life span policy.
+*
+* This enumeration can obtain the following values:
+* <ul>
+* <li>TRANSIENT The objects implemented in the POA never outlive
+* the POA instance in which they are first created.</li>
+* <li>PERSISTENT The mentioned objects can outlive the process in
+* which they are first created.</li>
+* </ul>
+* @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+*/
+public class LifespanPolicyValue
+ implements Serializable, IDLEntity
+{
+ /**
+ * Use serialVersionUID (V1.4) for interoperability.
+ */
+ private static final long serialVersionUID = 6604562925399671611L;
+
+ /**
+ * The value field for the current instance.
+ */
+ private final int _value;
+
+ /**
+ * The possible value of this enumeration (TRANSIENT).
+ */
+ public static final int _TRANSIENT = 0;
+
+ /**
+ * An instance of LifespanPolicyValue, initialized to TRANSIENT.
+ */
+ public static final LifespanPolicyValue TRANSIENT =
+ new LifespanPolicyValue(_TRANSIENT);
+
+ /**
+ * The possible value of this enumeration (PERSISTENT).
+ */
+ public static final int _PERSISTENT = 1;
+
+ /**
+ * An instance of LifespanPolicyValue, initialized to PERSISTENT.
+ */
+ public static final LifespanPolicyValue PERSISTENT =
+ new LifespanPolicyValue(_PERSISTENT);
+
+ /**
+ * The private array that maps integer codes to the enumeration
+ * values.
+ */
+ private static final LifespanPolicyValue[] enume =
+ new LifespanPolicyValue[] { TRANSIENT, PERSISTENT };
+
+ /**
+ * The private array of state names.
+ */
+ private static final String[] state_names =
+ new String[] { "TRANSIENT", "PERSISTENT" };
+
+ /**
+ * Normally, no new instances are required, so the constructor is protected.
+ */
+ protected LifespanPolicyValue(int a_value)
+ {
+ _value = a_value;
+ }
+
+ /**
+ * Returns the LifespanPolicyValue, matching the given integer constant.
+ *
+ * @param code one of _TRANSIENT, _PERSISTENT.
+ * @return one of TRANSIENT, PERSISTENT.
+ * @throws BAD_PARAM if the parameter is not one of the valid values.
+ */
+ public static LifespanPolicyValue from_int(int code)
+ {
+ try
+ {
+ return enume [ code ];
+ }
+ catch (ArrayIndexOutOfBoundsException ex)
+ {
+ throw new BAD_OPERATION("Invalid enumeration code " + code);
+ }
+ }
+
+ /**
+ * Returns a short string representation.
+ * @return the name of the current enumeration value.
+ */
+ public String toString()
+ {
+ return state_names [ _value ];
+ }
+
+ /**
+ * Returns the integer code of the policy value.
+ * @return _TRANSIENT or _PERSISTENT.
+ */
+ public int value()
+ {
+ return _value;
+ }
+} \ No newline at end of file
diff --git a/libjava/classpath/org/omg/PortableServer/POAManagerPackage/AdapterInactive.java b/libjava/classpath/org/omg/PortableServer/POAManagerPackage/AdapterInactive.java
new file mode 100644
index 00000000000..29720d7ca96
--- /dev/null
+++ b/libjava/classpath/org/omg/PortableServer/POAManagerPackage/AdapterInactive.java
@@ -0,0 +1,79 @@
+/* AdapterInactive.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.PortableServer.POAManagerPackage;
+
+import org.omg.CORBA.UserException;
+import org.omg.CORBA.portable.IDLEntity;
+
+import java.io.Serializable;
+
+/**
+ * Raised when the current operation is not applicable for the system
+ * because the POA manager is in an inactive {@link State}.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public class AdapterInactive
+ extends UserException
+ implements IDLEntity, Serializable
+{
+ /**
+ * Use serialVersionUID (v1.4) for interoperability.
+ */
+ private static final long serialVersionUID = 6945182851085567131L;
+
+ /**
+ * Create AdapterInactive with no explaining
+ * message.
+ */
+ public AdapterInactive()
+ {
+ }
+
+ /**
+ * Create the AdapterInactive with explaining
+ * message.
+ *
+ * @param why a string, explaining, why this exception has been thrown.
+ */
+ public AdapterInactive(String why)
+ {
+ super(why);
+ }
+} \ No newline at end of file
diff --git a/libjava/classpath/org/omg/PortableServer/POAManagerPackage/AdapterInactiveHelper.java b/libjava/classpath/org/omg/PortableServer/POAManagerPackage/AdapterInactiveHelper.java
new file mode 100644
index 00000000000..db7b965bbad
--- /dev/null
+++ b/libjava/classpath/org/omg/PortableServer/POAManagerPackage/AdapterInactiveHelper.java
@@ -0,0 +1,149 @@
+/* AdapterInactiveHelper.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.PortableServer.POAManagerPackage;
+
+import gnu.CORBA.EmptyExceptionHolder;
+
+import org.omg.CORBA.Any;
+import org.omg.CORBA.BAD_OPERATION;
+import org.omg.CORBA.ORB;
+import org.omg.CORBA.StructMember;
+import org.omg.CORBA.TCKind;
+import org.omg.CORBA.TypeCode;
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+
+/**
+* The helper operations for the exception {@link AdapterInactive}.
+*
+* @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+*/
+public abstract class AdapterInactiveHelper
+{
+ /**
+ * The cached typecode value, computed only once.
+ */
+ private static TypeCode typeCode;
+
+ /**
+ * Create the AdapterInactive typecode (structure,
+ * named "AdapterInactive").
+ */
+ public static TypeCode type()
+ {
+ if (typeCode == null)
+ {
+ ORB orb = ORB.init();
+ StructMember[] members = new StructMember[ 0 ];
+ typeCode = orb.create_exception_tc(id(), "AdapterInactive", members);
+ }
+ return typeCode;
+ }
+
+ /* Every user exception with no user defined
+ fields can use EmptyExceptionHolder */
+
+ /**
+ * Insert the AdapterInactive into the given Any.
+ *
+ * @param any the Any to insert into.
+ * @param that the AdapterInactive to insert.
+ */
+ public static void insert(Any any, AdapterInactive that)
+ {
+ any.insert_Streamable(new EmptyExceptionHolder(that, type()));
+ }
+
+ /**
+ * Extract the AdapterInactive from given Any.
+ *
+ * @throws BAD_OPERATION if the passed Any does not contain AdapterInactive.
+ */
+ public static AdapterInactive extract(Any any)
+ {
+ try
+ {
+ EmptyExceptionHolder h =
+ (EmptyExceptionHolder) any.extract_Streamable();
+ return (AdapterInactive) h.value;
+ }
+ catch (ClassCastException cex)
+ {
+ BAD_OPERATION bad = new BAD_OPERATION("AdapterInactive expected");
+ bad.initCause(cex);
+ throw bad;
+ }
+ }
+
+ /**
+ * Get the AdapterInactive repository id.
+ *
+ * @return "IDL:omg.org/PortableServer/POAManager/AdapterInactive:1.0", always.
+ */
+ public static String id()
+ {
+ return "IDL:omg.org/PortableServer/POAManager/AdapterInactive:1.0";
+ }
+
+ /**
+ * Read the exception from the CDR intput stream.
+ *
+ * @param input a org.omg.CORBA.portable stream to read from.
+ */
+ public static AdapterInactive read(InputStream input)
+ {
+ // Read the exception repository id.
+ String id = input.read_string();
+ AdapterInactive value = new AdapterInactive(id);
+
+ return value;
+ }
+
+ /**
+ * Write the exception to the CDR output stream.
+ *
+ * @param output a org.omg.CORBA.portable stream stream to write into.
+ * @param value a value to write.
+ */
+ public static void write(OutputStream output, AdapterInactive value)
+ {
+ // Write the exception repository id.
+ output.write_string(id());
+ }
+} \ No newline at end of file
diff --git a/libjava/classpath/org/omg/PortableServer/POAManagerPackage/State.java b/libjava/classpath/org/omg/PortableServer/POAManagerPackage/State.java
new file mode 100644
index 00000000000..536189a0ce2
--- /dev/null
+++ b/libjava/classpath/org/omg/PortableServer/POAManagerPackage/State.java
@@ -0,0 +1,177 @@
+/* State.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.PortableServer.POAManagerPackage;
+
+import org.omg.CORBA.BAD_OPERATION;
+import org.omg.CORBA.portable.IDLEntity;
+
+import java.io.Serializable;
+
+/**
+ * Defines the possible states of the POA manager.
+ *
+ * This enumeration can obtain the following values:
+ * <ul>
+ * <li>ACTIVE When the manager is in the active state, the associated POAs
+ * receive and process requests.</li>
+ * <li>DISCARDING When the manager is in the discarding state,
+ * the associated POAs discard all incoming requests. The sending clients
+ * receive the {@link org.omg.TRANSIENT} system exception, with standard
+ * minor code 1. This mode is needed for flow control, when the system is
+ * flooded with requests.
+ * </li>
+ * <li>HOLDING When the manager is in the holding state, the associated POAs
+ * queue incoming requests.</li>
+ * <li>INACTIVE This state is entered when the associated POAs are to be
+ * shut down.</li>
+ * </ul>
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public class State
+ implements Serializable, IDLEntity
+{
+ /**
+ * Use serialVersionUID (v1.4) for interoperability.
+ */
+ private static final long serialVersionUID = -2451866258678193271L;
+
+ /**
+ * The value field for the current instance.
+ */
+ private final int _value;
+
+ /**
+ * The possible value of this enumeration (HOLDING).
+ */
+ public static final int _HOLDING = 0;
+
+ /**
+ * An instance of State, initialized to HOLDING.
+ */
+ public static final State HOLDING = new State(_HOLDING);
+
+ /**
+ * The possible value of this enumeration (ACTIVE).
+ */
+ public static final int _ACTIVE = 1;
+
+ /**
+ * An instance of State, initialized to ACTIVE.
+ */
+ public static final State ACTIVE = new State(_ACTIVE);
+
+ /**
+ * The possible value of this enumeration (DISCARDING).
+ */
+ public static final int _DISCARDING = 2;
+
+ /**
+ * An instance of State, initialized to DISCARDING.
+ */
+ public static final State DISCARDING = new State(_DISCARDING);
+
+ /**
+ * The possible value of this enumeration (INACTIVE).
+ */
+ public static final int _INACTIVE = 3;
+
+ /**
+ * An instance of State, initialized to INACTIVE.
+ */
+ public static final State INACTIVE = new State(_INACTIVE);
+
+ /**
+ * The private array that maps integer codes to the enumeration
+ * values.
+ */
+ private static final State[] enume =
+ new State[] { HOLDING, ACTIVE, DISCARDING, INACTIVE };
+
+ /**
+ * The private array of state names.
+ */
+ private static final String[] state_names =
+ new String[] { "HOLDING", "ACTIVE", "DISCARDING", "INACTIVE" };
+
+ /**
+ * Normally, no new instances are required, so the constructor is protected.
+ */
+ protected State(int a_value)
+ {
+ _value = a_value;
+ }
+
+ /**
+ * Returns the State, matching the given integer constant.
+ *
+ * @param code one of _HOLDING, _ACTIVE, _DISCARDING, _INACTIVE.
+ * @return one of HOLDING, ACTIVE, DISCARDING, INACTIVE.
+ * @throws BAD_PARAM if the parameter is not one of the valid values.
+ */
+ public static State from_int(int code)
+ {
+ try
+ {
+ return enume [ code ];
+ }
+ catch (ArrayIndexOutOfBoundsException ex)
+ {
+ throw new BAD_OPERATION("Invalid enumeration code " + code);
+ }
+ }
+
+ /**
+ * Returns a short string representation.
+ * @return the name of the current enumeration value.
+ */
+ public String toString()
+ {
+ return state_names [ _value ];
+ }
+
+ /**
+ * Returns the integer code of the enumeration value.
+ * @return one of HOLDING, ACTIVE, DISCARDING, INACTIVE.
+ */
+ public int value()
+ {
+ return _value;
+ }
+} \ No newline at end of file
diff --git a/libjava/classpath/org/omg/PortableServer/POAManagerPackage/package.html b/libjava/classpath/org/omg/PortableServer/POAManagerPackage/package.html
new file mode 100644
index 00000000000..fb6ae58d595
--- /dev/null
+++ b/libjava/classpath/org/omg/PortableServer/POAManagerPackage/package.html
@@ -0,0 +1,46 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
+<!-- package.html -
+ 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.PortableServer.POAManagerPackage</title></head>
+
+<body>
+<p>Contains additional classes, needed by POA Manager</p>
+
+</body>
+</html>
diff --git a/libjava/classpath/org/omg/PortableServer/POAPackage/AdapterAlreadyExists.java b/libjava/classpath/org/omg/PortableServer/POAPackage/AdapterAlreadyExists.java
new file mode 100644
index 00000000000..ace2c842fae
--- /dev/null
+++ b/libjava/classpath/org/omg/PortableServer/POAPackage/AdapterAlreadyExists.java
@@ -0,0 +1,79 @@
+/* AdapterAlreadyExists.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.PortableServer.POAPackage;
+
+import org.omg.CORBA.UserException;
+import org.omg.CORBA.portable.IDLEntity;
+
+import java.io.Serializable;
+
+/**
+ * Raised if the target POA already has a child POA with the specified name
+ * (during creation of the new POA as a child of the target POA).
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public class AdapterAlreadyExists
+ extends UserException
+ implements IDLEntity, Serializable
+{
+ /**
+ * Use serialVersionUID (v1.4) for interoperability.
+ */
+ private static final long serialVersionUID = -2678288222917790041L;
+
+ /**
+ * Create AdapterAlreadyExists with no explaining
+ * message.
+ */
+ public AdapterAlreadyExists()
+ {
+ }
+
+ /**
+ * Create the AdapterAlreadyExists with explaining
+ * message.
+ *
+ * @param why a string, explaining, why this exception has been thrown.
+ */
+ public AdapterAlreadyExists(String why)
+ {
+ super(why);
+ }
+} \ No newline at end of file
diff --git a/libjava/classpath/org/omg/PortableServer/POAPackage/AdapterAlreadyExistsHelper.java b/libjava/classpath/org/omg/PortableServer/POAPackage/AdapterAlreadyExistsHelper.java
new file mode 100644
index 00000000000..3ffee4ff85a
--- /dev/null
+++ b/libjava/classpath/org/omg/PortableServer/POAPackage/AdapterAlreadyExistsHelper.java
@@ -0,0 +1,150 @@
+/* AdapterAlreadyExistsHelper.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.PortableServer.POAPackage;
+
+import gnu.CORBA.EmptyExceptionHolder;
+
+import org.omg.CORBA.Any;
+import org.omg.CORBA.BAD_OPERATION;
+import org.omg.CORBA.ORB;
+import org.omg.CORBA.StructMember;
+import org.omg.CORBA.TCKind;
+import org.omg.CORBA.TypeCode;
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+
+/**
+ * The helper operations for the exception {@link AdapterAlreadyExists}.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public abstract class AdapterAlreadyExistsHelper
+{
+ /**
+ * The cached typecode value, computed only once.
+ */
+ private static TypeCode typeCode;
+
+ /**
+ * Create the AdapterAlreadyExists typecode (emtpy structure,
+ * named "AdapterAlreadyExists").
+ */
+ public static TypeCode type()
+ {
+ if (typeCode == null)
+ {
+ ORB orb = ORB.init();
+ StructMember[] members = new StructMember[ 0 ];
+ typeCode =
+ orb.create_exception_tc(id(), "AdapterAlreadyExists", members);
+ }
+ return typeCode;
+ }
+
+ /* Every user exception with no user defined
+ fields can use EmptyExceptionHolder */
+
+ /**
+ * Insert the AdapterAlreadyExists into the given Any.
+ *
+ * @param any the Any to insert into.
+ * @param that the AdapterAlreadyExists to insert.
+ */
+ public static void insert(Any any, AdapterAlreadyExists that)
+ {
+ any.insert_Streamable(new EmptyExceptionHolder(that, type()));
+ }
+
+ /**
+ * Extract the AdapterAlreadyExists from given Any.
+ *
+ * @throws BAD_OPERATION if the passed Any does not contain AdapterAlreadyExists.
+ */
+ public static AdapterAlreadyExists extract(Any any)
+ {
+ try
+ {
+ EmptyExceptionHolder h =
+ (EmptyExceptionHolder) any.extract_Streamable();
+ return (AdapterAlreadyExists) h.value;
+ }
+ catch (ClassCastException cex)
+ {
+ BAD_OPERATION bad = new BAD_OPERATION("AdapterAlreadyExists expected");
+ bad.initCause(cex);
+ throw bad;
+ }
+ }
+
+ /**
+ * Get the AdapterAlreadyExists repository id.
+ *
+ * @return "IDL:omg.org/PortableServer/POA/AdapterAlreadyExists:1.0", always.
+ */
+ public static String id()
+ {
+ return "IDL:omg.org/PortableServer/POA/AdapterAlreadyExists:1.0";
+ }
+
+ /**
+ * Read the exception from the CDR intput stream.
+ *
+ * @param input a org.omg.CORBA.portable stream to read from.
+ */
+ public static AdapterAlreadyExists read(InputStream input)
+ {
+ // Read the exception repository id.
+ String id = input.read_string();
+ AdapterAlreadyExists value = new AdapterAlreadyExists(id);
+
+ return value;
+ }
+
+ /**
+ * Write the exception to the CDR output stream.
+ *
+ * @param output a org.omg.CORBA.portable stream stream to write into.
+ * @param value a value to write.
+ */
+ public static void write(OutputStream output, AdapterAlreadyExists value)
+ {
+ // Write the exception repository id.
+ output.write_string(id());
+ }
+} \ No newline at end of file
diff --git a/libjava/classpath/org/omg/PortableServer/POAPackage/AdapterNonExistent.java b/libjava/classpath/org/omg/PortableServer/POAPackage/AdapterNonExistent.java
new file mode 100644
index 00000000000..9d0a79f73f4
--- /dev/null
+++ b/libjava/classpath/org/omg/PortableServer/POAPackage/AdapterNonExistent.java
@@ -0,0 +1,79 @@
+/* AdapterNonExistent.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.PortableServer.POAPackage;
+
+import org.omg.CORBA.UserException;
+import org.omg.CORBA.portable.IDLEntity;
+
+import java.io.Serializable;
+
+/**
+ * The AdapterNonExistent is thrown if the parent POA cannot locate
+ * the required child POA.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public class AdapterNonExistent
+ extends UserException
+ implements IDLEntity, Serializable
+{
+ /**
+ * Use serialVersionUID (v1.4) for interoperability.
+ */
+ private static final long serialVersionUID = -9166706041988650696L;
+
+ /**
+ * Create AdapterNonExistent with no explaining
+ * message.
+ */
+ public AdapterNonExistent()
+ {
+ }
+
+ /**
+ * Create the AdapterNonExistent with explaining
+ * message.
+ *
+ * @param why a string, explaining, why this exception has been thrown.
+ */
+ public AdapterNonExistent(String why)
+ {
+ super(why);
+ }
+} \ No newline at end of file
diff --git a/libjava/classpath/org/omg/PortableServer/POAPackage/AdapterNonExistentHelper.java b/libjava/classpath/org/omg/PortableServer/POAPackage/AdapterNonExistentHelper.java
new file mode 100644
index 00000000000..f05daec3d83
--- /dev/null
+++ b/libjava/classpath/org/omg/PortableServer/POAPackage/AdapterNonExistentHelper.java
@@ -0,0 +1,149 @@
+/* AdapterNonExistentHelper.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.PortableServer.POAPackage;
+
+import gnu.CORBA.EmptyExceptionHolder;
+
+import org.omg.CORBA.Any;
+import org.omg.CORBA.BAD_OPERATION;
+import org.omg.CORBA.ORB;
+import org.omg.CORBA.StructMember;
+import org.omg.CORBA.TCKind;
+import org.omg.CORBA.TypeCode;
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+
+/**
+ * The helper operations for the exception {@link AdapterNonExistent}.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public abstract class AdapterNonExistentHelper
+{
+ /**
+ * The cached typecode value, computed only once.
+ */
+ private static TypeCode typeCode;
+
+ /**
+ * Create the AdapterNonExistent typecode (empty structure,
+ * named "AdapterNonExistent").
+ */
+ public static TypeCode type()
+ {
+ if (typeCode == null)
+ {
+ ORB orb = ORB.init();
+ StructMember[] members = new StructMember[ 0 ];
+ typeCode = orb.create_exception_tc(id(), "AdapterNonExistent", members);
+ }
+ return typeCode;
+ }
+
+ /* Every user exception with no user defined
+ fields can use EmptyExceptionHolder */
+
+ /**
+ * Insert the AdapterNonExistent into the given Any.
+ *
+ * @param any the Any to insert into.
+ * @param that the AdapterNonExistent to insert.
+ */
+ public static void insert(Any any, AdapterNonExistent that)
+ {
+ any.insert_Streamable(new EmptyExceptionHolder(that, type()));
+ }
+
+ /**
+ * Extract the AdapterNonExistent from given Any.
+ *
+ * @throws BAD_OPERATION if the passed Any does not contain AdapterNonExistent.
+ */
+ public static AdapterNonExistent extract(Any any)
+ {
+ try
+ {
+ EmptyExceptionHolder h =
+ (EmptyExceptionHolder) any.extract_Streamable();
+ return (AdapterNonExistent) h.value;
+ }
+ catch (ClassCastException cex)
+ {
+ BAD_OPERATION bad = new BAD_OPERATION("AdapterNonExistent expected");
+ bad.initCause(cex);
+ throw bad;
+ }
+ }
+
+ /**
+ * Get the AdapterNonExistent repository id.
+ *
+ * @return "IDL:omg.org/PortableServer/POA/AdapterNonExistent:1.0", always.
+ */
+ public static String id()
+ {
+ return "IDL:omg.org/PortableServer/POA/AdapterNonExistent:1.0";
+ }
+
+ /**
+ * Read the exception from the CDR intput stream.
+ *
+ * @param input a org.omg.CORBA.portable stream to read from.
+ */
+ public static AdapterNonExistent read(InputStream input)
+ {
+ // Read the exception repository id.
+ String id = input.read_string();
+ AdapterNonExistent value = new AdapterNonExistent(id);
+
+ return value;
+ }
+
+ /**
+ * Write the exception to the CDR output stream.
+ *
+ * @param output a org.omg.CORBA.portable stream stream to write into.
+ * @param value a value to write.
+ */
+ public static void write(OutputStream output, AdapterNonExistent value)
+ {
+ // Write the exception repository id.
+ output.write_string(id());
+ }
+} \ No newline at end of file
diff --git a/libjava/classpath/org/omg/PortableServer/POAPackage/InvalidPolicy.java b/libjava/classpath/org/omg/PortableServer/POAPackage/InvalidPolicy.java
new file mode 100644
index 00000000000..459335a1b44
--- /dev/null
+++ b/libjava/classpath/org/omg/PortableServer/POAPackage/InvalidPolicy.java
@@ -0,0 +1,109 @@
+/* InvalidPolicy.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.PortableServer.POAPackage;
+
+import org.omg.CORBA.UserException;
+import org.omg.CORBA.portable.IDLEntity;
+
+import java.io.Serializable;
+
+/**
+ * Raised if any of the policy objects specified is not supported by this
+ * ORB implementation, if conflicting policy objects are specified,
+ * or if any of the specified policy objects require prior administrative
+ * action that has not been performed.
+ *
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public class InvalidPolicy
+ extends UserException
+ implements IDLEntity, Serializable
+{
+ /**
+ * Use serialVersionUID (v1.4) for interoperability.
+ */
+ private static final long serialVersionUID = 3204212102282117205L;
+
+ /**
+ * The index in the policies parameter value of the first offending
+ * policy object.
+ */
+ public short index;
+
+ /**
+ * Create InvalidPolicy with no explaining
+ * message and leaving {@link index} with default 0 value.
+ */
+ public InvalidPolicy()
+ {
+ }
+
+ /**
+ * Create the InvalidPolicy with explaining
+ * message and initialisintg {@link index} to the passed value.
+ *
+ * @param why a string, explaining, why this exception has been thrown.
+ * @param a_index a value for index.
+ */
+ public InvalidPolicy(String why, short a_index)
+ {
+ super(why);
+ this.index = a_index;
+ }
+
+ /**
+ * Create the InvalidPolicy without explaining
+ * message and initialisintg {@link index} to the passed value.
+ *
+ * @param a_index a value for index.
+ */
+ public InvalidPolicy(short a_index)
+ {
+ this.index = a_index;
+ }
+
+ /**
+ * Adds {@link #index} to the super.getMessage().
+ */
+ public String getMessage()
+ {
+ return super.getMessage() + " at index " + index;
+ }
+} \ No newline at end of file
diff --git a/libjava/classpath/org/omg/PortableServer/POAPackage/InvalidPolicyHelper.java b/libjava/classpath/org/omg/PortableServer/POAPackage/InvalidPolicyHelper.java
new file mode 100644
index 00000000000..15aa62d8201
--- /dev/null
+++ b/libjava/classpath/org/omg/PortableServer/POAPackage/InvalidPolicyHelper.java
@@ -0,0 +1,155 @@
+/* InvalidPolicyHelper.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.PortableServer.POAPackage;
+
+import gnu.CORBA.Poa.InvalidPolicyHolder;
+
+import org.omg.CORBA.Any;
+import org.omg.CORBA.BAD_OPERATION;
+import org.omg.CORBA.ORB;
+import org.omg.CORBA.StructMember;
+import org.omg.CORBA.TCKind;
+import org.omg.CORBA.TypeCode;
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+
+/**
+ * The helper operations for the exception {@link InvalidPolicy}.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public abstract class InvalidPolicyHelper
+{
+ /**
+ * The cached typecode value, computed only once.
+ */
+ private static TypeCode typeCode;
+
+ /**
+ * Create the InvalidPolicy typecode (emtpy structure,
+ * named "InvalidPolicy").
+ * The typecode states that the structure contains the
+ * single field, named "index".
+ */
+ public static TypeCode type()
+ {
+ if (typeCode == null)
+ {
+ ORB orb = ORB.init();
+ StructMember[] members = new StructMember[ 1 ];
+
+ TypeCode field;
+
+ field = orb.get_primitive_tc(TCKind.tk_ushort);
+ members [ 0 ] = new StructMember("index", field, null);
+ typeCode = orb.create_exception_tc(id(), "InvalidPolicy", members);
+ }
+ return typeCode;
+ }
+
+ /**
+ * Insert the InvalidPolicy into the given Any.
+ * This method uses the InvalidPolicyHolder.
+ *
+ * @param any the Any to insert into.
+ * @param that the InvalidPolicy to insert.
+ */
+ public static void insert(Any any, InvalidPolicy that)
+ {
+ any.insert_Streamable(new InvalidPolicyHolder(that));
+ }
+
+ /**
+ * Extract the InvalidPolicy from given Any.
+ * This method uses the InvalidPolicyHolder.
+ *
+ * @throws BAD_OPERATION if the passed Any does not contain InvalidPolicy.
+ */
+ public static InvalidPolicy extract(Any any)
+ {
+ try
+ {
+ return ((InvalidPolicyHolder) any.extract_Streamable()).value;
+ }
+ catch (ClassCastException cex)
+ {
+ BAD_OPERATION bad = new BAD_OPERATION("InvalidPolicy expected");
+ bad.initCause(cex);
+ throw bad;
+ }
+ }
+
+ /**
+ * Get the InvalidPolicy repository id.
+ *
+ * @return "IDL:omg.org/PortableServer/POA/InvalidPolicy:1.0", always.
+ */
+ public static String id()
+ {
+ return "IDL:omg.org/PortableServer/POA/InvalidPolicy:1.0";
+ }
+
+ /**
+ * Read the exception from the CDR intput stream.
+ *
+ * @param input a org.omg.CORBA.portable stream to read from.
+ */
+ public static InvalidPolicy read(InputStream input)
+ {
+ // Read the exception repository id.
+ String id = input.read_string();
+ InvalidPolicy value = new InvalidPolicy();
+
+ value.index = input.read_short();
+ return value;
+ }
+
+ /**
+ * Write the exception to the CDR output stream.
+ *
+ * @param output a org.omg.CORBA.portable stream stream to write into.
+ * @param value a value to write.
+ */
+ public static void write(OutputStream output, InvalidPolicy value)
+ {
+ // Write the exception repository id.
+ output.write_string(id());
+ output.write_short(value.index);
+ }
+} \ No newline at end of file
diff --git a/libjava/classpath/org/omg/PortableServer/POAPackage/NoServant.java b/libjava/classpath/org/omg/PortableServer/POAPackage/NoServant.java
new file mode 100644
index 00000000000..3f635401778
--- /dev/null
+++ b/libjava/classpath/org/omg/PortableServer/POAPackage/NoServant.java
@@ -0,0 +1,79 @@
+/* NoServant.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.PortableServer.POAPackage;
+
+import org.omg.CORBA.UserException;
+import org.omg.CORBA.portable.IDLEntity;
+
+import java.io.Serializable;
+
+/**
+ * Raised when trying to get the default servant, when no default servant
+ * has been associated with POA.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public class NoServant
+ extends UserException
+ implements IDLEntity, Serializable
+{
+ /**
+ * Use serialVersionUID (v1.4) for interoperability.
+ */
+ private static final long serialVersionUID = -5893773687270266061L;
+
+ /**
+ * Create NoServant with no explaining
+ * message.
+ */
+ public NoServant()
+ {
+ }
+
+ /**
+ * Create the NoServant with explaining
+ * message.
+ *
+ * @param why a string, explaining, why this exception has been thrown.
+ */
+ public NoServant(String why)
+ {
+ super(why);
+ }
+} \ No newline at end of file
diff --git a/libjava/classpath/org/omg/PortableServer/POAPackage/NoServantHelper.java b/libjava/classpath/org/omg/PortableServer/POAPackage/NoServantHelper.java
new file mode 100644
index 00000000000..26b21ce6c10
--- /dev/null
+++ b/libjava/classpath/org/omg/PortableServer/POAPackage/NoServantHelper.java
@@ -0,0 +1,149 @@
+/* NoServantHelper.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.PortableServer.POAPackage;
+
+import gnu.CORBA.EmptyExceptionHolder;
+
+import org.omg.CORBA.Any;
+import org.omg.CORBA.BAD_OPERATION;
+import org.omg.CORBA.ORB;
+import org.omg.CORBA.StructMember;
+import org.omg.CORBA.TCKind;
+import org.omg.CORBA.TypeCode;
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+
+/**
+ * The helper operations for the exception {@link NoServant}.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public abstract class NoServantHelper
+{
+ /**
+ * The cached typecode value, computed only once.
+ */
+ private static TypeCode typeCode;
+
+ /**
+ * Create the NoServant typecode (empty structure,
+ * named "NoServant").
+ */
+ public static TypeCode type()
+ {
+ if (typeCode == null)
+ {
+ ORB orb = ORB.init();
+ StructMember[] members = new StructMember[ 0 ];
+ typeCode = orb.create_exception_tc(id(), "NoServant", members);
+ }
+ return typeCode;
+ }
+
+ /* Every user exception with no user defined
+ fields can use EmptyExceptionHolder */
+
+ /**
+ * Insert the NoServant into the given Any.
+ *
+ * @param any the Any to insert into.
+ * @param that the NoServant to insert.
+ */
+ public static void insert(Any any, NoServant that)
+ {
+ any.insert_Streamable(new EmptyExceptionHolder(that, type()));
+ }
+
+ /**
+ * Extract the NoServant from given Any.
+ *
+ * @throws BAD_OPERATION if the passed Any does not contain NoServant.
+ */
+ public static NoServant extract(Any any)
+ {
+ try
+ {
+ EmptyExceptionHolder h =
+ (EmptyExceptionHolder) any.extract_Streamable();
+ return (NoServant) h.value;
+ }
+ catch (ClassCastException cex)
+ {
+ BAD_OPERATION bad = new BAD_OPERATION("NoServant expected");
+ bad.initCause(cex);
+ throw bad;
+ }
+ }
+
+ /**
+ * Get the NoServant repository id.
+ *
+ * @return "IDL:omg.org/PortableServer/POA/NoServant:1.0", always.
+ */
+ public static String id()
+ {
+ return "IDL:omg.org/PortableServer/POA/NoServant:1.0";
+ }
+
+ /**
+ * Read the exception from the CDR intput stream.
+ *
+ * @param input a org.omg.CORBA.portable stream to read from.
+ */
+ public static NoServant read(InputStream input)
+ {
+ // Read the exception repository id.
+ String id = input.read_string();
+ NoServant value = new NoServant(id);
+
+ return value;
+ }
+
+ /**
+ * Write the exception to the CDR output stream.
+ *
+ * @param output a org.omg.CORBA.portable stream stream to write into.
+ * @param value a value to write.
+ */
+ public static void write(OutputStream output, NoServant value)
+ {
+ // Write the exception repository id.
+ output.write_string(id());
+ }
+} \ No newline at end of file
diff --git a/libjava/classpath/org/omg/PortableServer/POAPackage/ObjectAlreadyActive.java b/libjava/classpath/org/omg/PortableServer/POAPackage/ObjectAlreadyActive.java
new file mode 100644
index 00000000000..5a3b15e88be
--- /dev/null
+++ b/libjava/classpath/org/omg/PortableServer/POAPackage/ObjectAlreadyActive.java
@@ -0,0 +1,78 @@
+/* ObjectAlreadyActive.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.PortableServer.POAPackage;
+
+import org.omg.CORBA.UserException;
+import org.omg.CORBA.portable.IDLEntity;
+
+import java.io.Serializable;
+
+/**
+ * Raised in response to activate the already active object.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public class ObjectAlreadyActive
+ extends UserException
+ implements IDLEntity, Serializable
+{
+ /**
+ * Use serialVersionUID (v1.4) for interoperability.
+ */
+ private static final long serialVersionUID = -2919308871345098101L;
+
+ /**
+ * Create ObjectAlreadyActive with no explaining
+ * message.
+ */
+ public ObjectAlreadyActive()
+ {
+ }
+
+ /**
+ * Create the ObjectAlreadyActive with explaining
+ * message.
+ *
+ * @param why a string, explaining, why this exception has been thrown.
+ */
+ public ObjectAlreadyActive(String why)
+ {
+ super(why);
+ }
+} \ No newline at end of file
diff --git a/libjava/classpath/org/omg/PortableServer/POAPackage/ObjectAlreadyActiveHelper.java b/libjava/classpath/org/omg/PortableServer/POAPackage/ObjectAlreadyActiveHelper.java
new file mode 100644
index 00000000000..99891dbe5c3
--- /dev/null
+++ b/libjava/classpath/org/omg/PortableServer/POAPackage/ObjectAlreadyActiveHelper.java
@@ -0,0 +1,150 @@
+/* ObjectAlreadyActiveHelper.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.PortableServer.POAPackage;
+
+import gnu.CORBA.EmptyExceptionHolder;
+
+import org.omg.CORBA.Any;
+import org.omg.CORBA.BAD_OPERATION;
+import org.omg.CORBA.ORB;
+import org.omg.CORBA.StructMember;
+import org.omg.CORBA.TCKind;
+import org.omg.CORBA.TypeCode;
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+
+/**
+ * The helper operations for the exception {@link ObjectAlreadyActive}.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public abstract class ObjectAlreadyActiveHelper
+{
+ /**
+ * The cached typecode value, computed only once.
+ */
+ private static TypeCode typeCode;
+
+ /**
+ * Create the ObjectAlreadyActive typecode (empty structure,
+ * named "ObjectAlreadyActive").
+ */
+ public static TypeCode type()
+ {
+ if (typeCode == null)
+ {
+ ORB orb = ORB.init();
+ StructMember[] members = new StructMember[ 0 ];
+ typeCode =
+ orb.create_exception_tc(id(), "ObjectAlreadyActive", members);
+ }
+ return typeCode;
+ }
+
+ /* Every user exception with no user defined
+ fields can use EmptyExceptionHolder */
+
+ /**
+ * Insert the ObjectAlreadyActive into the given Any.
+ *
+ * @param any the Any to insert into.
+ * @param that the ObjectAlreadyActive to insert.
+ */
+ public static void insert(Any any, ObjectAlreadyActive that)
+ {
+ any.insert_Streamable(new EmptyExceptionHolder(that, type()));
+ }
+
+ /**
+ * Extract the ObjectAlreadyActive from given Any.
+ *
+ * @throws BAD_OPERATION if the passed Any does not contain ObjectAlreadyActive.
+ */
+ public static ObjectAlreadyActive extract(Any any)
+ {
+ try
+ {
+ EmptyExceptionHolder h =
+ (EmptyExceptionHolder) any.extract_Streamable();
+ return (ObjectAlreadyActive) h.value;
+ }
+ catch (ClassCastException cex)
+ {
+ BAD_OPERATION bad = new BAD_OPERATION("ObjectAlreadyActive expected");
+ bad.initCause(cex);
+ throw bad;
+ }
+ }
+
+ /**
+ * Get the ObjectAlreadyActive repository id.
+ *
+ * @return "IDL:omg.org/PortableServer/POA/ObjectAlreadyActive:1.0", always.
+ */
+ public static String id()
+ {
+ return "IDL:omg.org/PortableServer/POA/ObjectAlreadyActive:1.0";
+ }
+
+ /**
+ * Read the exception from the CDR intput stream.
+ *
+ * @param input a org.omg.CORBA.portable stream to read from.
+ */
+ public static ObjectAlreadyActive read(InputStream input)
+ {
+ // Read the exception repository id.
+ String id = input.read_string();
+ ObjectAlreadyActive value = new ObjectAlreadyActive(id);
+
+ return value;
+ }
+
+ /**
+ * Write the exception to the CDR output stream.
+ *
+ * @param output a org.omg.CORBA.portable stream stream to write into.
+ * @param value a value to write.
+ */
+ public static void write(OutputStream output, ObjectAlreadyActive value)
+ {
+ // Write the exception repository id.
+ output.write_string(id());
+ }
+} \ No newline at end of file
diff --git a/libjava/classpath/org/omg/PortableServer/POAPackage/ObjectNotActive.java b/libjava/classpath/org/omg/PortableServer/POAPackage/ObjectNotActive.java
new file mode 100644
index 00000000000..4d70af4b820
--- /dev/null
+++ b/libjava/classpath/org/omg/PortableServer/POAPackage/ObjectNotActive.java
@@ -0,0 +1,79 @@
+/* ObjectNotActive.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.PortableServer.POAPackage;
+
+import org.omg.CORBA.UserException;
+import org.omg.CORBA.portable.IDLEntity;
+
+import java.io.Serializable;
+
+/**
+ * Raised in several cases when the operation would be applicable to the
+ * activated object, but the current object is not active.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public class ObjectNotActive
+ extends UserException
+ implements IDLEntity, Serializable
+{
+ /**
+ * Use serialVersionUID (v1.4) for interoperability.
+ */
+ private static final long serialVersionUID = 2269559915073532416L;
+
+ /**
+ * Create ObjectNotActive with no explaining
+ * message.
+ */
+ public ObjectNotActive()
+ {
+ }
+
+ /**
+ * Create the ObjectNotActive with explaining
+ * message.
+ *
+ * @param why a string, explaining, why this exception has been thrown.
+ */
+ public ObjectNotActive(String why)
+ {
+ super(why);
+ }
+} \ No newline at end of file
diff --git a/libjava/classpath/org/omg/PortableServer/POAPackage/ObjectNotActiveHelper.java b/libjava/classpath/org/omg/PortableServer/POAPackage/ObjectNotActiveHelper.java
new file mode 100644
index 00000000000..867d5f4f641
--- /dev/null
+++ b/libjava/classpath/org/omg/PortableServer/POAPackage/ObjectNotActiveHelper.java
@@ -0,0 +1,149 @@
+/* ObjectNotActiveHelper.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.PortableServer.POAPackage;
+
+import gnu.CORBA.EmptyExceptionHolder;
+
+import org.omg.CORBA.Any;
+import org.omg.CORBA.BAD_OPERATION;
+import org.omg.CORBA.ORB;
+import org.omg.CORBA.StructMember;
+import org.omg.CORBA.TCKind;
+import org.omg.CORBA.TypeCode;
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+
+/**
+ * The helper operations for the exception {@link ObjectNotActive}.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public abstract class ObjectNotActiveHelper
+{
+ /**
+ * The cached typecode value, computed only once.
+ */
+ private static TypeCode typeCode;
+
+ /**
+ * Create the ObjectNotActive typecode (empty structure,
+ * named "ObjectNotActive").
+ */
+ public static TypeCode type()
+ {
+ if (typeCode == null)
+ {
+ ORB orb = ORB.init();
+ StructMember[] members = new StructMember[ 0 ];
+ typeCode = orb.create_exception_tc(id(), "ObjectNotActive", members);
+ }
+ return typeCode;
+ }
+
+ /* Every user exception with no user defined
+ fields can use EmptyExceptionHolder */
+
+ /**
+ * Insert the ObjectNotActive into the given Any.
+ *
+ * @param any the Any to insert into.
+ * @param that the ObjectNotActive to insert.
+ */
+ public static void insert(Any any, ObjectNotActive that)
+ {
+ any.insert_Streamable(new EmptyExceptionHolder(that, type()));
+ }
+
+ /**
+ * Extract the ObjectNotActive from given Any.
+ *
+ * @throws BAD_OPERATION if the passed Any does not contain ObjectNotActive.
+ */
+ public static ObjectNotActive extract(Any any)
+ {
+ try
+ {
+ EmptyExceptionHolder h =
+ (EmptyExceptionHolder) any.extract_Streamable();
+ return (ObjectNotActive) h.value;
+ }
+ catch (ClassCastException cex)
+ {
+ BAD_OPERATION bad = new BAD_OPERATION("ObjectNotActive expected");
+ bad.initCause(cex);
+ throw bad;
+ }
+ }
+
+ /**
+ * Get the ObjectNotActive repository id.
+ *
+ * @return "IDL:omg.org/PortableServer/POA/ObjectNotActive:1.0", always.
+ */
+ public static String id()
+ {
+ return "IDL:omg.org/PortableServer/POA/ObjectNotActive:1.0";
+ }
+
+ /**
+ * Read the exception from the CDR intput stream.
+ *
+ * @param input a org.omg.CORBA.portable stream to read from.
+ */
+ public static ObjectNotActive read(InputStream input)
+ {
+ // Read the exception repository id.
+ String id = input.read_string();
+ ObjectNotActive value = new ObjectNotActive(id);
+
+ return value;
+ }
+
+ /**
+ * Write the exception to the CDR output stream.
+ *
+ * @param output a org.omg.CORBA.portable stream stream to write into.
+ * @param value a value to write.
+ */
+ public static void write(OutputStream output, ObjectNotActive value)
+ {
+ // Write the exception repository id.
+ output.write_string(id());
+ }
+} \ No newline at end of file
diff --git a/libjava/classpath/org/omg/PortableServer/POAPackage/ServantAlreadyActive.java b/libjava/classpath/org/omg/PortableServer/POAPackage/ServantAlreadyActive.java
new file mode 100644
index 00000000000..71786ce9107
--- /dev/null
+++ b/libjava/classpath/org/omg/PortableServer/POAPackage/ServantAlreadyActive.java
@@ -0,0 +1,83 @@
+/* ServantAlreadyActive.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.PortableServer.POAPackage;
+
+import org.omg.CORBA.UserException;
+import org.omg.CORBA.portable.IDLEntity;
+
+import java.io.Serializable;
+
+/**
+ * Raised in response to activate the already active object when
+ * the UNIQUE_ID (single ID per object, default) policy is active. If the
+ * UNIQUE_ID policy is inactive, the object can be activated several
+ * times, each time obtaining a newly generated Id to the same object.
+ *
+ * @see org.omg.PortableServer.IdUniquenessPolicyValue
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public class ServantAlreadyActive
+ extends UserException
+ implements IDLEntity, Serializable
+{
+ /**
+ * Use serialVersionUID (v1.4) for interoperability.
+ */
+ private static final long serialVersionUID = 780130793809887260L;
+
+ /**
+ * Create ServantAlreadyActive with no explaining
+ * message.
+ */
+ public ServantAlreadyActive()
+ {
+ }
+
+ /**
+ * Create the ServantAlreadyActive with explaining
+ * message.
+ *
+ * @param why a string, explaining, why this exception has been thrown.
+ */
+ public ServantAlreadyActive(String why)
+ {
+ super(why);
+ }
+} \ No newline at end of file
diff --git a/libjava/classpath/org/omg/PortableServer/POAPackage/ServantAlreadyActiveHelper.java b/libjava/classpath/org/omg/PortableServer/POAPackage/ServantAlreadyActiveHelper.java
new file mode 100644
index 00000000000..0db0e938b69
--- /dev/null
+++ b/libjava/classpath/org/omg/PortableServer/POAPackage/ServantAlreadyActiveHelper.java
@@ -0,0 +1,150 @@
+/* ServantAlreadyActiveHelper.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.PortableServer.POAPackage;
+
+import gnu.CORBA.EmptyExceptionHolder;
+
+import org.omg.CORBA.Any;
+import org.omg.CORBA.BAD_OPERATION;
+import org.omg.CORBA.ORB;
+import org.omg.CORBA.StructMember;
+import org.omg.CORBA.TCKind;
+import org.omg.CORBA.TypeCode;
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+
+/**
+* The helper operations for the exception {@link ServantAlreadyActive}.
+*
+* @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+*/
+public abstract class ServantAlreadyActiveHelper
+{
+ /**
+ * The cached typecode value, computed only once.
+ */
+ private static TypeCode typeCode;
+
+ /**
+ * Create the ServantAlreadyActive typecode (structure,
+ * named "ServantAlreadyActive").
+ */
+ public static TypeCode type()
+ {
+ if (typeCode == null)
+ {
+ ORB orb = ORB.init();
+ StructMember[] members = new StructMember[ 0 ];
+ typeCode =
+ orb.create_exception_tc(id(), "ServantAlreadyActive", members);
+ }
+ return typeCode;
+ }
+
+ /* Every user exception with no user defined
+ fields can use EmptyExceptionHolder */
+
+ /**
+ * Insert the ServantAlreadyActive into the given Any.
+ *
+ * @param any the Any to insert into.
+ * @param that the ServantAlreadyActive to insert.
+ */
+ public static void insert(Any any, ServantAlreadyActive that)
+ {
+ any.insert_Streamable(new EmptyExceptionHolder(that, type()));
+ }
+
+ /**
+ * Extract the ServantAlreadyActive from given Any.
+ *
+ * @throws BAD_OPERATION if the passed Any does not contain ServantAlreadyActive.
+ */
+ public static ServantAlreadyActive extract(Any any)
+ {
+ try
+ {
+ EmptyExceptionHolder h =
+ (EmptyExceptionHolder) any.extract_Streamable();
+ return (ServantAlreadyActive) h.value;
+ }
+ catch (ClassCastException cex)
+ {
+ BAD_OPERATION bad = new BAD_OPERATION("ServantAlreadyActive expected");
+ bad.initCause(cex);
+ throw bad;
+ }
+ }
+
+ /**
+ * Get the ServantAlreadyActive repository id.
+ *
+ * @return "IDL:omg.org/PortableServer/POA/ServantAlreadyActive:1.0", always.
+ */
+ public static String id()
+ {
+ return "IDL:omg.org/PortableServer/POA/ServantAlreadyActive:1.0";
+ }
+
+ /**
+ * Read the exception from the CDR intput stream.
+ *
+ * @param input a org.omg.CORBA.portable stream to read from.
+ */
+ public static ServantAlreadyActive read(InputStream input)
+ {
+ // Read the exception repository id.
+ String id = input.read_string();
+ ServantAlreadyActive value = new ServantAlreadyActive(id);
+
+ return value;
+ }
+
+ /**
+ * Write the exception to the CDR output stream.
+ *
+ * @param output a org.omg.CORBA.portable stream stream to write into.
+ * @param value a value to write.
+ */
+ public static void write(OutputStream output, ServantAlreadyActive value)
+ {
+ // Write the exception repository id.
+ output.write_string(id());
+ }
+} \ No newline at end of file
diff --git a/libjava/classpath/org/omg/PortableServer/POAPackage/ServantNotActive.java b/libjava/classpath/org/omg/PortableServer/POAPackage/ServantNotActive.java
new file mode 100644
index 00000000000..fd223e3ea99
--- /dev/null
+++ b/libjava/classpath/org/omg/PortableServer/POAPackage/ServantNotActive.java
@@ -0,0 +1,79 @@
+/* ServantNotActive.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.PortableServer.POAPackage;
+
+import org.omg.CORBA.UserException;
+import org.omg.CORBA.portable.IDLEntity;
+
+import java.io.Serializable;
+
+/**
+ * Raised in several cases when the operation would be applicable to the
+ * activated servant, but the current object is not active.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public class ServantNotActive
+ extends UserException
+ implements IDLEntity, Serializable
+{
+ /**
+ * Use serialVersionUID (v1.4) for interoperability.
+ */
+ private static final long serialVersionUID = -7806868032412803953L;
+
+ /**
+ * Create ServantNotActive with no explaining
+ * message.
+ */
+ public ServantNotActive()
+ {
+ }
+
+ /**
+ * Create the ServantNotActive with explaining
+ * message.
+ *
+ * @param why a string, explaining, why this exception has been thrown.
+ */
+ public ServantNotActive(String why)
+ {
+ super(why);
+ }
+} \ No newline at end of file
diff --git a/libjava/classpath/org/omg/PortableServer/POAPackage/ServantNotActiveHelper.java b/libjava/classpath/org/omg/PortableServer/POAPackage/ServantNotActiveHelper.java
new file mode 100644
index 00000000000..429421853ba
--- /dev/null
+++ b/libjava/classpath/org/omg/PortableServer/POAPackage/ServantNotActiveHelper.java
@@ -0,0 +1,149 @@
+/* ServantNotActiveHelper.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.PortableServer.POAPackage;
+
+import gnu.CORBA.EmptyExceptionHolder;
+
+import org.omg.CORBA.Any;
+import org.omg.CORBA.BAD_OPERATION;
+import org.omg.CORBA.ORB;
+import org.omg.CORBA.StructMember;
+import org.omg.CORBA.TCKind;
+import org.omg.CORBA.TypeCode;
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+
+/**
+ * The helper operations for the exception {@link ServantNotActive}.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public abstract class ServantNotActiveHelper
+{
+ /**
+ * The cached typecode value, computed only once.
+ */
+ private static TypeCode typeCode;
+
+ /**
+ * Create the ServantNotActive typecode (empty structure,
+ * named "ServantNotActive").
+ */
+ public static TypeCode type()
+ {
+ if (typeCode == null)
+ {
+ ORB orb = ORB.init();
+ StructMember[] members = new StructMember[ 0 ];
+ typeCode = orb.create_exception_tc(id(), "ServantNotActive", members);
+ }
+ return typeCode;
+ }
+
+ /* Every user exception with no user defined
+ fields can use EmptyExceptionHolder */
+
+ /**
+ * Insert the ServantNotActive into the given Any.
+ *
+ * @param any the Any to insert into.
+ * @param that the ServantNotActive to insert.
+ */
+ public static void insert(Any any, ServantNotActive that)
+ {
+ any.insert_Streamable(new EmptyExceptionHolder(that, type()));
+ }
+
+ /**
+ * Extract the ServantNotActive from given Any.
+ *
+ * @throws BAD_OPERATION if the passed Any does not contain ServantNotActive.
+ */
+ public static ServantNotActive extract(Any any)
+ {
+ try
+ {
+ EmptyExceptionHolder h =
+ (EmptyExceptionHolder) any.extract_Streamable();
+ return (ServantNotActive) h.value;
+ }
+ catch (ClassCastException cex)
+ {
+ BAD_OPERATION bad = new BAD_OPERATION("ServantNotActive expected");
+ bad.initCause(cex);
+ throw bad;
+ }
+ }
+
+ /**
+ * Get the ServantNotActive repository id.
+ *
+ * @return "IDL:omg.org/PortableServer/POA/ServantNotActive:1.0", always.
+ */
+ public static String id()
+ {
+ return "IDL:omg.org/PortableServer/POA/ServantNotActive:1.0";
+ }
+
+ /**
+ * Read the exception from the CDR intput stream.
+ *
+ * @param input a org.omg.CORBA.portable stream to read from.
+ */
+ public static ServantNotActive read(InputStream input)
+ {
+ // Read the exception repository id.
+ String id = input.read_string();
+ ServantNotActive value = new ServantNotActive(id);
+
+ return value;
+ }
+
+ /**
+ * Write the exception to the CDR output stream.
+ *
+ * @param output a org.omg.CORBA.portable stream stream to write into.
+ * @param value a value to write.
+ */
+ public static void write(OutputStream output, ServantNotActive value)
+ {
+ // Write the exception repository id.
+ output.write_string(id());
+ }
+} \ No newline at end of file
diff --git a/libjava/classpath/org/omg/PortableServer/POAPackage/WrongAdapter.java b/libjava/classpath/org/omg/PortableServer/POAPackage/WrongAdapter.java
new file mode 100644
index 00000000000..ea8d011a01e
--- /dev/null
+++ b/libjava/classpath/org/omg/PortableServer/POAPackage/WrongAdapter.java
@@ -0,0 +1,80 @@
+/* WrongAdapter.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.PortableServer.POAPackage;
+
+import org.omg.CORBA.UserException;
+import org.omg.CORBA.portable.IDLEntity;
+
+import java.io.Serializable;
+
+/**
+ * Raised when invoking POA operations, requiring that the target
+ * object would be created by this POA, if this condition is not
+ * satisfied.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public class WrongAdapter
+ extends UserException
+ implements IDLEntity, Serializable
+{
+ /**
+ * Use serialVersionUID (v1.4) for interoperability.
+ */
+ private static final long serialVersionUID = 7505320179916389200L;
+
+ /**
+ * Create WrongAdapter with no explaining
+ * message.
+ */
+ public WrongAdapter()
+ {
+ }
+
+ /**
+ * Create the WrongAdapter with explaining
+ * message.
+ *
+ * @param why a string, explaining, why this exception has been thrown.
+ */
+ public WrongAdapter(String why)
+ {
+ super(why);
+ }
+} \ No newline at end of file
diff --git a/libjava/classpath/org/omg/PortableServer/POAPackage/WrongAdapterHelper.java b/libjava/classpath/org/omg/PortableServer/POAPackage/WrongAdapterHelper.java
new file mode 100644
index 00000000000..ebba304a536
--- /dev/null
+++ b/libjava/classpath/org/omg/PortableServer/POAPackage/WrongAdapterHelper.java
@@ -0,0 +1,149 @@
+/* WrongAdapterHelper.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.PortableServer.POAPackage;
+
+import gnu.CORBA.EmptyExceptionHolder;
+
+import org.omg.CORBA.Any;
+import org.omg.CORBA.BAD_OPERATION;
+import org.omg.CORBA.ORB;
+import org.omg.CORBA.StructMember;
+import org.omg.CORBA.TCKind;
+import org.omg.CORBA.TypeCode;
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+
+/**
+ * The helper operations for the exception {@link WrongAdapter}.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public abstract class WrongAdapterHelper
+{
+ /**
+ * The cached typecode value, computed only once.
+ */
+ private static TypeCode typeCode;
+
+ /**
+ * Create the WrongAdapter typecode (empty structure,
+ * named "WrongAdapter").
+ */
+ public static TypeCode type()
+ {
+ if (typeCode == null)
+ {
+ ORB orb = ORB.init();
+ StructMember[] members = new StructMember[ 0 ];
+ typeCode = orb.create_exception_tc(id(), "WrongAdapter", members);
+ }
+ return typeCode;
+ }
+
+ /* Every user exception with no user defined
+ fields can use EmptyExceptionHolder */
+
+ /**
+ * Insert the WrongAdapter into the given Any.
+ *
+ * @param any the Any to insert into.
+ * @param that the WrongAdapter to insert.
+ */
+ public static void insert(Any any, WrongAdapter that)
+ {
+ any.insert_Streamable(new EmptyExceptionHolder(that, type()));
+ }
+
+ /**
+ * Extract the WrongAdapter from given Any.
+ *
+ * @throws BAD_OPERATION if the passed Any does not contain WrongAdapter.
+ */
+ public static WrongAdapter extract(Any any)
+ {
+ try
+ {
+ EmptyExceptionHolder h =
+ (EmptyExceptionHolder) any.extract_Streamable();
+ return (WrongAdapter) h.value;
+ }
+ catch (ClassCastException cex)
+ {
+ BAD_OPERATION bad = new BAD_OPERATION("WrongAdapter expected");
+ bad.initCause(cex);
+ throw bad;
+ }
+ }
+
+ /**
+ * Get the WrongAdapter repository id.
+ *
+ * @return "IDL:omg.org/PortableServer/POA/WrongAdapter:1.0", always.
+ */
+ public static String id()
+ {
+ return "IDL:omg.org/PortableServer/POA/WrongAdapter:1.0";
+ }
+
+ /**
+ * Read the exception from the CDR intput stream.
+ *
+ * @param input a org.omg.CORBA.portable stream to read from.
+ */
+ public static WrongAdapter read(InputStream input)
+ {
+ // Read the exception repository id.
+ String id = input.read_string();
+ WrongAdapter value = new WrongAdapter(id);
+
+ return value;
+ }
+
+ /**
+ * Write the exception to the CDR output stream.
+ *
+ * @param output a org.omg.CORBA.portable stream stream to write into.
+ * @param value a value to write.
+ */
+ public static void write(OutputStream output, WrongAdapter value)
+ {
+ // Write the exception repository id.
+ output.write_string(id());
+ }
+} \ No newline at end of file
diff --git a/libjava/classpath/org/omg/PortableServer/POAPackage/WrongPolicy.java b/libjava/classpath/org/omg/PortableServer/POAPackage/WrongPolicy.java
new file mode 100644
index 00000000000..9f589d7d644
--- /dev/null
+++ b/libjava/classpath/org/omg/PortableServer/POAPackage/WrongPolicy.java
@@ -0,0 +1,79 @@
+/* WrongPolicy.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.PortableServer.POAPackage;
+
+import org.omg.CORBA.UserException;
+import org.omg.CORBA.portable.IDLEntity;
+
+import java.io.Serializable;
+
+/**
+ * Raised when invoking the operation that is not allowed by the current
+ * combination of the used policies.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public class WrongPolicy
+ extends UserException
+ implements IDLEntity, Serializable
+{
+ /**
+ * Use serialVersionUID (v1.4) for interoperability.
+ */
+ private static final long serialVersionUID = 1949765652955335195L;
+
+ /**
+ * Create WrongPolicy with no explaining
+ * message.
+ */
+ public WrongPolicy()
+ {
+ }
+
+ /**
+ * Create the WrongPolicy with explaining
+ * message.
+ *
+ * @param why a string, explaining, why this exception has been thrown.
+ */
+ public WrongPolicy(String why)
+ {
+ super(why);
+ }
+} \ No newline at end of file
diff --git a/libjava/classpath/org/omg/PortableServer/POAPackage/WrongPolicyHelper.java b/libjava/classpath/org/omg/PortableServer/POAPackage/WrongPolicyHelper.java
new file mode 100644
index 00000000000..5460d0ea79d
--- /dev/null
+++ b/libjava/classpath/org/omg/PortableServer/POAPackage/WrongPolicyHelper.java
@@ -0,0 +1,149 @@
+/* WrongPolicyHelper.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.PortableServer.POAPackage;
+
+import gnu.CORBA.EmptyExceptionHolder;
+
+import org.omg.CORBA.Any;
+import org.omg.CORBA.BAD_OPERATION;
+import org.omg.CORBA.ORB;
+import org.omg.CORBA.StructMember;
+import org.omg.CORBA.TCKind;
+import org.omg.CORBA.TypeCode;
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+
+/**
+ * The helper operations for the exception {@link WrongPolicy}.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public abstract class WrongPolicyHelper
+{
+ /**
+ * The cached typecode value, computed only once.
+ */
+ private static TypeCode typeCode;
+
+ /**
+ * Create the WrongPolicy typecode (empty structure,
+ * named "WrongPolicy").
+ */
+ public static TypeCode type()
+ {
+ if (typeCode == null)
+ {
+ ORB orb = ORB.init();
+ StructMember[] members = new StructMember[ 0 ];
+ typeCode = orb.create_exception_tc(id(), "WrongPolicy", members);
+ }
+ return typeCode;
+ }
+
+ /* Every user exception with no user defined
+ fields can use EmptyExceptionHolder */
+
+ /**
+ * Insert the WrongPolicy into the given Any.
+ *
+ * @param any the Any to insert into.
+ * @param that the WrongPolicy to insert.
+ */
+ public static void insert(Any any, WrongPolicy that)
+ {
+ any.insert_Streamable(new EmptyExceptionHolder(that, type()));
+ }
+
+ /**
+ * Extract the WrongPolicy from given Any.
+ *
+ * @throws BAD_OPERATION if the passed Any does not contain WrongPolicy.
+ */
+ public static WrongPolicy extract(Any any)
+ {
+ try
+ {
+ EmptyExceptionHolder h =
+ (EmptyExceptionHolder) any.extract_Streamable();
+ return (WrongPolicy) h.value;
+ }
+ catch (ClassCastException cex)
+ {
+ BAD_OPERATION bad = new BAD_OPERATION("WrongPolicy expected");
+ bad.initCause(cex);
+ throw bad;
+ }
+ }
+
+ /**
+ * Get the WrongPolicy repository id.
+ *
+ * @return "IDL:omg.org/PortableServer/POA/WrongPolicy:1.0", always.
+ */
+ public static String id()
+ {
+ return "IDL:omg.org/PortableServer/POA/WrongPolicy:1.0";
+ }
+
+ /**
+ * Read the exception from the CDR intput stream.
+ *
+ * @param input a org.omg.CORBA.portable stream to read from.
+ */
+ public static WrongPolicy read(InputStream input)
+ {
+ // Read the exception repository id.
+ String id = input.read_string();
+ WrongPolicy value = new WrongPolicy(id);
+
+ return value;
+ }
+
+ /**
+ * Write the exception to the CDR output stream.
+ *
+ * @param output a org.omg.CORBA.portable stream stream to write into.
+ * @param value a value to write.
+ */
+ public static void write(OutputStream output, WrongPolicy value)
+ {
+ // Write the exception repository id.
+ output.write_string(id());
+ }
+} \ No newline at end of file
diff --git a/libjava/classpath/org/omg/PortableServer/POAPackage/package.html b/libjava/classpath/org/omg/PortableServer/POAPackage/package.html
new file mode 100644
index 00000000000..e95dd68ec4f
--- /dev/null
+++ b/libjava/classpath/org/omg/PortableServer/POAPackage/package.html
@@ -0,0 +1,49 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
+<!-- package.html - describes classes in org.omg.PortableServer.POAPackage 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.PortableServer.POAPackage</title></head>
+
+<body>
+<p>Contains exceptions that may be thrown by various POA operations.
+Also provides helpers that are used to transfer these exceptions if they
+are thrown on remote side.</p>
+
+@author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+</body>
+</html>
diff --git a/libjava/classpath/org/omg/PortableServer/REQUEST_PROCESSING_POLICY_ID.java b/libjava/classpath/org/omg/PortableServer/REQUEST_PROCESSING_POLICY_ID.java
new file mode 100644
index 00000000000..f71f101cd94
--- /dev/null
+++ b/libjava/classpath/org/omg/PortableServer/REQUEST_PROCESSING_POLICY_ID.java
@@ -0,0 +1,52 @@
+/* REQUEST_PROCESSING_POLICY_ID.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.PortableServer;
+
+ /**
+ * Holds an integer {@link RequestProcessingPolicy} identifier.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public interface REQUEST_PROCESSING_POLICY_ID
+{
+ /**
+ * Specifies the REQUEST_PROCESSING_POLICY_ID value, 22.
+ */
+ int value = 22;
+}
diff --git a/libjava/classpath/org/omg/PortableServer/RequestProcessingPolicyValue.java b/libjava/classpath/org/omg/PortableServer/RequestProcessingPolicyValue.java
new file mode 100644
index 00000000000..139010c86e8
--- /dev/null
+++ b/libjava/classpath/org/omg/PortableServer/RequestProcessingPolicyValue.java
@@ -0,0 +1,176 @@
+/* RequestProcessingPolicyValue.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.PortableServer;
+
+import org.omg.CORBA.BAD_OPERATION;
+import org.omg.CORBA.portable.IDLEntity;
+
+import java.io.Serializable;
+
+/**
+* Specifies the behaviour in the case when the
+* requested object is not found in the Active Object Map or that map
+* is not in use. The map is not in use when the
+* {@link ServantRetentionPolicyValue#NON_RETAIN} policy is active.
+* <ul>
+* <li>USE_ACTIVE_OBJECT_MAP_ONLY Raise an {@link org.omg.CORBA.OBJECT_NOT_EXIST}
+* with the minor code 2. {@link ServantRetentionPolicyValue#RETAIN} policy is
+* also required.
+* </li>
+* <li>USE_DEFAULT_SERVANT Dispatch request to the default servant. If no such
+* exists, raise {@link org.omg.CORBA.OBJ_ADAPTER} with minor code 3.
+* {@link IdUniquenessPolicyValue#MULTIPLE_ID} is also required.
+* </li>
+* <li>USE_SERVANT_MANAGER Dispatch request to the servant manager. If no such
+* exists, raise {@link org.omg.CORBA.OBJ_ADAPTER} with the minor code 4.</li>
+* </ul>
+*
+* @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+*/
+public class RequestProcessingPolicyValue
+ implements Serializable, IDLEntity
+{
+ /**
+ * Use serialVersionUID (V1.4) for interoperability.
+ */
+ private static final long serialVersionUID = 7646563512329907695L;
+
+ /**
+ * The value field for the current instance.
+ */
+ private final int _value;
+
+ /**
+ * The possible value of this enumeration (USE_ACTIVE_OBJECT_MAP_ONLY).
+ */
+ public static final int _USE_ACTIVE_OBJECT_MAP_ONLY = 0;
+
+ /**
+ * An instance of RequestProcessingPolicyValue, initialized to USE_ACTIVE_OBJECT_MAP_ONLY.
+ */
+ public static final RequestProcessingPolicyValue USE_ACTIVE_OBJECT_MAP_ONLY =
+ new RequestProcessingPolicyValue(_USE_ACTIVE_OBJECT_MAP_ONLY);
+
+ /**
+ * The possible value of this enumeration (USE_DEFAULT_SERVANT).
+ */
+ public static final int _USE_DEFAULT_SERVANT = 1;
+
+ /**
+ * An instance of RequestProcessingPolicyValue, initialized to USE_DEFAULT_SERVANT.
+ */
+ public static final RequestProcessingPolicyValue USE_DEFAULT_SERVANT =
+ new RequestProcessingPolicyValue(_USE_DEFAULT_SERVANT);
+
+ /**
+ * The possible value of this enumeration (USE_SERVANT_MANAGER).
+ */
+ public static final int _USE_SERVANT_MANAGER = 2;
+
+ /**
+ * An instance of RequestProcessingPolicyValue, initialized to USE_SERVANT_MANAGER.
+ */
+ public static final RequestProcessingPolicyValue USE_SERVANT_MANAGER =
+ new RequestProcessingPolicyValue(_USE_SERVANT_MANAGER);
+
+ /**
+ * The private array that maps integer codes to the enumeration
+ * values.
+ */
+ private static final RequestProcessingPolicyValue[] enume =
+ new RequestProcessingPolicyValue[]
+ {
+ USE_ACTIVE_OBJECT_MAP_ONLY, USE_DEFAULT_SERVANT, USE_SERVANT_MANAGER
+ };
+
+ /**
+ * The private array of state names.
+ */
+ private static final String[] state_names =
+ new String[]
+ {
+ "USE_ACTIVE_OBJECT_MAP_ONLY", "USE_DEFAULT_SERVANT", "USE_SERVANT_MANAGER"
+ };
+
+ /**
+ * Normally, no new instances are required, so the constructor is protected.
+ */
+ protected RequestProcessingPolicyValue(int a_value)
+ {
+ _value = a_value;
+ }
+
+ /**
+ * Returns the RequestProcessingPolicyValue, matching the given integer constant.
+ *
+ * @param code one of _USE_ACTIVE_OBJECT_MAP_ONLY, _USE_DEFAULT_SERVANT, _USE_SERVANT_MANAGER.
+ * @return one of USE_ACTIVE_OBJECT_MAP_ONLY, USE_DEFAULT_SERVANT, USE_SERVANT_MANAGER.
+ * @throws BAD_PARAM if the parameter is not one of the valid values.
+ */
+ public static RequestProcessingPolicyValue from_int(int code)
+ {
+ try
+ {
+ return enume [ code ];
+ }
+ catch (ArrayIndexOutOfBoundsException ex)
+ {
+ throw new BAD_OPERATION("Invalid enumeration code " + code);
+ }
+ }
+
+ /**
+ * Returns a short string representation.
+ * @return the name of the current enumeration value.
+ */
+ public String toString()
+ {
+ return state_names [ _value ];
+ }
+
+ /**
+ * Returns the integer code of the policy value.
+ * @return one of _USE_ACTIVE_OBJECT_MAP_ONLY,
+ * _USE_DEFAULT_SERVANT, _USE_SERVANT_MANAGER.
+ */
+ public int value()
+ {
+ return _value;
+ }
+} \ No newline at end of file
diff --git a/libjava/classpath/org/omg/PortableServer/SERVANT_RETENTION_POLICY_ID.java b/libjava/classpath/org/omg/PortableServer/SERVANT_RETENTION_POLICY_ID.java
new file mode 100644
index 00000000000..89813b921c0
--- /dev/null
+++ b/libjava/classpath/org/omg/PortableServer/SERVANT_RETENTION_POLICY_ID.java
@@ -0,0 +1,52 @@
+/* SERVANT_RETENTION_POLICY_ID.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.PortableServer;
+
+ /**
+ * Holds an integer {@link ServantRetentionPolicy} identifier.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public interface SERVANT_RETENTION_POLICY_ID
+{
+ /**
+ * Specifies the SERVANT_RETENTION_POLICY_ID value, 21.
+ */
+ int value = 21;
+}
diff --git a/libjava/classpath/org/omg/PortableServer/ServantLocatorPackage/CookieHolder.java b/libjava/classpath/org/omg/PortableServer/ServantLocatorPackage/CookieHolder.java
new file mode 100644
index 00000000000..e62bde709d1
--- /dev/null
+++ b/libjava/classpath/org/omg/PortableServer/ServantLocatorPackage/CookieHolder.java
@@ -0,0 +1,114 @@
+/* CookieHolder.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.PortableServer.ServantLocatorPackage;
+
+import org.omg.CORBA.NO_IMPLEMENT;
+import org.omg.CORBA.TypeCode;
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+import org.omg.CORBA.portable.Streamable;
+
+/**
+ * The CookieHolder is used together with the
+ * {@link org.omg.PortableServer.ServantLocator}, allowing the
+ * {@link org.omg.PortableServer.ServantLocatorOperations#preinvoke}
+ * to return an arbitrary java.lang.Object that will be later passed to
+ * {@link org.omg.PortableServer.ServantLocatorOperations#postinvoke}.
+ *
+ * @see org.omg.PortableServer.ServantLocatorOperations
+ * @see org.omg.PortableServer.ServantManager
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public class CookieHolder
+ implements Streamable
+{
+ /**
+ * The wrapped java.lang.Object.
+ */
+ public java.lang.Object value;
+
+ /**
+ * Create the unitialised instance of this holder.
+ */
+ public CookieHolder()
+ {
+ }
+
+ /**
+ * Create the instance, intialising the {@link #value} field to the passed
+ * value.
+ */
+ public CookieHolder(java.lang.Object initial)
+ {
+ value = initial;
+ }
+
+ /**
+ * java.lang.Object is outside the scope of the CORBA standards and the read
+ * operation cannot be supported in a language-neutral way.
+ *
+ * @throws NO_IMPLEMENT always.
+ */
+ public void _read(InputStream input)
+ {
+ throw new NO_IMPLEMENT();
+ }
+
+ /**
+ * There is no CORBA typecode that would specifically match a java.lang.Object.
+ *
+ * @throws NO_IMPLEMENT always.
+ */
+ public TypeCode _type()
+ {
+ throw new NO_IMPLEMENT();
+ }
+
+ /**
+ * java.lang.Object is outside the scope of the CORBA standards and the write
+ * operation cannot be supported in a language-neutral way.
+ *
+ * @throws NO_IMPLEMENT always.
+ */
+ public void _write(OutputStream output)
+ {
+ throw new NO_IMPLEMENT();
+ }
+} \ No newline at end of file
diff --git a/libjava/classpath/org/omg/PortableServer/ServantLocatorPackage/package.html b/libjava/classpath/org/omg/PortableServer/ServantLocatorPackage/package.html
new file mode 100644
index 00000000000..58106e25f41
--- /dev/null
+++ b/libjava/classpath/org/omg/PortableServer/ServantLocatorPackage/package.html
@@ -0,0 +1,49 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
+<!-- package.html -
+ 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.PortableServer.ServantLocatorPackage</title>
+</head>
+
+<body>
+<p>Contains a holder, transferring the data between subsequent
+ calls of the Servant Manager methods.</p>
+
+@author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+</body>
+</html>
diff --git a/libjava/classpath/org/omg/PortableServer/ServantRetentionPolicyValue.java b/libjava/classpath/org/omg/PortableServer/ServantRetentionPolicyValue.java
new file mode 100644
index 00000000000..caf8132e638
--- /dev/null
+++ b/libjava/classpath/org/omg/PortableServer/ServantRetentionPolicyValue.java
@@ -0,0 +1,150 @@
+/* ServantRetentionPolicyValue.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.PortableServer;
+
+import org.omg.CORBA.BAD_OPERATION;
+import org.omg.CORBA.portable.IDLEntity;
+
+import java.io.Serializable;
+
+/**
+* Specifies the servant retention policy.
+*
+* This enumeration can obtain the following values:
+* <ul>
+* <li>RETAIN The POA retains active servants in its Active Object Map.</li>
+* <li>NON_RETAIN The servants are not retained.</li>
+* </ul>
+* @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+*/
+public class ServantRetentionPolicyValue
+ implements Serializable, IDLEntity
+{
+ /**
+ * Use serialVersionUID (V1.4) for interoperability.
+ */
+ private static final long serialVersionUID = -7476100336036943822L;
+
+ /**
+ * The value field for the current instance.
+ */
+ private final int _value;
+
+ /**
+ * The possible value of this enumeration (RETAIN).
+ */
+ public static final int _RETAIN = 0;
+
+ /**
+ * An instance of ServantRetentionPolicyValue, indicating that
+ * the POA retains active servants in its Active Object Map.
+ */
+ public static final ServantRetentionPolicyValue RETAIN =
+ new ServantRetentionPolicyValue(_RETAIN);
+
+ /**
+ * The possible value of this enumeration (NON_RETAIN).
+ */
+ public static final int _NON_RETAIN = 1;
+
+ /**
+ * An instance of ServantRetentionPolicyValue, indicating that
+ * the POA does not use the Active Object Map.
+ */
+ public static final ServantRetentionPolicyValue NON_RETAIN =
+ new ServantRetentionPolicyValue(_NON_RETAIN);
+
+ /**
+ * The private array that maps integer codes to the enumeration
+ * values.
+ */
+ private static final ServantRetentionPolicyValue[] enume =
+ new ServantRetentionPolicyValue[] { RETAIN, NON_RETAIN };
+
+ /**
+ * The private array of state names.
+ */
+ private static final String[] state_names =
+ new String[] { "RETAIN", "NON_RETAIN" };
+
+ /**
+ * Normally, no new instances are required, so the constructor is protected.
+ */
+ protected ServantRetentionPolicyValue(int a_value)
+ {
+ _value = a_value;
+ }
+
+ /**
+ * Returns the ServantRetentionPolicyValue, matching the given integer constant.
+ *
+ * @param code one of _RETAIN, _NON_RETAIN.
+ * @return one of RETAIN, NON_RETAIN.
+ * @throws BAD_PARAM if the parameter is not one of the valid values.
+ */
+ public static ServantRetentionPolicyValue from_int(int code)
+ {
+ try
+ {
+ return enume [ code ];
+ }
+ catch (ArrayIndexOutOfBoundsException ex)
+ {
+ throw new BAD_OPERATION("Invalid enumeration code " + code);
+ }
+ }
+
+ /**
+ * Returns a short string representation.
+ * @return the name of the current enumeration value.
+ */
+ public String toString()
+ {
+ return state_names [ _value ];
+ }
+
+ /**
+ * Returns the integer code of the policy value.
+ * @return _RETAIN or _NON_RETAIN.
+ */
+ public int value()
+ {
+ return _value;
+ }
+} \ No newline at end of file
diff --git a/libjava/classpath/org/omg/PortableServer/THREAD_POLICY_ID.java b/libjava/classpath/org/omg/PortableServer/THREAD_POLICY_ID.java
new file mode 100644
index 00000000000..ef0427dde3d
--- /dev/null
+++ b/libjava/classpath/org/omg/PortableServer/THREAD_POLICY_ID.java
@@ -0,0 +1,52 @@
+/* THREAD_POLICY_ID.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.PortableServer;
+
+ /**
+ * Holds an integer {@link ThreadPolicy} identifier.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public interface THREAD_POLICY_ID
+{
+ /**
+ * Specifies the THREAD_POLICY_ID value, 16.
+ */
+ int value = 16;
+}
diff --git a/libjava/classpath/org/omg/SendingContext/RunTime.java b/libjava/classpath/org/omg/SendingContext/RunTime.java
new file mode 100644
index 00000000000..09d3d505b54
--- /dev/null
+++ b/libjava/classpath/org/omg/SendingContext/RunTime.java
@@ -0,0 +1,60 @@
+/* RunTime.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.SendingContext;
+
+import org.omg.CORBA.Object;
+import org.omg.CORBA.portable.IDLEntity;
+
+import java.io.Serializable;
+
+/**
+ * Defines the base class that represents the Sending Context. The sending
+ * context provides access to information about the originator of a
+ * GIOP message. For example, when a value type is sent in a GIOP
+ * Request, the receiver may need to ask the sender about
+ * the CodeBase for the implementation of the value type.
+ *
+ * @since 1.3
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public interface RunTime
+ extends IDLEntity, Object, RunTimeOperations, Serializable
+{
+} \ No newline at end of file
diff --git a/libjava/classpath/org/omg/SendingContext/RunTimeOperations.java b/libjava/classpath/org/omg/SendingContext/RunTimeOperations.java
new file mode 100644
index 00000000000..dabcb74c04d
--- /dev/null
+++ b/libjava/classpath/org/omg/SendingContext/RunTimeOperations.java
@@ -0,0 +1,57 @@
+/* RunTimeOperations.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.SendingContext;
+
+
+/**
+ * Defines the operations, applicable for Sending Context. The sending
+ * context provides access to information about the originator of a
+ * GIOP message. For example, when a value type is sent in a GIOP
+ * Request, the receiver may need to ask the sender about
+ * the CodeBase for the implementation of the value type.
+ *
+ * Unfortunately, no public operations are defined up till 1.4 inclusive.
+ *
+ * @since 1.3
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public interface RunTimeOperations
+{
+} \ No newline at end of file
diff --git a/libjava/classpath/org/omg/SendingContext/package.html b/libjava/classpath/org/omg/SendingContext/package.html
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/libjava/classpath/org/omg/SendingContext/package.html
diff --git a/libjava/classpath/org/omg/stub/java/rmi/_Remote_Stub.java b/libjava/classpath/org/omg/stub/java/rmi/_Remote_Stub.java
new file mode 100644
index 00000000000..da597e9173f
--- /dev/null
+++ b/libjava/classpath/org/omg/stub/java/rmi/_Remote_Stub.java
@@ -0,0 +1,78 @@
+/* _Remote_Stub.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.stub.java.rmi;
+
+import java.io.Serializable;
+
+import java.rmi.Remote;
+
+import javax.rmi.CORBA.Stub;
+
+/**
+ * Provides a stub for Remote type.
+ *
+ * Despite this class has appeared since v 1.3, it is oficially marked
+ * as incomplete at least till v 1.5 inclusive. Hence significant alterations
+ * are expected in the future.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public final class _Remote_Stub
+ extends Stub
+ implements Remote, Serializable
+{
+
+ /**
+ * Use serialVersionUID (v1.4) for interoperability.
+ */
+ private static final long serialVersionUID = -1967190271952680697L;
+
+
+ /**
+ * Returs the array of repository ids, implemented by this object.
+ * The method must be overridden to return the meaningful information.
+ *
+ * @return a single member array, containing empty string (if not overridden).
+ */
+ public String[] _ids()
+ {
+ return new String[] { "" };
+ }
+
+} \ No newline at end of file
diff --git a/libjava/classpath/org/omg/stub/java/rmi/package.html b/libjava/classpath/org/omg/stub/java/rmi/package.html
new file mode 100644
index 00000000000..f8ab89a3359
--- /dev/null
+++ b/libjava/classpath/org/omg/stub/java/rmi/package.html
@@ -0,0 +1,48 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
+<!-- package.html -
+ 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.stub.java.rmi</title></head>
+
+<body>
+<p>Contains RMI-IIOP Stubs for the Remote types from java.rmi package.
+The RMI-IIOP system provides means to use the standard CORBA protocol
+for RMI.</p>
+
+</body>
+</html>
OpenPOWER on IntegriCloud