index
int64
0
0
repo_id
stringlengths
9
205
file_path
stringlengths
31
246
content
stringlengths
1
12.2M
__index_level_0__
int64
0
10k
0
Create_ds/geronimo-yoko/yoko-core/src/test/java
Create_ds/geronimo-yoko/yoko-core/src/test/java/ORBTest_Basic/IntfOperations.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package ORBTest_Basic; // // IDL:ORBTest_Basic/Intf:1.0 // /***/ public interface IntfOperations { // // IDL:ORBTest_Basic/Intf/opVoid:1.0 // /***/ void opVoid(); // // IDL:ORBTest_Basic/Intf/opVoidEx:1.0 // /***/ void opVoidEx() throws ExVoid; // // IDL:ORBTest_Basic/Intf/attrShort:1.0 // /***/ short attrShort(); void attrShort(short val); // // IDL:ORBTest_Basic/Intf/opShort:1.0 // /***/ short opShort(short a0, org.omg.CORBA.ShortHolder a1, org.omg.CORBA.ShortHolder a2); // // IDL:ORBTest_Basic/Intf/opShortEx:1.0 // /***/ short opShortEx(short a0, org.omg.CORBA.ShortHolder a1, org.omg.CORBA.ShortHolder a2) throws ExShort; // // IDL:ORBTest_Basic/Intf/attrLong:1.0 // /***/ int attrLong(); void attrLong(int val); // // IDL:ORBTest_Basic/Intf/opLong:1.0 // /***/ int opLong(int a0, org.omg.CORBA.IntHolder a1, org.omg.CORBA.IntHolder a2); // // IDL:ORBTest_Basic/Intf/opLongEx:1.0 // /***/ int opLongEx(int a0, org.omg.CORBA.IntHolder a1, org.omg.CORBA.IntHolder a2) throws ExLong; // // IDL:ORBTest_Basic/Intf/attrUShort:1.0 // /***/ short attrUShort(); void attrUShort(short val); // // IDL:ORBTest_Basic/Intf/opUShort:1.0 // /***/ short opUShort(short a0, org.omg.CORBA.ShortHolder a1, org.omg.CORBA.ShortHolder a2); // // IDL:ORBTest_Basic/Intf/opUShortEx:1.0 // /***/ short opUShortEx(short a0, org.omg.CORBA.ShortHolder a1, org.omg.CORBA.ShortHolder a2) throws ExUShort; // // IDL:ORBTest_Basic/Intf/attrULong:1.0 // /***/ int attrULong(); void attrULong(int val); // // IDL:ORBTest_Basic/Intf/opULong:1.0 // /***/ int opULong(int a0, org.omg.CORBA.IntHolder a1, org.omg.CORBA.IntHolder a2); // // IDL:ORBTest_Basic/Intf/opULongEx:1.0 // /***/ int opULongEx(int a0, org.omg.CORBA.IntHolder a1, org.omg.CORBA.IntHolder a2) throws ExULong; // // IDL:ORBTest_Basic/Intf/attrFloat:1.0 // /***/ float attrFloat(); void attrFloat(float val); // // IDL:ORBTest_Basic/Intf/opFloat:1.0 // /***/ float opFloat(float a0, org.omg.CORBA.FloatHolder a1, org.omg.CORBA.FloatHolder a2); // // IDL:ORBTest_Basic/Intf/opFloatEx:1.0 // /***/ float opFloatEx(float a0, org.omg.CORBA.FloatHolder a1, org.omg.CORBA.FloatHolder a2) throws ExFloat; // // IDL:ORBTest_Basic/Intf/attrDouble:1.0 // /***/ double attrDouble(); void attrDouble(double val); // // IDL:ORBTest_Basic/Intf/opDouble:1.0 // /***/ double opDouble(double a0, org.omg.CORBA.DoubleHolder a1, org.omg.CORBA.DoubleHolder a2); // // IDL:ORBTest_Basic/Intf/opDoubleEx:1.0 // /***/ double opDoubleEx(double a0, org.omg.CORBA.DoubleHolder a1, org.omg.CORBA.DoubleHolder a2) throws ExDouble; // // IDL:ORBTest_Basic/Intf/attrBoolean:1.0 // /***/ boolean attrBoolean(); void attrBoolean(boolean val); // // IDL:ORBTest_Basic/Intf/opBoolean:1.0 // /***/ boolean opBoolean(boolean a0, org.omg.CORBA.BooleanHolder a1, org.omg.CORBA.BooleanHolder a2); // // IDL:ORBTest_Basic/Intf/opBooleanEx:1.0 // /***/ boolean opBooleanEx(boolean a0, org.omg.CORBA.BooleanHolder a1, org.omg.CORBA.BooleanHolder a2) throws ExBoolean; // // IDL:ORBTest_Basic/Intf/attrChar:1.0 // /***/ char attrChar(); void attrChar(char val); // // IDL:ORBTest_Basic/Intf/opChar:1.0 // /***/ char opChar(char a0, org.omg.CORBA.CharHolder a1, org.omg.CORBA.CharHolder a2); // // IDL:ORBTest_Basic/Intf/opCharEx:1.0 // /***/ char opCharEx(char a0, org.omg.CORBA.CharHolder a1, org.omg.CORBA.CharHolder a2) throws ExChar; // // IDL:ORBTest_Basic/Intf/attrOctet:1.0 // /***/ byte attrOctet(); void attrOctet(byte val); // // IDL:ORBTest_Basic/Intf/opOctet:1.0 // /***/ byte opOctet(byte a0, org.omg.CORBA.ByteHolder a1, org.omg.CORBA.ByteHolder a2); // // IDL:ORBTest_Basic/Intf/opOctetEx:1.0 // /***/ byte opOctetEx(byte a0, org.omg.CORBA.ByteHolder a1, org.omg.CORBA.ByteHolder a2) throws ExOctet; // // IDL:ORBTest_Basic/Intf/attrString:1.0 // /***/ String attrString(); void attrString(String val); // // IDL:ORBTest_Basic/Intf/opString:1.0 // /***/ String opString(String a0, org.omg.CORBA.StringHolder a1, org.omg.CORBA.StringHolder a2); // // IDL:ORBTest_Basic/Intf/opStringEx:1.0 // /***/ String opStringEx(String a0, org.omg.CORBA.StringHolder a1, org.omg.CORBA.StringHolder a2) throws ExString; // // IDL:ORBTest_Basic/Intf/attrAny:1.0 // /***/ org.omg.CORBA.Any attrAny(); void attrAny(org.omg.CORBA.Any val); // // IDL:ORBTest_Basic/Intf/opAny:1.0 // /***/ org.omg.CORBA.Any opAny(org.omg.CORBA.Any a0, org.omg.CORBA.AnyHolder a1, org.omg.CORBA.AnyHolder a2); // // IDL:ORBTest_Basic/Intf/opAnyEx:1.0 // /***/ org.omg.CORBA.Any opAnyEx(org.omg.CORBA.Any a0, org.omg.CORBA.AnyHolder a1, org.omg.CORBA.AnyHolder a2) throws ExAny; // // IDL:ORBTest_Basic/Intf/attrTestEnum:1.0 // /***/ TestEnum attrTestEnum(); void attrTestEnum(TestEnum val); // // IDL:ORBTest_Basic/Intf/opTestEnum:1.0 // /***/ TestEnum opTestEnum(TestEnum a0, TestEnumHolder a1, TestEnumHolder a2); // // IDL:ORBTest_Basic/Intf/opTestEnumEx:1.0 // /***/ TestEnum opTestEnumEx(TestEnum a0, TestEnumHolder a1, TestEnumHolder a2) throws ExTestEnum; // // IDL:ORBTest_Basic/Intf/attrIntf:1.0 // /***/ Intf attrIntf(); void attrIntf(Intf val); // // IDL:ORBTest_Basic/Intf/opIntf:1.0 // /***/ Intf opIntf(Intf a0, IntfHolder a1, IntfHolder a2); // // IDL:ORBTest_Basic/Intf/opIntfEx:1.0 // /***/ Intf opIntfEx(Intf a0, IntfHolder a1, IntfHolder a2) throws ExIntf; // // IDL:ORBTest_Basic/Intf/attrFixedStruct:1.0 // /***/ FixedStruct attrFixedStruct(); void attrFixedStruct(FixedStruct val); // // IDL:ORBTest_Basic/Intf/opFixedStruct:1.0 // /***/ FixedStruct opFixedStruct(FixedStruct a0, FixedStructHolder a1, FixedStructHolder a2); // // IDL:ORBTest_Basic/Intf/opFixedStructEx:1.0 // /***/ FixedStruct opFixedStructEx(FixedStruct a0, FixedStructHolder a1, FixedStructHolder a2) throws ExFixedStruct; // // IDL:ORBTest_Basic/Intf/attrVariableStruct:1.0 // /***/ VariableStruct attrVariableStruct(); void attrVariableStruct(VariableStruct val); // // IDL:ORBTest_Basic/Intf/opVariableStruct:1.0 // /***/ VariableStruct opVariableStruct(VariableStruct a0, VariableStructHolder a1, VariableStructHolder a2); // // IDL:ORBTest_Basic/Intf/opVariableStructEx:1.0 // /***/ VariableStruct opVariableStructEx(VariableStruct a0, VariableStructHolder a1, VariableStructHolder a2) throws ExVariableStruct; // // IDL:ORBTest_Basic/Intf/attrFixedUnion:1.0 // /***/ FixedUnion attrFixedUnion(); void attrFixedUnion(FixedUnion val); // // IDL:ORBTest_Basic/Intf/opFixedUnion:1.0 // /***/ FixedUnion opFixedUnion(FixedUnion a0, FixedUnionHolder a1, FixedUnionHolder a2); // // IDL:ORBTest_Basic/Intf/opFixedUnionEx:1.0 // /***/ FixedUnion opFixedUnionEx(FixedUnion a0, FixedUnionHolder a1, FixedUnionHolder a2) throws ExFixedUnion; // // IDL:ORBTest_Basic/Intf/attrVariableUnion:1.0 // /***/ VariableUnion attrVariableUnion(); void attrVariableUnion(VariableUnion val); // // IDL:ORBTest_Basic/Intf/opVariableUnion:1.0 // /***/ VariableUnion opVariableUnion(VariableUnion a0, VariableUnionHolder a1, VariableUnionHolder a2); // // IDL:ORBTest_Basic/Intf/opVariableUnionEx:1.0 // /***/ VariableUnion opVariableUnionEx(VariableUnion a0, VariableUnionHolder a1, VariableUnionHolder a2) throws ExVariableUnion; // // IDL:ORBTest_Basic/Intf/attrStringSequence:1.0 // /***/ String[] attrStringSequence(); void attrStringSequence(String[] val); // // IDL:ORBTest_Basic/Intf/opStringSequence:1.0 // /***/ String[] opStringSequence(String[] a0, StringSequenceHolder a1, StringSequenceHolder a2); // // IDL:ORBTest_Basic/Intf/opStringSequenceEx:1.0 // /***/ String[] opStringSequenceEx(String[] a0, StringSequenceHolder a1, StringSequenceHolder a2) throws ExStringSequence; // // IDL:ORBTest_Basic/Intf/attrFixedArray:1.0 // /***/ short[][][] attrFixedArray(); void attrFixedArray(short[][][] val); // // IDL:ORBTest_Basic/Intf/opFixedArray:1.0 // /***/ short[][][] opFixedArray(short[][][] a0, FixedArrayHolder a1, FixedArrayHolder a2); // // IDL:ORBTest_Basic/Intf/opFixedArrayEx:1.0 // /***/ short[][][] opFixedArrayEx(short[][][] a0, FixedArrayHolder a1, FixedArrayHolder a2) throws ExFixedArray; // // IDL:ORBTest_Basic/Intf/attrVariableArray:1.0 // /***/ String[][] attrVariableArray(); void attrVariableArray(String[][] val); // // IDL:ORBTest_Basic/Intf/opVariableArray:1.0 // /***/ String[][] opVariableArray(String[][] a0, VariableArrayHolder a1, VariableArrayHolder a2); // // IDL:ORBTest_Basic/Intf/opVariableArrayEx:1.0 // /***/ String[][] opVariableArrayEx(String[][] a0, VariableArrayHolder a1, VariableArrayHolder a2) throws ExVariableArray; // // IDL:ORBTest_Basic/Intf/attrFixedArraySequence:1.0 // /***/ short[][][][] attrFixedArraySequence(); void attrFixedArraySequence(short[][][][] val); // // IDL:ORBTest_Basic/Intf/opFixedArraySequence:1.0 // /***/ short[][][][] opFixedArraySequence(short[][][][] a0, FixedArraySequenceHolder a1, FixedArraySequenceHolder a2); // // IDL:ORBTest_Basic/Intf/opFixedArraySequenceEx:1.0 // /***/ short[][][][] opFixedArraySequenceEx(short[][][][] a0, FixedArraySequenceHolder a1, FixedArraySequenceHolder a2) throws ExFixedArraySequence; // // IDL:ORBTest_Basic/Intf/attrVariableArraySequence:1.0 // /***/ String[][][] attrVariableArraySequence(); void attrVariableArraySequence(String[][][] val); // // IDL:ORBTest_Basic/Intf/opVariableArraySequence:1.0 // /***/ String[][][] opVariableArraySequence(String[][][] a0, VariableArraySequenceHolder a1, VariableArraySequenceHolder a2); // // IDL:ORBTest_Basic/Intf/opVariableArraySequenceEx:1.0 // /***/ String[][][] opVariableArraySequenceEx(String[][][] a0, VariableArraySequenceHolder a1, VariableArraySequenceHolder a2) throws ExVariableArraySequence; // // IDL:ORBTest_Basic/Intf/attrFixedArrayBoundSequence:1.0 // /***/ short[][][][] attrFixedArrayBoundSequence(); void attrFixedArrayBoundSequence(short[][][][] val); // // IDL:ORBTest_Basic/Intf/opFixedArrayBoundSequence:1.0 // /***/ short[][][][] opFixedArrayBoundSequence(short[][][][] a0, FixedArrayBoundSequenceHolder a1, FixedArrayBoundSequenceHolder a2); // // IDL:ORBTest_Basic/Intf/opFixedArrayBoundSequenceEx:1.0 // /***/ short[][][][] opFixedArrayBoundSequenceEx(short[][][][] a0, FixedArrayBoundSequenceHolder a1, FixedArrayBoundSequenceHolder a2) throws ExFixedArrayBoundSequence; // // IDL:ORBTest_Basic/Intf/attrVariableArrayBoundSequence:1.0 // /***/ String[][][] attrVariableArrayBoundSequence(); void attrVariableArrayBoundSequence(String[][][] val); // // IDL:ORBTest_Basic/Intf/opVariableArrayBoundSequence:1.0 // /***/ String[][][] opVariableArrayBoundSequence(String[][][] a0, VariableArrayBoundSequenceHolder a1, VariableArrayBoundSequenceHolder a2); // // IDL:ORBTest_Basic/Intf/opVariableArrayBoundSequenceEx:1.0 // /***/ String[][][] opVariableArrayBoundSequenceEx(String[][][] a0, VariableArrayBoundSequenceHolder a1, VariableArrayBoundSequenceHolder a2) throws ExVariableArrayBoundSequence; // // IDL:ORBTest_Basic/Intf/opExRecursiveStruct:1.0 // /***/ void opExRecursiveStruct() throws ExRecursiveStruct; }
6,100
0
Create_ds/geronimo-yoko/yoko-core/src/test/java
Create_ds/geronimo-yoko/yoko-core/src/test/java/ORBTest_Basic/VariableUnion.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package ORBTest_Basic; // // IDL:ORBTest_Basic/VariableUnion:1.0 // /***/ final public class VariableUnion implements org.omg.CORBA.portable.IDLEntity { java.lang.Object _ob_v_; boolean _ob_i_; int _ob_d_; static boolean _OB_check(int d0, int d1) { return d0 == d1; } public VariableUnion() { _ob_i_ = false; } public boolean discriminator() { if(!_ob_i_) throw new org.omg.CORBA.BAD_OPERATION(); return _ob_d_ == 0 ? false : true; } public Intf ti() { if(!_ob_i_) throw new org.omg.CORBA.BAD_OPERATION(); if(!_OB_check(_ob_d_, 0)) throw new org.omg.CORBA.BAD_OPERATION(); return (Intf)_ob_v_; } public void ti(Intf val) { _ob_i_ = true; _ob_d_ = 0; _ob_v_ = val; } public VariableStruct st() { if(!_ob_i_) throw new org.omg.CORBA.BAD_OPERATION(); if(!_OB_check(_ob_d_, 1)) throw new org.omg.CORBA.BAD_OPERATION(); return (VariableStruct)_ob_v_; } public void st(VariableStruct val) { _ob_i_ = true; _ob_d_ = 1; _ob_v_ = val; } }
6,101
0
Create_ds/geronimo-yoko/yoko-core/src/test/java
Create_ds/geronimo-yoko/yoko-core/src/test/java/ORBTest_Basic/ExVariableArrayHolder.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package ORBTest_Basic; // // IDL:ORBTest_Basic/ExVariableArray:1.0 // final public class ExVariableArrayHolder implements org.omg.CORBA.portable.Streamable { public ExVariableArray value; public ExVariableArrayHolder() { } public ExVariableArrayHolder(ExVariableArray initial) { value = initial; } public void _read(org.omg.CORBA.portable.InputStream in) { value = ExVariableArrayHelper.read(in); } public void _write(org.omg.CORBA.portable.OutputStream out) { ExVariableArrayHelper.write(out, value); } public org.omg.CORBA.TypeCode _type() { return ExVariableArrayHelper.type(); } }
6,102
0
Create_ds/geronimo-yoko/yoko-core/src/test/java
Create_ds/geronimo-yoko/yoko-core/src/test/java/ORBTest_Basic/ExVariableUnionHelper.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package ORBTest_Basic; // // IDL:ORBTest_Basic/ExVariableUnion:1.0 // final public class ExVariableUnionHelper { public static void insert(org.omg.CORBA.Any any, ExVariableUnion val) { org.omg.CORBA.portable.OutputStream out = any.create_output_stream(); write(out, val); any.read_value(out.create_input_stream(), type()); } public static ExVariableUnion extract(org.omg.CORBA.Any any) { if(any.type().equivalent(type())) return read(any.create_input_stream()); else throw new org.omg.CORBA.BAD_OPERATION(); } private static org.omg.CORBA.TypeCode typeCode_; public static org.omg.CORBA.TypeCode type() { if(typeCode_ == null) { org.omg.CORBA.ORB orb = org.omg.CORBA.ORB.init(); org.omg.CORBA.StructMember[] members = new org.omg.CORBA.StructMember[1]; members[0] = new org.omg.CORBA.StructMember(); members[0].name = "value"; members[0].type = VariableUnionHelper.type(); typeCode_ = orb.create_exception_tc(id(), "ExVariableUnion", members); } return typeCode_; } public static String id() { return "IDL:ORBTest_Basic/ExVariableUnion:1.0"; } public static ExVariableUnion read(org.omg.CORBA.portable.InputStream in) { if(!id().equals(in.read_string())) throw new org.omg.CORBA.MARSHAL(); ExVariableUnion _ob_v = new ExVariableUnion(); _ob_v.value = VariableUnionHelper.read(in); return _ob_v; } public static void write(org.omg.CORBA.portable.OutputStream out, ExVariableUnion val) { out.write_string(id()); VariableUnionHelper.write(out, val.value); } }
6,103
0
Create_ds/geronimo-yoko/yoko-core/src/test/java
Create_ds/geronimo-yoko/yoko-core/src/test/java/ORBTest_Basic/ExVariableArrayBoundSequence.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package ORBTest_Basic; // // IDL:ORBTest_Basic/ExVariableArrayBoundSequence:1.0 // /***/ final public class ExVariableArrayBoundSequence extends org.omg.CORBA.UserException { private static final String _ob_id = "IDL:ORBTest_Basic/ExVariableArrayBoundSequence:1.0"; public ExVariableArrayBoundSequence() { super(_ob_id); } public ExVariableArrayBoundSequence(String[][][] value) { super(_ob_id); this.value = value; } public ExVariableArrayBoundSequence(String _reason, String[][][] value) { super(_ob_id + " " + _reason); this.value = value; } public String[][][] value; }
6,104
0
Create_ds/geronimo-yoko/yoko-core/src/test/java
Create_ds/geronimo-yoko/yoko-core/src/test/java/ORBTest_Basic/ExDoubleHelper.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package ORBTest_Basic; // // IDL:ORBTest_Basic/ExDouble:1.0 // final public class ExDoubleHelper { public static void insert(org.omg.CORBA.Any any, ExDouble val) { org.omg.CORBA.portable.OutputStream out = any.create_output_stream(); write(out, val); any.read_value(out.create_input_stream(), type()); } public static ExDouble extract(org.omg.CORBA.Any any) { if(any.type().equivalent(type())) return read(any.create_input_stream()); else throw new org.omg.CORBA.BAD_OPERATION(); } private static org.omg.CORBA.TypeCode typeCode_; public static org.omg.CORBA.TypeCode type() { if(typeCode_ == null) { org.omg.CORBA.ORB orb = org.omg.CORBA.ORB.init(); org.omg.CORBA.StructMember[] members = new org.omg.CORBA.StructMember[1]; members[0] = new org.omg.CORBA.StructMember(); members[0].name = "value"; members[0].type = orb.get_primitive_tc(org.omg.CORBA.TCKind.tk_double); typeCode_ = orb.create_exception_tc(id(), "ExDouble", members); } return typeCode_; } public static String id() { return "IDL:ORBTest_Basic/ExDouble:1.0"; } public static ExDouble read(org.omg.CORBA.portable.InputStream in) { if(!id().equals(in.read_string())) throw new org.omg.CORBA.MARSHAL(); ExDouble _ob_v = new ExDouble(); _ob_v.value = in.read_double(); return _ob_v; } public static void write(org.omg.CORBA.portable.OutputStream out, ExDouble val) { out.write_string(id()); out.write_double(val.value); } }
6,105
0
Create_ds/geronimo-yoko/yoko-core/src/test/java
Create_ds/geronimo-yoko/yoko-core/src/test/java/ORBTest_Basic/FixedUnion.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package ORBTest_Basic; // // IDL:ORBTest_Basic/FixedUnion:1.0 // /***/ final public class FixedUnion implements org.omg.CORBA.portable.IDLEntity { java.lang.Object _ob_v_; boolean _ob_i_; short _ob_d_; static boolean _OB_check(short d0, short d1) { short d[] = new short[2]; d[0] = d0; d[1] = d1; for(int i = 0; i < 2; i++) { switch(d[i]) { case (short)0: break; case (short)1: break; case (short)3: break; default: d[i] = (short)2; break; } } return d[0] == d[1]; } public FixedUnion() { _ob_i_ = false; } public short discriminator() { if(!_ob_i_) throw new org.omg.CORBA.BAD_OPERATION(); return _ob_d_; } public short s() { if(!_ob_i_) throw new org.omg.CORBA.BAD_OPERATION(); if(!_OB_check(_ob_d_, (short)0)) throw new org.omg.CORBA.BAD_OPERATION(); return ((org.omg.CORBA.ShortHolder)_ob_v_).value; } public void s(short val) { _ob_i_ = true; _ob_d_ = (short)0; _ob_v_ = new org.omg.CORBA.ShortHolder(val); } public int l() { if(!_ob_i_) throw new org.omg.CORBA.BAD_OPERATION(); if(!_OB_check(_ob_d_, (short)1)) throw new org.omg.CORBA.BAD_OPERATION(); return ((org.omg.CORBA.IntHolder)_ob_v_).value; } public void l(int val) { _ob_i_ = true; _ob_d_ = (short)1; _ob_v_ = new org.omg.CORBA.IntHolder(val); } public FixedStruct st() { if(!_ob_i_) throw new org.omg.CORBA.BAD_OPERATION(); if(!_OB_check(_ob_d_, (short)3)) throw new org.omg.CORBA.BAD_OPERATION(); return (FixedStruct)_ob_v_; } public void st(FixedStruct val) { _ob_i_ = true; _ob_d_ = (short)3; _ob_v_ = val; } public boolean b() { if(!_ob_i_) throw new org.omg.CORBA.BAD_OPERATION(); if(!_OB_check(_ob_d_, (short)2)) throw new org.omg.CORBA.BAD_OPERATION(); return ((org.omg.CORBA.BooleanHolder)_ob_v_).value; } public void b(boolean val) { _ob_i_ = true; _ob_d_ = (short)2; _ob_v_ = new org.omg.CORBA.BooleanHolder(val); } public void b(short d, boolean val) { if(!_OB_check(d, (short)2)) throw new org.omg.CORBA.BAD_PARAM(); _ob_i_ = true; _ob_d_ = d; _ob_v_ = new org.omg.CORBA.BooleanHolder(val); } }
6,106
0
Create_ds/geronimo-yoko/yoko-core/src/test/java
Create_ds/geronimo-yoko/yoko-core/src/test/java/ORBTest_Basic/ExIntfHelper.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package ORBTest_Basic; // // IDL:ORBTest_Basic/ExIntf:1.0 // final public class ExIntfHelper { public static void insert(org.omg.CORBA.Any any, ExIntf val) { org.omg.CORBA.portable.OutputStream out = any.create_output_stream(); write(out, val); any.read_value(out.create_input_stream(), type()); } public static ExIntf extract(org.omg.CORBA.Any any) { if(any.type().equivalent(type())) return read(any.create_input_stream()); else throw new org.omg.CORBA.BAD_OPERATION(); } private static org.omg.CORBA.TypeCode typeCode_; public static org.omg.CORBA.TypeCode type() { if(typeCode_ == null) { org.omg.CORBA.ORB orb = org.omg.CORBA.ORB.init(); org.omg.CORBA.StructMember[] members = new org.omg.CORBA.StructMember[1]; members[0] = new org.omg.CORBA.StructMember(); members[0].name = "value"; members[0].type = IntfHelper.type(); typeCode_ = orb.create_exception_tc(id(), "ExIntf", members); } return typeCode_; } public static String id() { return "IDL:ORBTest_Basic/ExIntf:1.0"; } public static ExIntf read(org.omg.CORBA.portable.InputStream in) { if(!id().equals(in.read_string())) throw new org.omg.CORBA.MARSHAL(); ExIntf _ob_v = new ExIntf(); _ob_v.value = IntfHelper.read(in); return _ob_v; } public static void write(org.omg.CORBA.portable.OutputStream out, ExIntf val) { out.write_string(id()); IntfHelper.write(out, val.value); } }
6,107
0
Create_ds/geronimo-yoko/yoko-core/src/test/java
Create_ds/geronimo-yoko/yoko-core/src/test/java/ORBTest_Basic/ExIntfHolder.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package ORBTest_Basic; // // IDL:ORBTest_Basic/ExIntf:1.0 // final public class ExIntfHolder implements org.omg.CORBA.portable.Streamable { public ExIntf value; public ExIntfHolder() { } public ExIntfHolder(ExIntf initial) { value = initial; } public void _read(org.omg.CORBA.portable.InputStream in) { value = ExIntfHelper.read(in); } public void _write(org.omg.CORBA.portable.OutputStream out) { ExIntfHelper.write(out, value); } public org.omg.CORBA.TypeCode _type() { return ExIntfHelper.type(); } }
6,108
0
Create_ds/geronimo-yoko/yoko-core/src/test/java
Create_ds/geronimo-yoko/yoko-core/src/test/java/ORBTest_Basic/ExVariableUnionHolder.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package ORBTest_Basic; // // IDL:ORBTest_Basic/ExVariableUnion:1.0 // final public class ExVariableUnionHolder implements org.omg.CORBA.portable.Streamable { public ExVariableUnion value; public ExVariableUnionHolder() { } public ExVariableUnionHolder(ExVariableUnion initial) { value = initial; } public void _read(org.omg.CORBA.portable.InputStream in) { value = ExVariableUnionHelper.read(in); } public void _write(org.omg.CORBA.portable.OutputStream out) { ExVariableUnionHelper.write(out, value); } public org.omg.CORBA.TypeCode _type() { return ExVariableUnionHelper.type(); } }
6,109
0
Create_ds/geronimo-yoko/yoko-core/src/test/java
Create_ds/geronimo-yoko/yoko-core/src/test/java/ORBTest_Basic/ExFixedArraySequence.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package ORBTest_Basic; // // IDL:ORBTest_Basic/ExFixedArraySequence:1.0 // /***/ final public class ExFixedArraySequence extends org.omg.CORBA.UserException { private static final String _ob_id = "IDL:ORBTest_Basic/ExFixedArraySequence:1.0"; public ExFixedArraySequence() { super(_ob_id); } public ExFixedArraySequence(short[][][][] value) { super(_ob_id); this.value = value; } public ExFixedArraySequence(String _reason, short[][][][] value) { super(_ob_id + " " + _reason); this.value = value; } public short[][][][] value; }
6,110
0
Create_ds/geronimo-yoko/yoko-core/src/test/java
Create_ds/geronimo-yoko/yoko-core/src/test/java/ORBTest_Basic/ExDoubleHolder.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package ORBTest_Basic; // // IDL:ORBTest_Basic/ExDouble:1.0 // final public class ExDoubleHolder implements org.omg.CORBA.portable.Streamable { public ExDouble value; public ExDoubleHolder() { } public ExDoubleHolder(ExDouble initial) { value = initial; } public void _read(org.omg.CORBA.portable.InputStream in) { value = ExDoubleHelper.read(in); } public void _write(org.omg.CORBA.portable.OutputStream out) { ExDoubleHelper.write(out, value); } public org.omg.CORBA.TypeCode _type() { return ExDoubleHelper.type(); } }
6,111
0
Create_ds/geronimo-yoko/yoko-core/src/test/java
Create_ds/geronimo-yoko/yoko-core/src/test/java/ORBTest_Basic/ExVoid.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package ORBTest_Basic; // // IDL:ORBTest_Basic/ExVoid:1.0 // /***/ final public class ExVoid extends org.omg.CORBA.UserException { private static final String _ob_id = "IDL:ORBTest_Basic/ExVoid:1.0"; public ExVoid() { super(_ob_id); } public ExVoid(String _reason) { super(_ob_id + " " + _reason); } }
6,112
0
Create_ds/geronimo-yoko/yoko-core/src/test/java
Create_ds/geronimo-yoko/yoko-core/src/test/java/ORBTest_Basic/ExVariableArrayHelper.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package ORBTest_Basic; // // IDL:ORBTest_Basic/ExVariableArray:1.0 // final public class ExVariableArrayHelper { public static void insert(org.omg.CORBA.Any any, ExVariableArray val) { org.omg.CORBA.portable.OutputStream out = any.create_output_stream(); write(out, val); any.read_value(out.create_input_stream(), type()); } public static ExVariableArray extract(org.omg.CORBA.Any any) { if(any.type().equivalent(type())) return read(any.create_input_stream()); else throw new org.omg.CORBA.BAD_OPERATION(); } private static org.omg.CORBA.TypeCode typeCode_; public static org.omg.CORBA.TypeCode type() { if(typeCode_ == null) { org.omg.CORBA.ORB orb = org.omg.CORBA.ORB.init(); org.omg.CORBA.StructMember[] members = new org.omg.CORBA.StructMember[1]; members[0] = new org.omg.CORBA.StructMember(); members[0].name = "value"; members[0].type = VariableArrayHelper.type(); typeCode_ = orb.create_exception_tc(id(), "ExVariableArray", members); } return typeCode_; } public static String id() { return "IDL:ORBTest_Basic/ExVariableArray:1.0"; } public static ExVariableArray read(org.omg.CORBA.portable.InputStream in) { if(!id().equals(in.read_string())) throw new org.omg.CORBA.MARSHAL(); ExVariableArray _ob_v = new ExVariableArray(); _ob_v.value = VariableArrayHelper.read(in); return _ob_v; } public static void write(org.omg.CORBA.portable.OutputStream out, ExVariableArray val) { out.write_string(id()); VariableArrayHelper.write(out, val.value); } }
6,113
0
Create_ds/geronimo-yoko/yoko-core/src/test/java
Create_ds/geronimo-yoko/yoko-core/src/test/java/ORBTest_Basic/ExRecursiveStruct.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package ORBTest_Basic; // // IDL:ORBTest_Basic/ExRecursiveStruct:1.0 // /***/ final public class ExRecursiveStruct extends org.omg.CORBA.UserException { private static final String _ob_id = "IDL:ORBTest_Basic/ExRecursiveStruct:1.0"; public ExRecursiveStruct() { super(_ob_id); } public ExRecursiveStruct(short us, RecursiveStruct rs) { super(_ob_id); this.us = us; this.rs = rs; } public ExRecursiveStruct(String _reason, short us, RecursiveStruct rs) { super(_ob_id + " " + _reason); this.us = us; this.rs = rs; } public short us; public RecursiveStruct rs; }
6,114
0
Create_ds/geronimo-yoko/yoko-core/src/test/java
Create_ds/geronimo-yoko/yoko-core/src/test/java/ORBTest_Basic/ExFixedStructHelper.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package ORBTest_Basic; // // IDL:ORBTest_Basic/ExFixedStruct:1.0 // final public class ExFixedStructHelper { public static void insert(org.omg.CORBA.Any any, ExFixedStruct val) { org.omg.CORBA.portable.OutputStream out = any.create_output_stream(); write(out, val); any.read_value(out.create_input_stream(), type()); } public static ExFixedStruct extract(org.omg.CORBA.Any any) { if(any.type().equivalent(type())) return read(any.create_input_stream()); else throw new org.omg.CORBA.BAD_OPERATION(); } private static org.omg.CORBA.TypeCode typeCode_; public static org.omg.CORBA.TypeCode type() { if(typeCode_ == null) { org.omg.CORBA.ORB orb = org.omg.CORBA.ORB.init(); org.omg.CORBA.StructMember[] members = new org.omg.CORBA.StructMember[1]; members[0] = new org.omg.CORBA.StructMember(); members[0].name = "value"; members[0].type = FixedStructHelper.type(); typeCode_ = orb.create_exception_tc(id(), "ExFixedStruct", members); } return typeCode_; } public static String id() { return "IDL:ORBTest_Basic/ExFixedStruct:1.0"; } public static ExFixedStruct read(org.omg.CORBA.portable.InputStream in) { if(!id().equals(in.read_string())) throw new org.omg.CORBA.MARSHAL(); ExFixedStruct _ob_v = new ExFixedStruct(); _ob_v.value = FixedStructHelper.read(in); return _ob_v; } public static void write(org.omg.CORBA.portable.OutputStream out, ExFixedStruct val) { out.write_string(id()); FixedStructHelper.write(out, val.value); } }
6,115
0
Create_ds/geronimo-yoko/yoko-core/src/test/java
Create_ds/geronimo-yoko/yoko-core/src/test/java/ORBTest_Basic/ExFloatHelper.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package ORBTest_Basic; // // IDL:ORBTest_Basic/ExFloat:1.0 // final public class ExFloatHelper { public static void insert(org.omg.CORBA.Any any, ExFloat val) { org.omg.CORBA.portable.OutputStream out = any.create_output_stream(); write(out, val); any.read_value(out.create_input_stream(), type()); } public static ExFloat extract(org.omg.CORBA.Any any) { if(any.type().equivalent(type())) return read(any.create_input_stream()); else throw new org.omg.CORBA.BAD_OPERATION(); } private static org.omg.CORBA.TypeCode typeCode_; public static org.omg.CORBA.TypeCode type() { if(typeCode_ == null) { org.omg.CORBA.ORB orb = org.omg.CORBA.ORB.init(); org.omg.CORBA.StructMember[] members = new org.omg.CORBA.StructMember[1]; members[0] = new org.omg.CORBA.StructMember(); members[0].name = "value"; members[0].type = orb.get_primitive_tc(org.omg.CORBA.TCKind.tk_float); typeCode_ = orb.create_exception_tc(id(), "ExFloat", members); } return typeCode_; } public static String id() { return "IDL:ORBTest_Basic/ExFloat:1.0"; } public static ExFloat read(org.omg.CORBA.portable.InputStream in) { if(!id().equals(in.read_string())) throw new org.omg.CORBA.MARSHAL(); ExFloat _ob_v = new ExFloat(); _ob_v.value = in.read_float(); return _ob_v; } public static void write(org.omg.CORBA.portable.OutputStream out, ExFloat val) { out.write_string(id()); out.write_float(val.value); } }
6,116
0
Create_ds/geronimo-yoko/yoko-core/src/test/java
Create_ds/geronimo-yoko/yoko-core/src/test/java/ORBTest_Basic/ExFixedArrayBoundSequenceHelper.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package ORBTest_Basic; // // IDL:ORBTest_Basic/ExFixedArrayBoundSequence:1.0 // final public class ExFixedArrayBoundSequenceHelper { public static void insert(org.omg.CORBA.Any any, ExFixedArrayBoundSequence val) { org.omg.CORBA.portable.OutputStream out = any.create_output_stream(); write(out, val); any.read_value(out.create_input_stream(), type()); } public static ExFixedArrayBoundSequence extract(org.omg.CORBA.Any any) { if(any.type().equivalent(type())) return read(any.create_input_stream()); else throw new org.omg.CORBA.BAD_OPERATION(); } private static org.omg.CORBA.TypeCode typeCode_; public static org.omg.CORBA.TypeCode type() { if(typeCode_ == null) { org.omg.CORBA.ORB orb = org.omg.CORBA.ORB.init(); org.omg.CORBA.StructMember[] members = new org.omg.CORBA.StructMember[1]; members[0] = new org.omg.CORBA.StructMember(); members[0].name = "value"; members[0].type = FixedArrayBoundSequenceHelper.type(); typeCode_ = orb.create_exception_tc(id(), "ExFixedArrayBoundSequence", members); } return typeCode_; } public static String id() { return "IDL:ORBTest_Basic/ExFixedArrayBoundSequence:1.0"; } public static ExFixedArrayBoundSequence read(org.omg.CORBA.portable.InputStream in) { if(!id().equals(in.read_string())) throw new org.omg.CORBA.MARSHAL(); ExFixedArrayBoundSequence _ob_v = new ExFixedArrayBoundSequence(); _ob_v.value = FixedArrayBoundSequenceHelper.read(in); return _ob_v; } public static void write(org.omg.CORBA.portable.OutputStream out, ExFixedArrayBoundSequence val) { out.write_string(id()); FixedArrayBoundSequenceHelper.write(out, val.value); } }
6,117
0
Create_ds/geronimo-yoko/yoko-core/src/test/java
Create_ds/geronimo-yoko/yoko-core/src/test/java/ORBTest_Basic/ExVariableStructHelper.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package ORBTest_Basic; // // IDL:ORBTest_Basic/ExVariableStruct:1.0 // final public class ExVariableStructHelper { public static void insert(org.omg.CORBA.Any any, ExVariableStruct val) { org.omg.CORBA.portable.OutputStream out = any.create_output_stream(); write(out, val); any.read_value(out.create_input_stream(), type()); } public static ExVariableStruct extract(org.omg.CORBA.Any any) { if(any.type().equivalent(type())) return read(any.create_input_stream()); else throw new org.omg.CORBA.BAD_OPERATION(); } private static org.omg.CORBA.TypeCode typeCode_; public static org.omg.CORBA.TypeCode type() { if(typeCode_ == null) { org.omg.CORBA.ORB orb = org.omg.CORBA.ORB.init(); org.omg.CORBA.StructMember[] members = new org.omg.CORBA.StructMember[1]; members[0] = new org.omg.CORBA.StructMember(); members[0].name = "value"; members[0].type = VariableStructHelper.type(); typeCode_ = orb.create_exception_tc(id(), "ExVariableStruct", members); } return typeCode_; } public static String id() { return "IDL:ORBTest_Basic/ExVariableStruct:1.0"; } public static ExVariableStruct read(org.omg.CORBA.portable.InputStream in) { if(!id().equals(in.read_string())) throw new org.omg.CORBA.MARSHAL(); ExVariableStruct _ob_v = new ExVariableStruct(); _ob_v.value = VariableStructHelper.read(in); return _ob_v; } public static void write(org.omg.CORBA.portable.OutputStream out, ExVariableStruct val) { out.write_string(id()); VariableStructHelper.write(out, val.value); } }
6,118
0
Create_ds/geronimo-yoko/yoko-core/src/test/java
Create_ds/geronimo-yoko/yoko-core/src/test/java/ORBTest_Basic/ExLong.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package ORBTest_Basic; // // IDL:ORBTest_Basic/ExLong:1.0 // /***/ final public class ExLong extends org.omg.CORBA.UserException { private static final String _ob_id = "IDL:ORBTest_Basic/ExLong:1.0"; public ExLong() { super(_ob_id); } public ExLong(int value) { super(_ob_id); this.value = value; } public ExLong(String _reason, int value) { super(_ob_id + " " + _reason); this.value = value; } public int value; }
6,119
0
Create_ds/geronimo-yoko/yoko-core/src/test/java
Create_ds/geronimo-yoko/yoko-core/src/test/java/ORBTest_Basic/VariableArrayBoundSequenceHelper.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package ORBTest_Basic; // // IDL:ORBTest_Basic/VariableArrayBoundSequence:1.0 // final public class VariableArrayBoundSequenceHelper { public static void insert(org.omg.CORBA.Any any, String[][][] val) { org.omg.CORBA.portable.OutputStream out = any.create_output_stream(); write(out, val); any.read_value(out.create_input_stream(), type()); } public static String[][][] extract(org.omg.CORBA.Any any) { if(any.type().equivalent(type())) return read(any.create_input_stream()); else throw new org.omg.CORBA.BAD_OPERATION(); } private static org.omg.CORBA.TypeCode typeCode_; public static org.omg.CORBA.TypeCode type() { if(typeCode_ == null) { org.omg.CORBA.ORB orb = org.omg.CORBA.ORB.init(); typeCode_ = orb.create_alias_tc(id(), "VariableArrayBoundSequence", orb.create_sequence_tc(10, VariableArrayHelper.type())); } return typeCode_; } public static String id() { return "IDL:ORBTest_Basic/VariableArrayBoundSequence:1.0"; } public static String[][][] read(org.omg.CORBA.portable.InputStream in) { String[][][] _ob_v; int len0 = in.read_ulong(); _ob_v = new String[len0][][]; for(int i0 = 0; i0 < len0; i0++) { _ob_v[i0] = VariableArrayHelper.read(in); } return _ob_v; } public static void write(org.omg.CORBA.portable.OutputStream out, String[][][] val) { int len0 = val.length; if(len0 > 10) throw new org.omg.CORBA.MARSHAL(); out.write_ulong(len0); for(int i0 = 0; i0 < len0; i0++) { VariableArrayHelper.write(out, val[i0]); } } }
6,120
0
Create_ds/geronimo-yoko/yoko-core/src/test/java
Create_ds/geronimo-yoko/yoko-core/src/test/java/ORBTest_Basic/ExBoolean.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package ORBTest_Basic; // // IDL:ORBTest_Basic/ExBoolean:1.0 // /***/ final public class ExBoolean extends org.omg.CORBA.UserException { private static final String _ob_id = "IDL:ORBTest_Basic/ExBoolean:1.0"; public ExBoolean() { super(_ob_id); } public ExBoolean(boolean value) { super(_ob_id); this.value = value; } public ExBoolean(String _reason, boolean value) { super(_ob_id + " " + _reason); this.value = value; } public boolean value; }
6,121
0
Create_ds/geronimo-yoko/yoko-core/src/test/java
Create_ds/geronimo-yoko/yoko-core/src/test/java/ORBTest_Basic/ExIntf.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package ORBTest_Basic; // // IDL:ORBTest_Basic/ExIntf:1.0 // /***/ final public class ExIntf extends org.omg.CORBA.UserException { private static final String _ob_id = "IDL:ORBTest_Basic/ExIntf:1.0"; public ExIntf() { super(_ob_id); } public ExIntf(Intf value) { super(_ob_id); this.value = value; } public ExIntf(String _reason, Intf value) { super(_ob_id + " " + _reason); this.value = value; } public Intf value; }
6,122
0
Create_ds/geronimo-yoko/yoko-core/src/test/java
Create_ds/geronimo-yoko/yoko-core/src/test/java/ORBTest_Basic/ExTestEnum.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package ORBTest_Basic; // // IDL:ORBTest_Basic/ExTestEnum:1.0 // /***/ final public class ExTestEnum extends org.omg.CORBA.UserException { private static final String _ob_id = "IDL:ORBTest_Basic/ExTestEnum:1.0"; public ExTestEnum() { super(_ob_id); } public ExTestEnum(TestEnum value) { super(_ob_id); this.value = value; } public ExTestEnum(String _reason, TestEnum value) { super(_ob_id + " " + _reason); this.value = value; } public TestEnum value; }
6,123
0
Create_ds/geronimo-yoko/yoko-core/src/test/java
Create_ds/geronimo-yoko/yoko-core/src/test/java/ORBTest_Basic/ExRecursiveStructHelper.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package ORBTest_Basic; // // IDL:ORBTest_Basic/ExRecursiveStruct:1.0 // final public class ExRecursiveStructHelper { public static void insert(org.omg.CORBA.Any any, ExRecursiveStruct val) { org.omg.CORBA.portable.OutputStream out = any.create_output_stream(); write(out, val); any.read_value(out.create_input_stream(), type()); } public static ExRecursiveStruct extract(org.omg.CORBA.Any any) { if(any.type().equivalent(type())) return read(any.create_input_stream()); else throw new org.omg.CORBA.BAD_OPERATION(); } private static org.omg.CORBA.TypeCode typeCode_; public static org.omg.CORBA.TypeCode type() { if(typeCode_ == null) { org.omg.CORBA.ORB orb = org.omg.CORBA.ORB.init(); org.omg.CORBA.StructMember[] members = new org.omg.CORBA.StructMember[2]; members[0] = new org.omg.CORBA.StructMember(); members[0].name = "us"; members[0].type = orb.get_primitive_tc(org.omg.CORBA.TCKind.tk_ushort); members[1] = new org.omg.CORBA.StructMember(); members[1].name = "rs"; members[1].type = RecursiveStructHelper.type(); typeCode_ = orb.create_exception_tc(id(), "ExRecursiveStruct", members); } return typeCode_; } public static String id() { return "IDL:ORBTest_Basic/ExRecursiveStruct:1.0"; } public static ExRecursiveStruct read(org.omg.CORBA.portable.InputStream in) { if(!id().equals(in.read_string())) throw new org.omg.CORBA.MARSHAL(); ExRecursiveStruct _ob_v = new ExRecursiveStruct(); _ob_v.us = in.read_ushort(); _ob_v.rs = RecursiveStructHelper.read(in); return _ob_v; } public static void write(org.omg.CORBA.portable.OutputStream out, ExRecursiveStruct val) { out.write_string(id()); out.write_ushort(val.us); RecursiveStructHelper.write(out, val.rs); } }
6,124
0
Create_ds/geronimo-yoko/yoko-core/src/test/java
Create_ds/geronimo-yoko/yoko-core/src/test/java/ORBTest_Basic/FixedStructHolder.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package ORBTest_Basic; // // IDL:ORBTest_Basic/FixedStruct:1.0 // final public class FixedStructHolder implements org.omg.CORBA.portable.Streamable { public FixedStruct value; public FixedStructHolder() { } public FixedStructHolder(FixedStruct initial) { value = initial; } public void _read(org.omg.CORBA.portable.InputStream in) { value = FixedStructHelper.read(in); } public void _write(org.omg.CORBA.portable.OutputStream out) { FixedStructHelper.write(out, value); } public org.omg.CORBA.TypeCode _type() { return FixedStructHelper.type(); } }
6,125
0
Create_ds/geronimo-yoko/yoko-core/src/test/java
Create_ds/geronimo-yoko/yoko-core/src/test/java/ORBTest_Basic/VariableArrayBoundSequenceHolder.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package ORBTest_Basic; // // IDL:ORBTest_Basic/VariableArrayBoundSequence:1.0 // final public class VariableArrayBoundSequenceHolder implements org.omg.CORBA.portable.Streamable { public String[][][] value; public VariableArrayBoundSequenceHolder() { } public VariableArrayBoundSequenceHolder(String[][][] initial) { value = initial; } public void _read(org.omg.CORBA.portable.InputStream in) { value = VariableArrayBoundSequenceHelper.read(in); } public void _write(org.omg.CORBA.portable.OutputStream out) { VariableArrayBoundSequenceHelper.write(out, value); } public org.omg.CORBA.TypeCode _type() { return VariableArrayBoundSequenceHelper.type(); } }
6,126
0
Create_ds/geronimo-yoko/yoko-core/src/test/java
Create_ds/geronimo-yoko/yoko-core/src/test/java/ORBTest_Basic/FixedStructHelper.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package ORBTest_Basic; // // IDL:ORBTest_Basic/FixedStruct:1.0 // final public class FixedStructHelper { public static void insert(org.omg.CORBA.Any any, FixedStruct val) { org.omg.CORBA.portable.OutputStream out = any.create_output_stream(); write(out, val); any.read_value(out.create_input_stream(), type()); } public static FixedStruct extract(org.omg.CORBA.Any any) { if(any.type().equivalent(type())) return read(any.create_input_stream()); else throw new org.omg.CORBA.BAD_OPERATION(); } private static org.omg.CORBA.TypeCode typeCode_; public static org.omg.CORBA.TypeCode type() { if(typeCode_ == null) { org.omg.CORBA.ORB orb = org.omg.CORBA.ORB.init(); org.omg.CORBA.StructMember[] members = new org.omg.CORBA.StructMember[2]; members[0] = new org.omg.CORBA.StructMember(); members[0].name = "s"; members[0].type = orb.get_primitive_tc(org.omg.CORBA.TCKind.tk_short); members[1] = new org.omg.CORBA.StructMember(); members[1].name = "l"; members[1].type = orb.get_primitive_tc(org.omg.CORBA.TCKind.tk_long); typeCode_ = orb.create_struct_tc(id(), "FixedStruct", members); } return typeCode_; } public static String id() { return "IDL:ORBTest_Basic/FixedStruct:1.0"; } public static FixedStruct read(org.omg.CORBA.portable.InputStream in) { FixedStruct _ob_v = new FixedStruct(); _ob_v.s = in.read_short(); _ob_v.l = in.read_long(); return _ob_v; } public static void write(org.omg.CORBA.portable.OutputStream out, FixedStruct val) { out.write_short(val.s); out.write_long(val.l); } }
6,127
0
Create_ds/geronimo-yoko/yoko-core/src/test/java
Create_ds/geronimo-yoko/yoko-core/src/test/java/ORBTest_Basic/ExRecursiveStructHolder.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package ORBTest_Basic; // // IDL:ORBTest_Basic/ExRecursiveStruct:1.0 // final public class ExRecursiveStructHolder implements org.omg.CORBA.portable.Streamable { public ExRecursiveStruct value; public ExRecursiveStructHolder() { } public ExRecursiveStructHolder(ExRecursiveStruct initial) { value = initial; } public void _read(org.omg.CORBA.portable.InputStream in) { value = ExRecursiveStructHelper.read(in); } public void _write(org.omg.CORBA.portable.OutputStream out) { ExRecursiveStructHelper.write(out, value); } public org.omg.CORBA.TypeCode _type() { return ExRecursiveStructHelper.type(); } }
6,128
0
Create_ds/geronimo-yoko/yoko-core/src/test/java
Create_ds/geronimo-yoko/yoko-core/src/test/java/ORBTest_Basic/ExFloatHolder.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package ORBTest_Basic; // // IDL:ORBTest_Basic/ExFloat:1.0 // final public class ExFloatHolder implements org.omg.CORBA.portable.Streamable { public ExFloat value; public ExFloatHolder() { } public ExFloatHolder(ExFloat initial) { value = initial; } public void _read(org.omg.CORBA.portable.InputStream in) { value = ExFloatHelper.read(in); } public void _write(org.omg.CORBA.portable.OutputStream out) { ExFloatHelper.write(out, value); } public org.omg.CORBA.TypeCode _type() { return ExFloatHelper.type(); } }
6,129
0
Create_ds/geronimo-yoko/yoko-core/src/test/java
Create_ds/geronimo-yoko/yoko-core/src/test/java/ORBTest_Basic/ExFixedArrayBoundSequenceHolder.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package ORBTest_Basic; // // IDL:ORBTest_Basic/ExFixedArrayBoundSequence:1.0 // final public class ExFixedArrayBoundSequenceHolder implements org.omg.CORBA.portable.Streamable { public ExFixedArrayBoundSequence value; public ExFixedArrayBoundSequenceHolder() { } public ExFixedArrayBoundSequenceHolder(ExFixedArrayBoundSequence initial) { value = initial; } public void _read(org.omg.CORBA.portable.InputStream in) { value = ExFixedArrayBoundSequenceHelper.read(in); } public void _write(org.omg.CORBA.portable.OutputStream out) { ExFixedArrayBoundSequenceHelper.write(out, value); } public org.omg.CORBA.TypeCode _type() { return ExFixedArrayBoundSequenceHelper.type(); } }
6,130
0
Create_ds/geronimo-yoko/yoko-core/src/test/java
Create_ds/geronimo-yoko/yoko-core/src/test/java/ORBTest_Basic/ExVariableStructHolder.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package ORBTest_Basic; // // IDL:ORBTest_Basic/ExVariableStruct:1.0 // final public class ExVariableStructHolder implements org.omg.CORBA.portable.Streamable { public ExVariableStruct value; public ExVariableStructHolder() { } public ExVariableStructHolder(ExVariableStruct initial) { value = initial; } public void _read(org.omg.CORBA.portable.InputStream in) { value = ExVariableStructHelper.read(in); } public void _write(org.omg.CORBA.portable.OutputStream out) { ExVariableStructHelper.write(out, value); } public org.omg.CORBA.TypeCode _type() { return ExVariableStructHelper.type(); } }
6,131
0
Create_ds/geronimo-yoko/yoko-core/src/test/java
Create_ds/geronimo-yoko/yoko-core/src/test/java/ORBTest_Basic/ExFixedStructHolder.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package ORBTest_Basic; // // IDL:ORBTest_Basic/ExFixedStruct:1.0 // final public class ExFixedStructHolder implements org.omg.CORBA.portable.Streamable { public ExFixedStruct value; public ExFixedStructHolder() { } public ExFixedStructHolder(ExFixedStruct initial) { value = initial; } public void _read(org.omg.CORBA.portable.InputStream in) { value = ExFixedStructHelper.read(in); } public void _write(org.omg.CORBA.portable.OutputStream out) { ExFixedStructHelper.write(out, value); } public org.omg.CORBA.TypeCode _type() { return ExFixedStructHelper.type(); } }
6,132
0
Create_ds/geronimo-yoko/yoko-core/src/test/java
Create_ds/geronimo-yoko/yoko-core/src/test/java/ORBTest_ExceptionsExt_2_3/IntfPOATie.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package ORBTest_ExceptionsExt_2_3; // // IDL:ORBTest_ExceptionsExt_2_3/Intf:1.0 // public class IntfPOATie extends IntfPOA { private IntfOperations _ob_delegate_; private org.omg.PortableServer.POA _ob_poa_; public IntfPOATie(IntfOperations delegate) { _ob_delegate_ = delegate; } public IntfPOATie(IntfOperations delegate, org.omg.PortableServer.POA poa) { _ob_delegate_ = delegate; _ob_poa_ = poa; } public IntfOperations _delegate() { return _ob_delegate_; } public void _delegate(IntfOperations delegate) { _ob_delegate_ = delegate; } public org.omg.PortableServer.POA _default_POA() { if(_ob_poa_ != null) return _ob_poa_; else return super._default_POA(); } // // IDL:ORBTest_ExceptionsExt_2_3/Intf/op_CODESET_INCOMPATIBLE_Ex:1.0 // public void op_CODESET_INCOMPATIBLE_Ex() { _ob_delegate_.op_CODESET_INCOMPATIBLE_Ex(); } // // IDL:ORBTest_ExceptionsExt_2_3/Intf/op_REBIND_Ex:1.0 // public void op_REBIND_Ex() { _ob_delegate_.op_REBIND_Ex(); } // // IDL:ORBTest_ExceptionsExt_2_3/Intf/op_TIMEOUT_Ex:1.0 // public void op_TIMEOUT_Ex() { _ob_delegate_.op_TIMEOUT_Ex(); } // // IDL:ORBTest_ExceptionsExt_2_3/Intf/op_TRANSACTION_UNAVAILABLE_Ex:1.0 // public void op_TRANSACTION_UNAVAILABLE_Ex() { _ob_delegate_.op_TRANSACTION_UNAVAILABLE_Ex(); } // // IDL:ORBTest_ExceptionsExt_2_3/Intf/op_TRANSACTION_MODE_Ex:1.0 // public void op_TRANSACTION_MODE_Ex() { _ob_delegate_.op_TRANSACTION_MODE_Ex(); } // // IDL:ORBTest_ExceptionsExt_2_3/Intf/op_BAD_QOS_Ex:1.0 // public void op_BAD_QOS_Ex() { _ob_delegate_.op_BAD_QOS_Ex(); } }
6,133
0
Create_ds/geronimo-yoko/yoko-core/src/test/java
Create_ds/geronimo-yoko/yoko-core/src/test/java/ORBTest_ExceptionsExt_2_3/Intf.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package ORBTest_ExceptionsExt_2_3; // // IDL:ORBTest_ExceptionsExt_2_3/Intf:1.0 // /***/ public interface Intf extends IntfOperations, org.omg.CORBA.Object, org.omg.CORBA.portable.IDLEntity { }
6,134
0
Create_ds/geronimo-yoko/yoko-core/src/test/java
Create_ds/geronimo-yoko/yoko-core/src/test/java/ORBTest_ExceptionsExt_2_3/IntfPOA.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package ORBTest_ExceptionsExt_2_3; // // IDL:ORBTest_ExceptionsExt_2_3/Intf:1.0 // public abstract class IntfPOA extends org.omg.PortableServer.Servant implements org.omg.CORBA.portable.InvokeHandler, IntfOperations { static final String[] _ob_ids_ = { "IDL:ORBTest_ExceptionsExt_2_3/Intf:1.0", }; public Intf _this() { return IntfHelper.narrow(super._this_object()); } public Intf _this(org.omg.CORBA.ORB orb) { return IntfHelper.narrow(super._this_object(orb)); } public String[] _all_interfaces(org.omg.PortableServer.POA poa, byte[] objectId) { return _ob_ids_; } public org.omg.CORBA.portable.OutputStream _invoke(String opName, org.omg.CORBA.portable.InputStream in, org.omg.CORBA.portable.ResponseHandler handler) { final String[] _ob_names = { "op_BAD_QOS_Ex", "op_CODESET_INCOMPATIBLE_Ex", "op_REBIND_Ex", "op_TIMEOUT_Ex", "op_TRANSACTION_MODE_Ex", "op_TRANSACTION_UNAVAILABLE_Ex" }; int _ob_left = 0; int _ob_right = _ob_names.length; int _ob_index = -1; while(_ob_left < _ob_right) { int _ob_m = (_ob_left + _ob_right) / 2; int _ob_res = _ob_names[_ob_m].compareTo(opName); if(_ob_res == 0) { _ob_index = _ob_m; break; } else if(_ob_res > 0) _ob_right = _ob_m; else _ob_left = _ob_m + 1; } if(_ob_index == -1 && opName.charAt(0) == '_') { _ob_left = 0; _ob_right = _ob_names.length; String _ob_ami_op = opName.substring(1); while(_ob_left < _ob_right) { int _ob_m = (_ob_left + _ob_right) / 2; int _ob_res = _ob_names[_ob_m].compareTo(_ob_ami_op); if(_ob_res == 0) { _ob_index = _ob_m; break; } else if(_ob_res > 0) _ob_right = _ob_m; else _ob_left = _ob_m + 1; } } switch(_ob_index) { case 0: // op_BAD_QOS_Ex return _OB_op_op_BAD_QOS_Ex(in, handler); case 1: // op_CODESET_INCOMPATIBLE_Ex return _OB_op_op_CODESET_INCOMPATIBLE_Ex(in, handler); case 2: // op_REBIND_Ex return _OB_op_op_REBIND_Ex(in, handler); case 3: // op_TIMEOUT_Ex return _OB_op_op_TIMEOUT_Ex(in, handler); case 4: // op_TRANSACTION_MODE_Ex return _OB_op_op_TRANSACTION_MODE_Ex(in, handler); case 5: // op_TRANSACTION_UNAVAILABLE_Ex return _OB_op_op_TRANSACTION_UNAVAILABLE_Ex(in, handler); } throw new org.omg.CORBA.BAD_OPERATION(); } private org.omg.CORBA.portable.OutputStream _OB_op_op_BAD_QOS_Ex(org.omg.CORBA.portable.InputStream in, org.omg.CORBA.portable.ResponseHandler handler) { org.omg.CORBA.portable.OutputStream out = null; op_BAD_QOS_Ex(); out = handler.createReply(); return out; } private org.omg.CORBA.portable.OutputStream _OB_op_op_CODESET_INCOMPATIBLE_Ex(org.omg.CORBA.portable.InputStream in, org.omg.CORBA.portable.ResponseHandler handler) { org.omg.CORBA.portable.OutputStream out = null; op_CODESET_INCOMPATIBLE_Ex(); out = handler.createReply(); return out; } private org.omg.CORBA.portable.OutputStream _OB_op_op_REBIND_Ex(org.omg.CORBA.portable.InputStream in, org.omg.CORBA.portable.ResponseHandler handler) { org.omg.CORBA.portable.OutputStream out = null; op_REBIND_Ex(); out = handler.createReply(); return out; } private org.omg.CORBA.portable.OutputStream _OB_op_op_TIMEOUT_Ex(org.omg.CORBA.portable.InputStream in, org.omg.CORBA.portable.ResponseHandler handler) { org.omg.CORBA.portable.OutputStream out = null; op_TIMEOUT_Ex(); out = handler.createReply(); return out; } private org.omg.CORBA.portable.OutputStream _OB_op_op_TRANSACTION_MODE_Ex(org.omg.CORBA.portable.InputStream in, org.omg.CORBA.portable.ResponseHandler handler) { org.omg.CORBA.portable.OutputStream out = null; op_TRANSACTION_MODE_Ex(); out = handler.createReply(); return out; } private org.omg.CORBA.portable.OutputStream _OB_op_op_TRANSACTION_UNAVAILABLE_Ex(org.omg.CORBA.portable.InputStream in, org.omg.CORBA.portable.ResponseHandler handler) { org.omg.CORBA.portable.OutputStream out = null; op_TRANSACTION_UNAVAILABLE_Ex(); out = handler.createReply(); return out; } }
6,135
0
Create_ds/geronimo-yoko/yoko-core/src/test/java
Create_ds/geronimo-yoko/yoko-core/src/test/java/ORBTest_ExceptionsExt_2_3/_IntfStub.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package ORBTest_ExceptionsExt_2_3; // // IDL:ORBTest_ExceptionsExt_2_3/Intf:1.0 // public class _IntfStub extends org.omg.CORBA.portable.ObjectImpl implements Intf { private static final String[] _ob_ids_ = { "IDL:ORBTest_ExceptionsExt_2_3/Intf:1.0", }; public String[] _ids() { return _ob_ids_; } final public static java.lang.Class _ob_opsClass = IntfOperations.class; // // IDL:ORBTest_ExceptionsExt_2_3/Intf/op_CODESET_INCOMPATIBLE_Ex:1.0 // public void op_CODESET_INCOMPATIBLE_Ex() { while(true) { if(!this._is_local()) { org.omg.CORBA.portable.OutputStream out = null; org.omg.CORBA.portable.InputStream in = null; try { out = _request("op_CODESET_INCOMPATIBLE_Ex", true); in = _invoke(out); return; } catch(org.omg.CORBA.portable.RemarshalException _ob_ex) { continue; } catch(org.omg.CORBA.portable.ApplicationException _ob_aex) { final String _ob_id = _ob_aex.getId(); in = _ob_aex.getInputStream(); throw new org.omg.CORBA.UNKNOWN("Unexpected User Exception: " + _ob_id); } finally { _releaseReply(in); } } else { org.omg.CORBA.portable.ServantObject _ob_so = _servant_preinvoke("op_CODESET_INCOMPATIBLE_Ex", _ob_opsClass); if(_ob_so == null) continue; IntfOperations _ob_self = (IntfOperations)_ob_so.servant; try { _ob_self.op_CODESET_INCOMPATIBLE_Ex(); return; } finally { _servant_postinvoke(_ob_so); } } } } // // IDL:ORBTest_ExceptionsExt_2_3/Intf/op_REBIND_Ex:1.0 // public void op_REBIND_Ex() { while(true) { if(!this._is_local()) { org.omg.CORBA.portable.OutputStream out = null; org.omg.CORBA.portable.InputStream in = null; try { out = _request("op_REBIND_Ex", true); in = _invoke(out); return; } catch(org.omg.CORBA.portable.RemarshalException _ob_ex) { continue; } catch(org.omg.CORBA.portable.ApplicationException _ob_aex) { final String _ob_id = _ob_aex.getId(); in = _ob_aex.getInputStream(); throw new org.omg.CORBA.UNKNOWN("Unexpected User Exception: " + _ob_id); } finally { _releaseReply(in); } } else { org.omg.CORBA.portable.ServantObject _ob_so = _servant_preinvoke("op_REBIND_Ex", _ob_opsClass); if(_ob_so == null) continue; IntfOperations _ob_self = (IntfOperations)_ob_so.servant; try { _ob_self.op_REBIND_Ex(); return; } finally { _servant_postinvoke(_ob_so); } } } } // // IDL:ORBTest_ExceptionsExt_2_3/Intf/op_TIMEOUT_Ex:1.0 // public void op_TIMEOUT_Ex() { while(true) { if(!this._is_local()) { org.omg.CORBA.portable.OutputStream out = null; org.omg.CORBA.portable.InputStream in = null; try { out = _request("op_TIMEOUT_Ex", true); in = _invoke(out); return; } catch(org.omg.CORBA.portable.RemarshalException _ob_ex) { continue; } catch(org.omg.CORBA.portable.ApplicationException _ob_aex) { final String _ob_id = _ob_aex.getId(); in = _ob_aex.getInputStream(); throw new org.omg.CORBA.UNKNOWN("Unexpected User Exception: " + _ob_id); } finally { _releaseReply(in); } } else { org.omg.CORBA.portable.ServantObject _ob_so = _servant_preinvoke("op_TIMEOUT_Ex", _ob_opsClass); if(_ob_so == null) continue; IntfOperations _ob_self = (IntfOperations)_ob_so.servant; try { _ob_self.op_TIMEOUT_Ex(); return; } finally { _servant_postinvoke(_ob_so); } } } } // // IDL:ORBTest_ExceptionsExt_2_3/Intf/op_TRANSACTION_UNAVAILABLE_Ex:1.0 // public void op_TRANSACTION_UNAVAILABLE_Ex() { while(true) { if(!this._is_local()) { org.omg.CORBA.portable.OutputStream out = null; org.omg.CORBA.portable.InputStream in = null; try { out = _request("op_TRANSACTION_UNAVAILABLE_Ex", true); in = _invoke(out); return; } catch(org.omg.CORBA.portable.RemarshalException _ob_ex) { continue; } catch(org.omg.CORBA.portable.ApplicationException _ob_aex) { final String _ob_id = _ob_aex.getId(); in = _ob_aex.getInputStream(); throw new org.omg.CORBA.UNKNOWN("Unexpected User Exception: " + _ob_id); } finally { _releaseReply(in); } } else { org.omg.CORBA.portable.ServantObject _ob_so = _servant_preinvoke("op_TRANSACTION_UNAVAILABLE_Ex", _ob_opsClass); if(_ob_so == null) continue; IntfOperations _ob_self = (IntfOperations)_ob_so.servant; try { _ob_self.op_TRANSACTION_UNAVAILABLE_Ex(); return; } finally { _servant_postinvoke(_ob_so); } } } } // // IDL:ORBTest_ExceptionsExt_2_3/Intf/op_TRANSACTION_MODE_Ex:1.0 // public void op_TRANSACTION_MODE_Ex() { while(true) { if(!this._is_local()) { org.omg.CORBA.portable.OutputStream out = null; org.omg.CORBA.portable.InputStream in = null; try { out = _request("op_TRANSACTION_MODE_Ex", true); in = _invoke(out); return; } catch(org.omg.CORBA.portable.RemarshalException _ob_ex) { continue; } catch(org.omg.CORBA.portable.ApplicationException _ob_aex) { final String _ob_id = _ob_aex.getId(); in = _ob_aex.getInputStream(); throw new org.omg.CORBA.UNKNOWN("Unexpected User Exception: " + _ob_id); } finally { _releaseReply(in); } } else { org.omg.CORBA.portable.ServantObject _ob_so = _servant_preinvoke("op_TRANSACTION_MODE_Ex", _ob_opsClass); if(_ob_so == null) continue; IntfOperations _ob_self = (IntfOperations)_ob_so.servant; try { _ob_self.op_TRANSACTION_MODE_Ex(); return; } finally { _servant_postinvoke(_ob_so); } } } } // // IDL:ORBTest_ExceptionsExt_2_3/Intf/op_BAD_QOS_Ex:1.0 // public void op_BAD_QOS_Ex() { while(true) { if(!this._is_local()) { org.omg.CORBA.portable.OutputStream out = null; org.omg.CORBA.portable.InputStream in = null; try { out = _request("op_BAD_QOS_Ex", true); in = _invoke(out); return; } catch(org.omg.CORBA.portable.RemarshalException _ob_ex) { continue; } catch(org.omg.CORBA.portable.ApplicationException _ob_aex) { final String _ob_id = _ob_aex.getId(); in = _ob_aex.getInputStream(); throw new org.omg.CORBA.UNKNOWN("Unexpected User Exception: " + _ob_id); } finally { _releaseReply(in); } } else { org.omg.CORBA.portable.ServantObject _ob_so = _servant_preinvoke("op_BAD_QOS_Ex", _ob_opsClass); if(_ob_so == null) continue; IntfOperations _ob_self = (IntfOperations)_ob_so.servant; try { _ob_self.op_BAD_QOS_Ex(); return; } finally { _servant_postinvoke(_ob_so); } } } } }
6,136
0
Create_ds/geronimo-yoko/yoko-core/src/test/java
Create_ds/geronimo-yoko/yoko-core/src/test/java/ORBTest_ExceptionsExt_2_3/IntfHelper.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package ORBTest_ExceptionsExt_2_3; // // IDL:ORBTest_ExceptionsExt_2_3/Intf:1.0 // final public class IntfHelper { public static void insert(org.omg.CORBA.Any any, Intf val) { any.insert_Object(val, type()); } public static Intf extract(org.omg.CORBA.Any any) { if(any.type().equivalent(type())) return narrow(any.extract_Object()); throw new org.omg.CORBA.BAD_OPERATION(); } private static org.omg.CORBA.TypeCode typeCode_; public static org.omg.CORBA.TypeCode type() { if(typeCode_ == null) { org.omg.CORBA.ORB orb = org.omg.CORBA.ORB.init(); typeCode_ = orb.create_interface_tc(id(), "Intf"); } return typeCode_; } public static String id() { return "IDL:ORBTest_ExceptionsExt_2_3/Intf:1.0"; } public static Intf read(org.omg.CORBA.portable.InputStream in) { org.omg.CORBA.Object _ob_v = in.read_Object(); try { return (Intf)_ob_v; } catch(ClassCastException ex) { } org.omg.CORBA.portable.ObjectImpl _ob_impl; _ob_impl = (org.omg.CORBA.portable.ObjectImpl)_ob_v; _IntfStub _ob_stub = new _IntfStub(); _ob_stub._set_delegate(_ob_impl._get_delegate()); return _ob_stub; } public static void write(org.omg.CORBA.portable.OutputStream out, Intf val) { out.write_Object(val); } public static Intf narrow(org.omg.CORBA.Object val) { if(val != null) { try { return (Intf)val; } catch(ClassCastException ex) { } if(val._is_a(id())) { org.omg.CORBA.portable.ObjectImpl _ob_impl; _IntfStub _ob_stub = new _IntfStub(); _ob_impl = (org.omg.CORBA.portable.ObjectImpl)val; _ob_stub._set_delegate(_ob_impl._get_delegate()); return _ob_stub; } throw new org.omg.CORBA.BAD_PARAM(); } return null; } public static Intf unchecked_narrow(org.omg.CORBA.Object val) { if(val != null) { try { return (Intf)val; } catch(ClassCastException ex) { } org.omg.CORBA.portable.ObjectImpl _ob_impl; _IntfStub _ob_stub = new _IntfStub(); _ob_impl = (org.omg.CORBA.portable.ObjectImpl)val; _ob_stub._set_delegate(_ob_impl._get_delegate()); return _ob_stub; } return null; } }
6,137
0
Create_ds/geronimo-yoko/yoko-core/src/test/java
Create_ds/geronimo-yoko/yoko-core/src/test/java/ORBTest_ExceptionsExt_2_3/IntfHolder.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package ORBTest_ExceptionsExt_2_3; // // IDL:ORBTest_ExceptionsExt_2_3/Intf:1.0 // final public class IntfHolder implements org.omg.CORBA.portable.Streamable { public Intf value; public IntfHolder() { } public IntfHolder(Intf initial) { value = initial; } public void _read(org.omg.CORBA.portable.InputStream in) { value = IntfHelper.read(in); } public void _write(org.omg.CORBA.portable.OutputStream out) { IntfHelper.write(out, value); } public org.omg.CORBA.TypeCode _type() { return IntfHelper.type(); } }
6,138
0
Create_ds/geronimo-yoko/yoko-core/src/test/java
Create_ds/geronimo-yoko/yoko-core/src/test/java/ORBTest_ExceptionsExt_2_3/IntfOperations.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package ORBTest_ExceptionsExt_2_3; // // IDL:ORBTest_ExceptionsExt_2_3/Intf:1.0 // /***/ public interface IntfOperations { // // IDL:ORBTest_ExceptionsExt_2_3/Intf/op_CODESET_INCOMPATIBLE_Ex:1.0 // /***/ void op_CODESET_INCOMPATIBLE_Ex(); // // IDL:ORBTest_ExceptionsExt_2_3/Intf/op_REBIND_Ex:1.0 // /***/ void op_REBIND_Ex(); // // IDL:ORBTest_ExceptionsExt_2_3/Intf/op_TIMEOUT_Ex:1.0 // /***/ void op_TIMEOUT_Ex(); // // IDL:ORBTest_ExceptionsExt_2_3/Intf/op_TRANSACTION_UNAVAILABLE_Ex:1.0 // /***/ void op_TRANSACTION_UNAVAILABLE_Ex(); // // IDL:ORBTest_ExceptionsExt_2_3/Intf/op_TRANSACTION_MODE_Ex:1.0 // /***/ void op_TRANSACTION_MODE_Ex(); // // IDL:ORBTest_ExceptionsExt_2_3/Intf/op_BAD_QOS_Ex:1.0 // /***/ void op_BAD_QOS_Ex(); }
6,139
0
Create_ds/geronimo-yoko/yoko-core/src/test/java
Create_ds/geronimo-yoko/yoko-core/src/test/java/ORBTest_Exceptions/IntfPOATie.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package ORBTest_Exceptions; // // IDL:ORBTest_Exceptions/Intf:1.0 // public class IntfPOATie extends IntfPOA { private IntfOperations _ob_delegate_; private org.omg.PortableServer.POA _ob_poa_; public IntfPOATie(IntfOperations delegate) { _ob_delegate_ = delegate; } public IntfPOATie(IntfOperations delegate, org.omg.PortableServer.POA poa) { _ob_delegate_ = delegate; _ob_poa_ = poa; } public IntfOperations _delegate() { return _ob_delegate_; } public void _delegate(IntfOperations delegate) { _ob_delegate_ = delegate; } public org.omg.PortableServer.POA _default_POA() { if(_ob_poa_ != null) return _ob_poa_; else return super._default_POA(); } // // IDL:ORBTest_Exceptions/Intf/op_UNKNOWN_Ex:1.0 // public void op_UNKNOWN_Ex() { _ob_delegate_.op_UNKNOWN_Ex(); } // // IDL:ORBTest_Exceptions/Intf/op_BAD_PARAM_Ex:1.0 // public void op_BAD_PARAM_Ex() { _ob_delegate_.op_BAD_PARAM_Ex(); } // // IDL:ORBTest_Exceptions/Intf/op_NO_MEMORY_Ex:1.0 // public void op_NO_MEMORY_Ex() { _ob_delegate_.op_NO_MEMORY_Ex(); } // // IDL:ORBTest_Exceptions/Intf/op_IMP_LIMIT_Ex:1.0 // public void op_IMP_LIMIT_Ex() { _ob_delegate_.op_IMP_LIMIT_Ex(); } // // IDL:ORBTest_Exceptions/Intf/op_COMM_FAILURE_Ex:1.0 // public void op_COMM_FAILURE_Ex() { _ob_delegate_.op_COMM_FAILURE_Ex(); } // // IDL:ORBTest_Exceptions/Intf/op_INV_OBJREF_Ex:1.0 // public void op_INV_OBJREF_Ex() { _ob_delegate_.op_INV_OBJREF_Ex(); } // // IDL:ORBTest_Exceptions/Intf/op_NO_PERMISSION_Ex:1.0 // public void op_NO_PERMISSION_Ex() { _ob_delegate_.op_NO_PERMISSION_Ex(); } // // IDL:ORBTest_Exceptions/Intf/op_INTERNAL_Ex:1.0 // public void op_INTERNAL_Ex() { _ob_delegate_.op_INTERNAL_Ex(); } // // IDL:ORBTest_Exceptions/Intf/op_MARSHAL_Ex:1.0 // public void op_MARSHAL_Ex() { _ob_delegate_.op_MARSHAL_Ex(); } // // IDL:ORBTest_Exceptions/Intf/op_INITIALIZE_Ex:1.0 // public void op_INITIALIZE_Ex() { _ob_delegate_.op_INITIALIZE_Ex(); } // // IDL:ORBTest_Exceptions/Intf/op_NO_IMPLEMENT_Ex:1.0 // public void op_NO_IMPLEMENT_Ex() { _ob_delegate_.op_NO_IMPLEMENT_Ex(); } // // IDL:ORBTest_Exceptions/Intf/op_BAD_TYPECODE_Ex:1.0 // public void op_BAD_TYPECODE_Ex() { _ob_delegate_.op_BAD_TYPECODE_Ex(); } // // IDL:ORBTest_Exceptions/Intf/op_BAD_OPERATION_Ex:1.0 // public void op_BAD_OPERATION_Ex() { _ob_delegate_.op_BAD_OPERATION_Ex(); } // // IDL:ORBTest_Exceptions/Intf/op_NO_RESOURCES_Ex:1.0 // public void op_NO_RESOURCES_Ex() { _ob_delegate_.op_NO_RESOURCES_Ex(); } // // IDL:ORBTest_Exceptions/Intf/op_NO_RESPONSE_Ex:1.0 // public void op_NO_RESPONSE_Ex() { _ob_delegate_.op_NO_RESPONSE_Ex(); } // // IDL:ORBTest_Exceptions/Intf/op_BAD_INV_ORDER_Ex:1.0 // public void op_BAD_INV_ORDER_Ex() { _ob_delegate_.op_BAD_INV_ORDER_Ex(); } // // IDL:ORBTest_Exceptions/Intf/op_TRANSIENT_Ex:1.0 // public void op_TRANSIENT_Ex() { _ob_delegate_.op_TRANSIENT_Ex(); } // // IDL:ORBTest_Exceptions/Intf/op_OBJ_ADAPTER_Ex:1.0 // public void op_OBJ_ADAPTER_Ex() { _ob_delegate_.op_OBJ_ADAPTER_Ex(); } // // IDL:ORBTest_Exceptions/Intf/op_DATA_CONVERSION_Ex:1.0 // public void op_DATA_CONVERSION_Ex() { _ob_delegate_.op_DATA_CONVERSION_Ex(); } // // IDL:ORBTest_Exceptions/Intf/op_OBJECT_NOT_EXIST_Ex:1.0 // public void op_OBJECT_NOT_EXIST_Ex() { _ob_delegate_.op_OBJECT_NOT_EXIST_Ex(); } // // IDL:ORBTest_Exceptions/Intf/op_INV_POLICY_Ex:1.0 // public void op_INV_POLICY_Ex() { _ob_delegate_.op_INV_POLICY_Ex(); } }
6,140
0
Create_ds/geronimo-yoko/yoko-core/src/test/java
Create_ds/geronimo-yoko/yoko-core/src/test/java/ORBTest_Exceptions/Intf.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package ORBTest_Exceptions; // // IDL:ORBTest_Exceptions/Intf:1.0 // /***/ public interface Intf extends IntfOperations, org.omg.CORBA.Object, org.omg.CORBA.portable.IDLEntity { }
6,141
0
Create_ds/geronimo-yoko/yoko-core/src/test/java
Create_ds/geronimo-yoko/yoko-core/src/test/java/ORBTest_Exceptions/IntfPOA.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package ORBTest_Exceptions; // // IDL:ORBTest_Exceptions/Intf:1.0 // public abstract class IntfPOA extends org.omg.PortableServer.Servant implements org.omg.CORBA.portable.InvokeHandler, IntfOperations { static final String[] _ob_ids_ = { "IDL:ORBTest_Exceptions/Intf:1.0", }; public Intf _this() { return IntfHelper.narrow(super._this_object()); } public Intf _this(org.omg.CORBA.ORB orb) { return IntfHelper.narrow(super._this_object(orb)); } public String[] _all_interfaces(org.omg.PortableServer.POA poa, byte[] objectId) { return _ob_ids_; } public org.omg.CORBA.portable.OutputStream _invoke(String opName, org.omg.CORBA.portable.InputStream in, org.omg.CORBA.portable.ResponseHandler handler) { final String[] _ob_names = { "op_BAD_INV_ORDER_Ex", "op_BAD_OPERATION_Ex", "op_BAD_PARAM_Ex", "op_BAD_TYPECODE_Ex", "op_COMM_FAILURE_Ex", "op_DATA_CONVERSION_Ex", "op_IMP_LIMIT_Ex", "op_INITIALIZE_Ex", "op_INTERNAL_Ex", "op_INV_OBJREF_Ex", "op_INV_POLICY_Ex", "op_MARSHAL_Ex", "op_NO_IMPLEMENT_Ex", "op_NO_MEMORY_Ex", "op_NO_PERMISSION_Ex", "op_NO_RESOURCES_Ex", "op_NO_RESPONSE_Ex", "op_OBJECT_NOT_EXIST_Ex", "op_OBJ_ADAPTER_Ex", "op_TRANSIENT_Ex", "op_UNKNOWN_Ex" }; int _ob_left = 0; int _ob_right = _ob_names.length; int _ob_index = -1; while(_ob_left < _ob_right) { int _ob_m = (_ob_left + _ob_right) / 2; int _ob_res = _ob_names[_ob_m].compareTo(opName); if(_ob_res == 0) { _ob_index = _ob_m; break; } else if(_ob_res > 0) _ob_right = _ob_m; else _ob_left = _ob_m + 1; } if(_ob_index == -1 && opName.charAt(0) == '_') { _ob_left = 0; _ob_right = _ob_names.length; String _ob_ami_op = opName.substring(1); while(_ob_left < _ob_right) { int _ob_m = (_ob_left + _ob_right) / 2; int _ob_res = _ob_names[_ob_m].compareTo(_ob_ami_op); if(_ob_res == 0) { _ob_index = _ob_m; break; } else if(_ob_res > 0) _ob_right = _ob_m; else _ob_left = _ob_m + 1; } } switch(_ob_index) { case 0: // op_BAD_INV_ORDER_Ex return _OB_op_op_BAD_INV_ORDER_Ex(in, handler); case 1: // op_BAD_OPERATION_Ex return _OB_op_op_BAD_OPERATION_Ex(in, handler); case 2: // op_BAD_PARAM_Ex return _OB_op_op_BAD_PARAM_Ex(in, handler); case 3: // op_BAD_TYPECODE_Ex return _OB_op_op_BAD_TYPECODE_Ex(in, handler); case 4: // op_COMM_FAILURE_Ex return _OB_op_op_COMM_FAILURE_Ex(in, handler); case 5: // op_DATA_CONVERSION_Ex return _OB_op_op_DATA_CONVERSION_Ex(in, handler); case 6: // op_IMP_LIMIT_Ex return _OB_op_op_IMP_LIMIT_Ex(in, handler); case 7: // op_INITIALIZE_Ex return _OB_op_op_INITIALIZE_Ex(in, handler); case 8: // op_INTERNAL_Ex return _OB_op_op_INTERNAL_Ex(in, handler); case 9: // op_INV_OBJREF_Ex return _OB_op_op_INV_OBJREF_Ex(in, handler); case 10: // op_INV_POLICY_Ex return _OB_op_op_INV_POLICY_Ex(in, handler); case 11: // op_MARSHAL_Ex return _OB_op_op_MARSHAL_Ex(in, handler); case 12: // op_NO_IMPLEMENT_Ex return _OB_op_op_NO_IMPLEMENT_Ex(in, handler); case 13: // op_NO_MEMORY_Ex return _OB_op_op_NO_MEMORY_Ex(in, handler); case 14: // op_NO_PERMISSION_Ex return _OB_op_op_NO_PERMISSION_Ex(in, handler); case 15: // op_NO_RESOURCES_Ex return _OB_op_op_NO_RESOURCES_Ex(in, handler); case 16: // op_NO_RESPONSE_Ex return _OB_op_op_NO_RESPONSE_Ex(in, handler); case 17: // op_OBJECT_NOT_EXIST_Ex return _OB_op_op_OBJECT_NOT_EXIST_Ex(in, handler); case 18: // op_OBJ_ADAPTER_Ex return _OB_op_op_OBJ_ADAPTER_Ex(in, handler); case 19: // op_TRANSIENT_Ex return _OB_op_op_TRANSIENT_Ex(in, handler); case 20: // op_UNKNOWN_Ex return _OB_op_op_UNKNOWN_Ex(in, handler); } throw new org.omg.CORBA.BAD_OPERATION(); } private org.omg.CORBA.portable.OutputStream _OB_op_op_BAD_INV_ORDER_Ex(org.omg.CORBA.portable.InputStream in, org.omg.CORBA.portable.ResponseHandler handler) { org.omg.CORBA.portable.OutputStream out = null; op_BAD_INV_ORDER_Ex(); out = handler.createReply(); return out; } private org.omg.CORBA.portable.OutputStream _OB_op_op_BAD_OPERATION_Ex(org.omg.CORBA.portable.InputStream in, org.omg.CORBA.portable.ResponseHandler handler) { org.omg.CORBA.portable.OutputStream out = null; op_BAD_OPERATION_Ex(); out = handler.createReply(); return out; } private org.omg.CORBA.portable.OutputStream _OB_op_op_BAD_PARAM_Ex(org.omg.CORBA.portable.InputStream in, org.omg.CORBA.portable.ResponseHandler handler) { org.omg.CORBA.portable.OutputStream out = null; op_BAD_PARAM_Ex(); out = handler.createReply(); return out; } private org.omg.CORBA.portable.OutputStream _OB_op_op_BAD_TYPECODE_Ex(org.omg.CORBA.portable.InputStream in, org.omg.CORBA.portable.ResponseHandler handler) { org.omg.CORBA.portable.OutputStream out = null; op_BAD_TYPECODE_Ex(); out = handler.createReply(); return out; } private org.omg.CORBA.portable.OutputStream _OB_op_op_COMM_FAILURE_Ex(org.omg.CORBA.portable.InputStream in, org.omg.CORBA.portable.ResponseHandler handler) { org.omg.CORBA.portable.OutputStream out = null; op_COMM_FAILURE_Ex(); out = handler.createReply(); return out; } private org.omg.CORBA.portable.OutputStream _OB_op_op_DATA_CONVERSION_Ex(org.omg.CORBA.portable.InputStream in, org.omg.CORBA.portable.ResponseHandler handler) { org.omg.CORBA.portable.OutputStream out = null; op_DATA_CONVERSION_Ex(); out = handler.createReply(); return out; } private org.omg.CORBA.portable.OutputStream _OB_op_op_IMP_LIMIT_Ex(org.omg.CORBA.portable.InputStream in, org.omg.CORBA.portable.ResponseHandler handler) { org.omg.CORBA.portable.OutputStream out = null; op_IMP_LIMIT_Ex(); out = handler.createReply(); return out; } private org.omg.CORBA.portable.OutputStream _OB_op_op_INITIALIZE_Ex(org.omg.CORBA.portable.InputStream in, org.omg.CORBA.portable.ResponseHandler handler) { org.omg.CORBA.portable.OutputStream out = null; op_INITIALIZE_Ex(); out = handler.createReply(); return out; } private org.omg.CORBA.portable.OutputStream _OB_op_op_INTERNAL_Ex(org.omg.CORBA.portable.InputStream in, org.omg.CORBA.portable.ResponseHandler handler) { org.omg.CORBA.portable.OutputStream out = null; op_INTERNAL_Ex(); out = handler.createReply(); return out; } private org.omg.CORBA.portable.OutputStream _OB_op_op_INV_OBJREF_Ex(org.omg.CORBA.portable.InputStream in, org.omg.CORBA.portable.ResponseHandler handler) { org.omg.CORBA.portable.OutputStream out = null; op_INV_OBJREF_Ex(); out = handler.createReply(); return out; } private org.omg.CORBA.portable.OutputStream _OB_op_op_INV_POLICY_Ex(org.omg.CORBA.portable.InputStream in, org.omg.CORBA.portable.ResponseHandler handler) { org.omg.CORBA.portable.OutputStream out = null; op_INV_POLICY_Ex(); out = handler.createReply(); return out; } private org.omg.CORBA.portable.OutputStream _OB_op_op_MARSHAL_Ex(org.omg.CORBA.portable.InputStream in, org.omg.CORBA.portable.ResponseHandler handler) { org.omg.CORBA.portable.OutputStream out = null; op_MARSHAL_Ex(); out = handler.createReply(); return out; } private org.omg.CORBA.portable.OutputStream _OB_op_op_NO_IMPLEMENT_Ex(org.omg.CORBA.portable.InputStream in, org.omg.CORBA.portable.ResponseHandler handler) { org.omg.CORBA.portable.OutputStream out = null; op_NO_IMPLEMENT_Ex(); out = handler.createReply(); return out; } private org.omg.CORBA.portable.OutputStream _OB_op_op_NO_MEMORY_Ex(org.omg.CORBA.portable.InputStream in, org.omg.CORBA.portable.ResponseHandler handler) { org.omg.CORBA.portable.OutputStream out = null; op_NO_MEMORY_Ex(); out = handler.createReply(); return out; } private org.omg.CORBA.portable.OutputStream _OB_op_op_NO_PERMISSION_Ex(org.omg.CORBA.portable.InputStream in, org.omg.CORBA.portable.ResponseHandler handler) { org.omg.CORBA.portable.OutputStream out = null; op_NO_PERMISSION_Ex(); out = handler.createReply(); return out; } private org.omg.CORBA.portable.OutputStream _OB_op_op_NO_RESOURCES_Ex(org.omg.CORBA.portable.InputStream in, org.omg.CORBA.portable.ResponseHandler handler) { org.omg.CORBA.portable.OutputStream out = null; op_NO_RESOURCES_Ex(); out = handler.createReply(); return out; } private org.omg.CORBA.portable.OutputStream _OB_op_op_NO_RESPONSE_Ex(org.omg.CORBA.portable.InputStream in, org.omg.CORBA.portable.ResponseHandler handler) { org.omg.CORBA.portable.OutputStream out = null; op_NO_RESPONSE_Ex(); out = handler.createReply(); return out; } private org.omg.CORBA.portable.OutputStream _OB_op_op_OBJECT_NOT_EXIST_Ex(org.omg.CORBA.portable.InputStream in, org.omg.CORBA.portable.ResponseHandler handler) { org.omg.CORBA.portable.OutputStream out = null; op_OBJECT_NOT_EXIST_Ex(); out = handler.createReply(); return out; } private org.omg.CORBA.portable.OutputStream _OB_op_op_OBJ_ADAPTER_Ex(org.omg.CORBA.portable.InputStream in, org.omg.CORBA.portable.ResponseHandler handler) { org.omg.CORBA.portable.OutputStream out = null; op_OBJ_ADAPTER_Ex(); out = handler.createReply(); return out; } private org.omg.CORBA.portable.OutputStream _OB_op_op_TRANSIENT_Ex(org.omg.CORBA.portable.InputStream in, org.omg.CORBA.portable.ResponseHandler handler) { org.omg.CORBA.portable.OutputStream out = null; op_TRANSIENT_Ex(); out = handler.createReply(); return out; } private org.omg.CORBA.portable.OutputStream _OB_op_op_UNKNOWN_Ex(org.omg.CORBA.portable.InputStream in, org.omg.CORBA.portable.ResponseHandler handler) { org.omg.CORBA.portable.OutputStream out = null; op_UNKNOWN_Ex(); out = handler.createReply(); return out; } }
6,142
0
Create_ds/geronimo-yoko/yoko-core/src/test/java
Create_ds/geronimo-yoko/yoko-core/src/test/java/ORBTest_Exceptions/_IntfStub.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package ORBTest_Exceptions; // // IDL:ORBTest_Exceptions/Intf:1.0 // public class _IntfStub extends org.omg.CORBA.portable.ObjectImpl implements Intf { private static final String[] _ob_ids_ = { "IDL:ORBTest_Exceptions/Intf:1.0", }; public String[] _ids() { return _ob_ids_; } final public static java.lang.Class _ob_opsClass = IntfOperations.class; // // IDL:ORBTest_Exceptions/Intf/op_UNKNOWN_Ex:1.0 // public void op_UNKNOWN_Ex() { while(true) { if(!this._is_local()) { org.omg.CORBA.portable.OutputStream out = null; org.omg.CORBA.portable.InputStream in = null; try { out = _request("op_UNKNOWN_Ex", true); in = _invoke(out); return; } catch(org.omg.CORBA.portable.RemarshalException _ob_ex) { continue; } catch(org.omg.CORBA.portable.ApplicationException _ob_aex) { final String _ob_id = _ob_aex.getId(); in = _ob_aex.getInputStream(); throw new org.omg.CORBA.UNKNOWN("Unexpected User Exception: " + _ob_id); } finally { _releaseReply(in); } } else { org.omg.CORBA.portable.ServantObject _ob_so = _servant_preinvoke("op_UNKNOWN_Ex", _ob_opsClass); if(_ob_so == null) continue; IntfOperations _ob_self = (IntfOperations)_ob_so.servant; try { _ob_self.op_UNKNOWN_Ex(); return; } finally { _servant_postinvoke(_ob_so); } } } } // // IDL:ORBTest_Exceptions/Intf/op_BAD_PARAM_Ex:1.0 // public void op_BAD_PARAM_Ex() { while(true) { if(!this._is_local()) { org.omg.CORBA.portable.OutputStream out = null; org.omg.CORBA.portable.InputStream in = null; try { out = _request("op_BAD_PARAM_Ex", true); in = _invoke(out); return; } catch(org.omg.CORBA.portable.RemarshalException _ob_ex) { continue; } catch(org.omg.CORBA.portable.ApplicationException _ob_aex) { final String _ob_id = _ob_aex.getId(); in = _ob_aex.getInputStream(); throw new org.omg.CORBA.UNKNOWN("Unexpected User Exception: " + _ob_id); } finally { _releaseReply(in); } } else { org.omg.CORBA.portable.ServantObject _ob_so = _servant_preinvoke("op_BAD_PARAM_Ex", _ob_opsClass); if(_ob_so == null) continue; IntfOperations _ob_self = (IntfOperations)_ob_so.servant; try { _ob_self.op_BAD_PARAM_Ex(); return; } finally { _servant_postinvoke(_ob_so); } } } } // // IDL:ORBTest_Exceptions/Intf/op_NO_MEMORY_Ex:1.0 // public void op_NO_MEMORY_Ex() { while(true) { if(!this._is_local()) { org.omg.CORBA.portable.OutputStream out = null; org.omg.CORBA.portable.InputStream in = null; try { out = _request("op_NO_MEMORY_Ex", true); in = _invoke(out); return; } catch(org.omg.CORBA.portable.RemarshalException _ob_ex) { continue; } catch(org.omg.CORBA.portable.ApplicationException _ob_aex) { final String _ob_id = _ob_aex.getId(); in = _ob_aex.getInputStream(); throw new org.omg.CORBA.UNKNOWN("Unexpected User Exception: " + _ob_id); } finally { _releaseReply(in); } } else { org.omg.CORBA.portable.ServantObject _ob_so = _servant_preinvoke("op_NO_MEMORY_Ex", _ob_opsClass); if(_ob_so == null) continue; IntfOperations _ob_self = (IntfOperations)_ob_so.servant; try { _ob_self.op_NO_MEMORY_Ex(); return; } finally { _servant_postinvoke(_ob_so); } } } } // // IDL:ORBTest_Exceptions/Intf/op_IMP_LIMIT_Ex:1.0 // public void op_IMP_LIMIT_Ex() { while(true) { if(!this._is_local()) { org.omg.CORBA.portable.OutputStream out = null; org.omg.CORBA.portable.InputStream in = null; try { out = _request("op_IMP_LIMIT_Ex", true); in = _invoke(out); return; } catch(org.omg.CORBA.portable.RemarshalException _ob_ex) { continue; } catch(org.omg.CORBA.portable.ApplicationException _ob_aex) { final String _ob_id = _ob_aex.getId(); in = _ob_aex.getInputStream(); throw new org.omg.CORBA.UNKNOWN("Unexpected User Exception: " + _ob_id); } finally { _releaseReply(in); } } else { org.omg.CORBA.portable.ServantObject _ob_so = _servant_preinvoke("op_IMP_LIMIT_Ex", _ob_opsClass); if(_ob_so == null) continue; IntfOperations _ob_self = (IntfOperations)_ob_so.servant; try { _ob_self.op_IMP_LIMIT_Ex(); return; } finally { _servant_postinvoke(_ob_so); } } } } // // IDL:ORBTest_Exceptions/Intf/op_COMM_FAILURE_Ex:1.0 // public void op_COMM_FAILURE_Ex() { while(true) { if(!this._is_local()) { org.omg.CORBA.portable.OutputStream out = null; org.omg.CORBA.portable.InputStream in = null; try { out = _request("op_COMM_FAILURE_Ex", true); in = _invoke(out); return; } catch(org.omg.CORBA.portable.RemarshalException _ob_ex) { continue; } catch(org.omg.CORBA.portable.ApplicationException _ob_aex) { final String _ob_id = _ob_aex.getId(); in = _ob_aex.getInputStream(); throw new org.omg.CORBA.UNKNOWN("Unexpected User Exception: " + _ob_id); } finally { _releaseReply(in); } } else { org.omg.CORBA.portable.ServantObject _ob_so = _servant_preinvoke("op_COMM_FAILURE_Ex", _ob_opsClass); if(_ob_so == null) continue; IntfOperations _ob_self = (IntfOperations)_ob_so.servant; try { _ob_self.op_COMM_FAILURE_Ex(); return; } finally { _servant_postinvoke(_ob_so); } } } } // // IDL:ORBTest_Exceptions/Intf/op_INV_OBJREF_Ex:1.0 // public void op_INV_OBJREF_Ex() { while(true) { if(!this._is_local()) { org.omg.CORBA.portable.OutputStream out = null; org.omg.CORBA.portable.InputStream in = null; try { out = _request("op_INV_OBJREF_Ex", true); in = _invoke(out); return; } catch(org.omg.CORBA.portable.RemarshalException _ob_ex) { continue; } catch(org.omg.CORBA.portable.ApplicationException _ob_aex) { final String _ob_id = _ob_aex.getId(); in = _ob_aex.getInputStream(); throw new org.omg.CORBA.UNKNOWN("Unexpected User Exception: " + _ob_id); } finally { _releaseReply(in); } } else { org.omg.CORBA.portable.ServantObject _ob_so = _servant_preinvoke("op_INV_OBJREF_Ex", _ob_opsClass); if(_ob_so == null) continue; IntfOperations _ob_self = (IntfOperations)_ob_so.servant; try { _ob_self.op_INV_OBJREF_Ex(); return; } finally { _servant_postinvoke(_ob_so); } } } } // // IDL:ORBTest_Exceptions/Intf/op_NO_PERMISSION_Ex:1.0 // public void op_NO_PERMISSION_Ex() { while(true) { if(!this._is_local()) { org.omg.CORBA.portable.OutputStream out = null; org.omg.CORBA.portable.InputStream in = null; try { out = _request("op_NO_PERMISSION_Ex", true); in = _invoke(out); return; } catch(org.omg.CORBA.portable.RemarshalException _ob_ex) { continue; } catch(org.omg.CORBA.portable.ApplicationException _ob_aex) { final String _ob_id = _ob_aex.getId(); in = _ob_aex.getInputStream(); throw new org.omg.CORBA.UNKNOWN("Unexpected User Exception: " + _ob_id); } finally { _releaseReply(in); } } else { org.omg.CORBA.portable.ServantObject _ob_so = _servant_preinvoke("op_NO_PERMISSION_Ex", _ob_opsClass); if(_ob_so == null) continue; IntfOperations _ob_self = (IntfOperations)_ob_so.servant; try { _ob_self.op_NO_PERMISSION_Ex(); return; } finally { _servant_postinvoke(_ob_so); } } } } // // IDL:ORBTest_Exceptions/Intf/op_INTERNAL_Ex:1.0 // public void op_INTERNAL_Ex() { while(true) { if(!this._is_local()) { org.omg.CORBA.portable.OutputStream out = null; org.omg.CORBA.portable.InputStream in = null; try { out = _request("op_INTERNAL_Ex", true); in = _invoke(out); return; } catch(org.omg.CORBA.portable.RemarshalException _ob_ex) { continue; } catch(org.omg.CORBA.portable.ApplicationException _ob_aex) { final String _ob_id = _ob_aex.getId(); in = _ob_aex.getInputStream(); throw new org.omg.CORBA.UNKNOWN("Unexpected User Exception: " + _ob_id); } finally { _releaseReply(in); } } else { org.omg.CORBA.portable.ServantObject _ob_so = _servant_preinvoke("op_INTERNAL_Ex", _ob_opsClass); if(_ob_so == null) continue; IntfOperations _ob_self = (IntfOperations)_ob_so.servant; try { _ob_self.op_INTERNAL_Ex(); return; } finally { _servant_postinvoke(_ob_so); } } } } // // IDL:ORBTest_Exceptions/Intf/op_MARSHAL_Ex:1.0 // public void op_MARSHAL_Ex() { while(true) { if(!this._is_local()) { org.omg.CORBA.portable.OutputStream out = null; org.omg.CORBA.portable.InputStream in = null; try { out = _request("op_MARSHAL_Ex", true); in = _invoke(out); return; } catch(org.omg.CORBA.portable.RemarshalException _ob_ex) { continue; } catch(org.omg.CORBA.portable.ApplicationException _ob_aex) { final String _ob_id = _ob_aex.getId(); in = _ob_aex.getInputStream(); throw new org.omg.CORBA.UNKNOWN("Unexpected User Exception: " + _ob_id); } finally { _releaseReply(in); } } else { org.omg.CORBA.portable.ServantObject _ob_so = _servant_preinvoke("op_MARSHAL_Ex", _ob_opsClass); if(_ob_so == null) continue; IntfOperations _ob_self = (IntfOperations)_ob_so.servant; try { _ob_self.op_MARSHAL_Ex(); return; } finally { _servant_postinvoke(_ob_so); } } } } // // IDL:ORBTest_Exceptions/Intf/op_INITIALIZE_Ex:1.0 // public void op_INITIALIZE_Ex() { while(true) { if(!this._is_local()) { org.omg.CORBA.portable.OutputStream out = null; org.omg.CORBA.portable.InputStream in = null; try { out = _request("op_INITIALIZE_Ex", true); in = _invoke(out); return; } catch(org.omg.CORBA.portable.RemarshalException _ob_ex) { continue; } catch(org.omg.CORBA.portable.ApplicationException _ob_aex) { final String _ob_id = _ob_aex.getId(); in = _ob_aex.getInputStream(); throw new org.omg.CORBA.UNKNOWN("Unexpected User Exception: " + _ob_id); } finally { _releaseReply(in); } } else { org.omg.CORBA.portable.ServantObject _ob_so = _servant_preinvoke("op_INITIALIZE_Ex", _ob_opsClass); if(_ob_so == null) continue; IntfOperations _ob_self = (IntfOperations)_ob_so.servant; try { _ob_self.op_INITIALIZE_Ex(); return; } finally { _servant_postinvoke(_ob_so); } } } } // // IDL:ORBTest_Exceptions/Intf/op_NO_IMPLEMENT_Ex:1.0 // public void op_NO_IMPLEMENT_Ex() { while(true) { if(!this._is_local()) { org.omg.CORBA.portable.OutputStream out = null; org.omg.CORBA.portable.InputStream in = null; try { out = _request("op_NO_IMPLEMENT_Ex", true); in = _invoke(out); return; } catch(org.omg.CORBA.portable.RemarshalException _ob_ex) { continue; } catch(org.omg.CORBA.portable.ApplicationException _ob_aex) { final String _ob_id = _ob_aex.getId(); in = _ob_aex.getInputStream(); throw new org.omg.CORBA.UNKNOWN("Unexpected User Exception: " + _ob_id); } finally { _releaseReply(in); } } else { org.omg.CORBA.portable.ServantObject _ob_so = _servant_preinvoke("op_NO_IMPLEMENT_Ex", _ob_opsClass); if(_ob_so == null) continue; IntfOperations _ob_self = (IntfOperations)_ob_so.servant; try { _ob_self.op_NO_IMPLEMENT_Ex(); return; } finally { _servant_postinvoke(_ob_so); } } } } // // IDL:ORBTest_Exceptions/Intf/op_BAD_TYPECODE_Ex:1.0 // public void op_BAD_TYPECODE_Ex() { while(true) { if(!this._is_local()) { org.omg.CORBA.portable.OutputStream out = null; org.omg.CORBA.portable.InputStream in = null; try { out = _request("op_BAD_TYPECODE_Ex", true); in = _invoke(out); return; } catch(org.omg.CORBA.portable.RemarshalException _ob_ex) { continue; } catch(org.omg.CORBA.portable.ApplicationException _ob_aex) { final String _ob_id = _ob_aex.getId(); in = _ob_aex.getInputStream(); throw new org.omg.CORBA.UNKNOWN("Unexpected User Exception: " + _ob_id); } finally { _releaseReply(in); } } else { org.omg.CORBA.portable.ServantObject _ob_so = _servant_preinvoke("op_BAD_TYPECODE_Ex", _ob_opsClass); if(_ob_so == null) continue; IntfOperations _ob_self = (IntfOperations)_ob_so.servant; try { _ob_self.op_BAD_TYPECODE_Ex(); return; } finally { _servant_postinvoke(_ob_so); } } } } // // IDL:ORBTest_Exceptions/Intf/op_BAD_OPERATION_Ex:1.0 // public void op_BAD_OPERATION_Ex() { while(true) { if(!this._is_local()) { org.omg.CORBA.portable.OutputStream out = null; org.omg.CORBA.portable.InputStream in = null; try { out = _request("op_BAD_OPERATION_Ex", true); in = _invoke(out); return; } catch(org.omg.CORBA.portable.RemarshalException _ob_ex) { continue; } catch(org.omg.CORBA.portable.ApplicationException _ob_aex) { final String _ob_id = _ob_aex.getId(); in = _ob_aex.getInputStream(); throw new org.omg.CORBA.UNKNOWN("Unexpected User Exception: " + _ob_id); } finally { _releaseReply(in); } } else { org.omg.CORBA.portable.ServantObject _ob_so = _servant_preinvoke("op_BAD_OPERATION_Ex", _ob_opsClass); if(_ob_so == null) continue; IntfOperations _ob_self = (IntfOperations)_ob_so.servant; try { _ob_self.op_BAD_OPERATION_Ex(); return; } finally { _servant_postinvoke(_ob_so); } } } } // // IDL:ORBTest_Exceptions/Intf/op_NO_RESOURCES_Ex:1.0 // public void op_NO_RESOURCES_Ex() { while(true) { if(!this._is_local()) { org.omg.CORBA.portable.OutputStream out = null; org.omg.CORBA.portable.InputStream in = null; try { out = _request("op_NO_RESOURCES_Ex", true); in = _invoke(out); return; } catch(org.omg.CORBA.portable.RemarshalException _ob_ex) { continue; } catch(org.omg.CORBA.portable.ApplicationException _ob_aex) { final String _ob_id = _ob_aex.getId(); in = _ob_aex.getInputStream(); throw new org.omg.CORBA.UNKNOWN("Unexpected User Exception: " + _ob_id); } finally { _releaseReply(in); } } else { org.omg.CORBA.portable.ServantObject _ob_so = _servant_preinvoke("op_NO_RESOURCES_Ex", _ob_opsClass); if(_ob_so == null) continue; IntfOperations _ob_self = (IntfOperations)_ob_so.servant; try { _ob_self.op_NO_RESOURCES_Ex(); return; } finally { _servant_postinvoke(_ob_so); } } } } // // IDL:ORBTest_Exceptions/Intf/op_NO_RESPONSE_Ex:1.0 // public void op_NO_RESPONSE_Ex() { while(true) { if(!this._is_local()) { org.omg.CORBA.portable.OutputStream out = null; org.omg.CORBA.portable.InputStream in = null; try { out = _request("op_NO_RESPONSE_Ex", true); in = _invoke(out); return; } catch(org.omg.CORBA.portable.RemarshalException _ob_ex) { continue; } catch(org.omg.CORBA.portable.ApplicationException _ob_aex) { final String _ob_id = _ob_aex.getId(); in = _ob_aex.getInputStream(); throw new org.omg.CORBA.UNKNOWN("Unexpected User Exception: " + _ob_id); } finally { _releaseReply(in); } } else { org.omg.CORBA.portable.ServantObject _ob_so = _servant_preinvoke("op_NO_RESPONSE_Ex", _ob_opsClass); if(_ob_so == null) continue; IntfOperations _ob_self = (IntfOperations)_ob_so.servant; try { _ob_self.op_NO_RESPONSE_Ex(); return; } finally { _servant_postinvoke(_ob_so); } } } } // // IDL:ORBTest_Exceptions/Intf/op_BAD_INV_ORDER_Ex:1.0 // public void op_BAD_INV_ORDER_Ex() { while(true) { if(!this._is_local()) { org.omg.CORBA.portable.OutputStream out = null; org.omg.CORBA.portable.InputStream in = null; try { out = _request("op_BAD_INV_ORDER_Ex", true); in = _invoke(out); return; } catch(org.omg.CORBA.portable.RemarshalException _ob_ex) { continue; } catch(org.omg.CORBA.portable.ApplicationException _ob_aex) { final String _ob_id = _ob_aex.getId(); in = _ob_aex.getInputStream(); throw new org.omg.CORBA.UNKNOWN("Unexpected User Exception: " + _ob_id); } finally { _releaseReply(in); } } else { org.omg.CORBA.portable.ServantObject _ob_so = _servant_preinvoke("op_BAD_INV_ORDER_Ex", _ob_opsClass); if(_ob_so == null) continue; IntfOperations _ob_self = (IntfOperations)_ob_so.servant; try { _ob_self.op_BAD_INV_ORDER_Ex(); return; } finally { _servant_postinvoke(_ob_so); } } } } // // IDL:ORBTest_Exceptions/Intf/op_TRANSIENT_Ex:1.0 // public void op_TRANSIENT_Ex() { while(true) { if(!this._is_local()) { org.omg.CORBA.portable.OutputStream out = null; org.omg.CORBA.portable.InputStream in = null; try { out = _request("op_TRANSIENT_Ex", true); in = _invoke(out); return; } catch(org.omg.CORBA.portable.RemarshalException _ob_ex) { continue; } catch(org.omg.CORBA.portable.ApplicationException _ob_aex) { final String _ob_id = _ob_aex.getId(); in = _ob_aex.getInputStream(); throw new org.omg.CORBA.UNKNOWN("Unexpected User Exception: " + _ob_id); } finally { _releaseReply(in); } } else { org.omg.CORBA.portable.ServantObject _ob_so = _servant_preinvoke("op_TRANSIENT_Ex", _ob_opsClass); if(_ob_so == null) continue; IntfOperations _ob_self = (IntfOperations)_ob_so.servant; try { _ob_self.op_TRANSIENT_Ex(); return; } finally { _servant_postinvoke(_ob_so); } } } } // // IDL:ORBTest_Exceptions/Intf/op_OBJ_ADAPTER_Ex:1.0 // public void op_OBJ_ADAPTER_Ex() { while(true) { if(!this._is_local()) { org.omg.CORBA.portable.OutputStream out = null; org.omg.CORBA.portable.InputStream in = null; try { out = _request("op_OBJ_ADAPTER_Ex", true); in = _invoke(out); return; } catch(org.omg.CORBA.portable.RemarshalException _ob_ex) { continue; } catch(org.omg.CORBA.portable.ApplicationException _ob_aex) { final String _ob_id = _ob_aex.getId(); in = _ob_aex.getInputStream(); throw new org.omg.CORBA.UNKNOWN("Unexpected User Exception: " + _ob_id); } finally { _releaseReply(in); } } else { org.omg.CORBA.portable.ServantObject _ob_so = _servant_preinvoke("op_OBJ_ADAPTER_Ex", _ob_opsClass); if(_ob_so == null) continue; IntfOperations _ob_self = (IntfOperations)_ob_so.servant; try { _ob_self.op_OBJ_ADAPTER_Ex(); return; } finally { _servant_postinvoke(_ob_so); } } } } // // IDL:ORBTest_Exceptions/Intf/op_DATA_CONVERSION_Ex:1.0 // public void op_DATA_CONVERSION_Ex() { while(true) { if(!this._is_local()) { org.omg.CORBA.portable.OutputStream out = null; org.omg.CORBA.portable.InputStream in = null; try { out = _request("op_DATA_CONVERSION_Ex", true); in = _invoke(out); return; } catch(org.omg.CORBA.portable.RemarshalException _ob_ex) { continue; } catch(org.omg.CORBA.portable.ApplicationException _ob_aex) { final String _ob_id = _ob_aex.getId(); in = _ob_aex.getInputStream(); throw new org.omg.CORBA.UNKNOWN("Unexpected User Exception: " + _ob_id); } finally { _releaseReply(in); } } else { org.omg.CORBA.portable.ServantObject _ob_so = _servant_preinvoke("op_DATA_CONVERSION_Ex", _ob_opsClass); if(_ob_so == null) continue; IntfOperations _ob_self = (IntfOperations)_ob_so.servant; try { _ob_self.op_DATA_CONVERSION_Ex(); return; } finally { _servant_postinvoke(_ob_so); } } } } // // IDL:ORBTest_Exceptions/Intf/op_OBJECT_NOT_EXIST_Ex:1.0 // public void op_OBJECT_NOT_EXIST_Ex() { while(true) { if(!this._is_local()) { org.omg.CORBA.portable.OutputStream out = null; org.omg.CORBA.portable.InputStream in = null; try { out = _request("op_OBJECT_NOT_EXIST_Ex", true); in = _invoke(out); return; } catch(org.omg.CORBA.portable.RemarshalException _ob_ex) { continue; } catch(org.omg.CORBA.portable.ApplicationException _ob_aex) { final String _ob_id = _ob_aex.getId(); in = _ob_aex.getInputStream(); throw new org.omg.CORBA.UNKNOWN("Unexpected User Exception: " + _ob_id); } finally { _releaseReply(in); } } else { org.omg.CORBA.portable.ServantObject _ob_so = _servant_preinvoke("op_OBJECT_NOT_EXIST_Ex", _ob_opsClass); if(_ob_so == null) continue; IntfOperations _ob_self = (IntfOperations)_ob_so.servant; try { _ob_self.op_OBJECT_NOT_EXIST_Ex(); return; } finally { _servant_postinvoke(_ob_so); } } } } // // IDL:ORBTest_Exceptions/Intf/op_INV_POLICY_Ex:1.0 // public void op_INV_POLICY_Ex() { while(true) { if(!this._is_local()) { org.omg.CORBA.portable.OutputStream out = null; org.omg.CORBA.portable.InputStream in = null; try { out = _request("op_INV_POLICY_Ex", true); in = _invoke(out); return; } catch(org.omg.CORBA.portable.RemarshalException _ob_ex) { continue; } catch(org.omg.CORBA.portable.ApplicationException _ob_aex) { final String _ob_id = _ob_aex.getId(); in = _ob_aex.getInputStream(); throw new org.omg.CORBA.UNKNOWN("Unexpected User Exception: " + _ob_id); } finally { _releaseReply(in); } } else { org.omg.CORBA.portable.ServantObject _ob_so = _servant_preinvoke("op_INV_POLICY_Ex", _ob_opsClass); if(_ob_so == null) continue; IntfOperations _ob_self = (IntfOperations)_ob_so.servant; try { _ob_self.op_INV_POLICY_Ex(); return; } finally { _servant_postinvoke(_ob_so); } } } } }
6,143
0
Create_ds/geronimo-yoko/yoko-core/src/test/java
Create_ds/geronimo-yoko/yoko-core/src/test/java/ORBTest_Exceptions/IntfHelper.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package ORBTest_Exceptions; // // IDL:ORBTest_Exceptions/Intf:1.0 // final public class IntfHelper { public static void insert(org.omg.CORBA.Any any, Intf val) { any.insert_Object(val, type()); } public static Intf extract(org.omg.CORBA.Any any) { if(any.type().equivalent(type())) return narrow(any.extract_Object()); throw new org.omg.CORBA.BAD_OPERATION(); } private static org.omg.CORBA.TypeCode typeCode_; public static org.omg.CORBA.TypeCode type() { if(typeCode_ == null) { org.omg.CORBA.ORB orb = org.omg.CORBA.ORB.init(); typeCode_ = orb.create_interface_tc(id(), "Intf"); } return typeCode_; } public static String id() { return "IDL:ORBTest_Exceptions/Intf:1.0"; } public static Intf read(org.omg.CORBA.portable.InputStream in) { org.omg.CORBA.Object _ob_v = in.read_Object(); try { return (Intf)_ob_v; } catch(ClassCastException ex) { } org.omg.CORBA.portable.ObjectImpl _ob_impl; _ob_impl = (org.omg.CORBA.portable.ObjectImpl)_ob_v; _IntfStub _ob_stub = new _IntfStub(); _ob_stub._set_delegate(_ob_impl._get_delegate()); return _ob_stub; } public static void write(org.omg.CORBA.portable.OutputStream out, Intf val) { out.write_Object(val); } public static Intf narrow(org.omg.CORBA.Object val) { if(val != null) { try { return (Intf)val; } catch(ClassCastException ex) { } if(val._is_a(id())) { org.omg.CORBA.portable.ObjectImpl _ob_impl; _IntfStub _ob_stub = new _IntfStub(); _ob_impl = (org.omg.CORBA.portable.ObjectImpl)val; _ob_stub._set_delegate(_ob_impl._get_delegate()); return _ob_stub; } throw new org.omg.CORBA.BAD_PARAM(); } return null; } public static Intf unchecked_narrow(org.omg.CORBA.Object val) { if(val != null) { try { return (Intf)val; } catch(ClassCastException ex) { } org.omg.CORBA.portable.ObjectImpl _ob_impl; _IntfStub _ob_stub = new _IntfStub(); _ob_impl = (org.omg.CORBA.portable.ObjectImpl)val; _ob_stub._set_delegate(_ob_impl._get_delegate()); return _ob_stub; } return null; } }
6,144
0
Create_ds/geronimo-yoko/yoko-core/src/test/java
Create_ds/geronimo-yoko/yoko-core/src/test/java/ORBTest_Exceptions/IntfHolder.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package ORBTest_Exceptions; // // IDL:ORBTest_Exceptions/Intf:1.0 // final public class IntfHolder implements org.omg.CORBA.portable.Streamable { public Intf value; public IntfHolder() { } public IntfHolder(Intf initial) { value = initial; } public void _read(org.omg.CORBA.portable.InputStream in) { value = IntfHelper.read(in); } public void _write(org.omg.CORBA.portable.OutputStream out) { IntfHelper.write(out, value); } public org.omg.CORBA.TypeCode _type() { return IntfHelper.type(); } }
6,145
0
Create_ds/geronimo-yoko/yoko-core/src/test/java
Create_ds/geronimo-yoko/yoko-core/src/test/java/ORBTest_Exceptions/IntfOperations.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package ORBTest_Exceptions; // // IDL:ORBTest_Exceptions/Intf:1.0 // /***/ public interface IntfOperations { // // IDL:ORBTest_Exceptions/Intf/op_UNKNOWN_Ex:1.0 // /***/ void op_UNKNOWN_Ex(); // // IDL:ORBTest_Exceptions/Intf/op_BAD_PARAM_Ex:1.0 // /***/ void op_BAD_PARAM_Ex(); // // IDL:ORBTest_Exceptions/Intf/op_NO_MEMORY_Ex:1.0 // /***/ void op_NO_MEMORY_Ex(); // // IDL:ORBTest_Exceptions/Intf/op_IMP_LIMIT_Ex:1.0 // /***/ void op_IMP_LIMIT_Ex(); // // IDL:ORBTest_Exceptions/Intf/op_COMM_FAILURE_Ex:1.0 // /***/ void op_COMM_FAILURE_Ex(); // // IDL:ORBTest_Exceptions/Intf/op_INV_OBJREF_Ex:1.0 // /***/ void op_INV_OBJREF_Ex(); // // IDL:ORBTest_Exceptions/Intf/op_NO_PERMISSION_Ex:1.0 // /***/ void op_NO_PERMISSION_Ex(); // // IDL:ORBTest_Exceptions/Intf/op_INTERNAL_Ex:1.0 // /***/ void op_INTERNAL_Ex(); // // IDL:ORBTest_Exceptions/Intf/op_MARSHAL_Ex:1.0 // /***/ void op_MARSHAL_Ex(); // // IDL:ORBTest_Exceptions/Intf/op_INITIALIZE_Ex:1.0 // /***/ void op_INITIALIZE_Ex(); // // IDL:ORBTest_Exceptions/Intf/op_NO_IMPLEMENT_Ex:1.0 // /***/ void op_NO_IMPLEMENT_Ex(); // // IDL:ORBTest_Exceptions/Intf/op_BAD_TYPECODE_Ex:1.0 // /***/ void op_BAD_TYPECODE_Ex(); // // IDL:ORBTest_Exceptions/Intf/op_BAD_OPERATION_Ex:1.0 // /***/ void op_BAD_OPERATION_Ex(); // // IDL:ORBTest_Exceptions/Intf/op_NO_RESOURCES_Ex:1.0 // /***/ void op_NO_RESOURCES_Ex(); // // IDL:ORBTest_Exceptions/Intf/op_NO_RESPONSE_Ex:1.0 // /***/ void op_NO_RESPONSE_Ex(); // // IDL:ORBTest_Exceptions/Intf/op_BAD_INV_ORDER_Ex:1.0 // /***/ void op_BAD_INV_ORDER_Ex(); // // IDL:ORBTest_Exceptions/Intf/op_TRANSIENT_Ex:1.0 // /***/ void op_TRANSIENT_Ex(); // // IDL:ORBTest_Exceptions/Intf/op_OBJ_ADAPTER_Ex:1.0 // /***/ void op_OBJ_ADAPTER_Ex(); // // IDL:ORBTest_Exceptions/Intf/op_DATA_CONVERSION_Ex:1.0 // /***/ void op_DATA_CONVERSION_Ex(); // // IDL:ORBTest_Exceptions/Intf/op_OBJECT_NOT_EXIST_Ex:1.0 // /***/ void op_OBJECT_NOT_EXIST_Ex(); // // IDL:ORBTest_Exceptions/Intf/op_INV_POLICY_Ex:1.0 // /***/ void op_INV_POLICY_Ex(); }
6,146
0
Create_ds/geronimo-yoko/yoko-core/src/main/java/org/apache/yoko/orb
Create_ds/geronimo-yoko/yoko-core/src/main/java/org/apache/yoko/orb/OBPortableInterceptor/TransientORTFactory_impl.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.yoko.orb.OBPortableInterceptor; // // The Transient ObjectReferenceTemplate // final public class TransientORTFactory_impl implements org.omg.CORBA.portable.ValueFactory { private org.apache.yoko.orb.OB.ORBInstance orbInstance_; // ------------------------------------------------------------------ // Public member functions // ------------------------------------------------------------------ public TransientORTFactory_impl( org.apache.yoko.orb.OB.ORBInstance orbInstance) { orbInstance_ = orbInstance; } public java.io.Serializable read_value( org.omg.CORBA_2_3.portable.InputStream in) { return in.read_value(new TransientORT_impl(orbInstance_)); } }
6,147
0
Create_ds/geronimo-yoko/yoko-core/src/main/java/org/apache/yoko/orb
Create_ds/geronimo-yoko/yoko-core/src/main/java/org/apache/yoko/orb/OBPortableInterceptor/IMRORTHelper.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.yoko.orb.OBPortableInterceptor; // // IDL:orb.yoko.apache.org/OBPortableInterceptor/IMRORT:1.0 // final public class IMRORTHelper { public static void insert(org.omg.CORBA.Any any, IMRORT val) { any.insert_Value(val, type()); } public static IMRORT extract(org.omg.CORBA.Any any) { if(any.type().equivalent(type())) { java.io.Serializable _ob_v = any.extract_Value(); if(_ob_v == null || _ob_v instanceof IMRORT) return (IMRORT)_ob_v; } throw new org.omg.CORBA.BAD_OPERATION( org.apache.yoko.orb.OB.MinorCodes .describeBadOperation(org.apache.yoko.orb.OB.MinorCodes.MinorTypeMismatch), org.apache.yoko.orb.OB.MinorCodes.MinorTypeMismatch, org.omg.CORBA.CompletionStatus.COMPLETED_NO); } private static org.omg.CORBA.TypeCode typeCode_; public static org.omg.CORBA.TypeCode type() { if(typeCode_ == null) { org.omg.CORBA.ORB orb = org.omg.CORBA.ORB.init(); org.omg.CORBA.ValueMember[] members = new org.omg.CORBA.ValueMember[3]; members[0] = new org.omg.CORBA.ValueMember(); members[0].name = "the_server_id"; members[0].type = org.omg.PortableInterceptor.ServerIdHelper.type(); members[0].access = org.omg.CORBA.PRIVATE_MEMBER.value; members[1] = new org.omg.CORBA.ValueMember(); members[1].name = "the_adapter_name"; members[1].type = org.omg.PortableInterceptor.AdapterNameHelper.type(); members[1].access = org.omg.CORBA.PRIVATE_MEMBER.value; members[2] = new org.omg.CORBA.ValueMember(); members[2].name = "the_real_template"; members[2].type = org.omg.PortableInterceptor.ObjectReferenceTemplateHelper.type(); members[2].access = org.omg.CORBA.PRIVATE_MEMBER.value; typeCode_ = orb.create_value_tc(id(), "IMRORT", org.omg.CORBA.VM_NONE.value, null, members); } return typeCode_; } public static String id() { return "IDL:orb.yoko.apache.org/OBPortableInterceptor/IMRORT:1.0"; } public static IMRORT read(org.omg.CORBA.portable.InputStream in) { if(!(in instanceof org.omg.CORBA_2_3.portable.InputStream)) { throw new org.omg.CORBA.BAD_PARAM(org.apache.yoko.orb.OB.MinorCodes .describeBadParam(org.apache.yoko.orb.OB.MinorCodes.MinorIncompatibleObjectType), org.apache.yoko.orb.OB.MinorCodes.MinorIncompatibleObjectType, org.omg.CORBA.CompletionStatus.COMPLETED_NO); } return (IMRORT)((org.omg.CORBA_2_3.portable.InputStream)in).read_value(id()); } public static void write(org.omg.CORBA.portable.OutputStream out, IMRORT val) { if(!(out instanceof org.omg.CORBA_2_3.portable.OutputStream)) { throw new org.omg.CORBA.BAD_PARAM(org.apache.yoko.orb.OB.MinorCodes .describeBadParam(org.apache.yoko.orb.OB.MinorCodes.MinorIncompatibleObjectType), org.apache.yoko.orb.OB.MinorCodes.MinorIncompatibleObjectType, org.omg.CORBA.CompletionStatus.COMPLETED_NO); } ((org.omg.CORBA_2_3.portable.OutputStream)out).write_value(val, id()); } }
6,148
0
Create_ds/geronimo-yoko/yoko-core/src/main/java/org/apache/yoko/orb
Create_ds/geronimo-yoko/yoko-core/src/main/java/org/apache/yoko/orb/OBPortableInterceptor/ORBInitInfoOperations.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.yoko.orb.OBPortableInterceptor; // // IDL:orb.yoko.apache.org/OBPortableInterceptor/ORBInitInfo:1.0 // /** * * This interface is a proprietary extension to the standard ORBInitInfo. * * @see PortableInterceptor::ORBInitInfo * **/ public interface ORBInitInfoOperations extends org.omg.PortableInterceptor.ORBInitInfoOperations { // // IDL:orb.yoko.apache.org/OBPortableInterceptor/ORBInitInfo/orb:1.0 // /** This ORB. */ org.omg.CORBA.ORB orb(); }
6,149
0
Create_ds/geronimo-yoko/yoko-core/src/main/java/org/apache/yoko/orb
Create_ds/geronimo-yoko/yoko-core/src/main/java/org/apache/yoko/orb/OBPortableInterceptor/PersistentORT.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.yoko.orb.OBPortableInterceptor; // // IDL:orb.yoko.apache.org/OBPortableInterceptor/PersistentORT:1.0 // /***/ public abstract class PersistentORT implements org.omg.CORBA.portable.StreamableValue, ObjectReferenceTemplate { // // IDL:orb.yoko.apache.org/OBPortableInterceptor/PersistentORT/the_server_id:1.0 // /***/ protected String the_server_id; // // IDL:orb.yoko.apache.org/OBPortableInterceptor/PersistentORT/the_orb_id:1.0 // /***/ protected String the_orb_id; // // IDL:orb.yoko.apache.org/OBPortableInterceptor/PersistentORT/the_adapter_name:1.0 // /***/ protected String[] the_adapter_name; // // IDL:orb.yoko.apache.org/OBPortableInterceptor/PersistentORT/the_ior_template:1.0 // /***/ protected org.omg.IOP.IOR the_ior_template; private static String[] _OB_truncatableIds_ = { PersistentORTHelper.id() }; public String[] _truncatable_ids() { return _OB_truncatableIds_; } public void _read(org.omg.CORBA.portable.InputStream in) { the_server_id = org.omg.PortableInterceptor.ServerIdHelper.read(in); the_orb_id = org.omg.PortableInterceptor.ORBIdHelper.read(in); the_adapter_name = org.omg.PortableInterceptor.AdapterNameHelper.read(in); the_ior_template = org.omg.IOP.IORHelper.read(in); } public void _write(org.omg.CORBA.portable.OutputStream out) { org.omg.PortableInterceptor.ServerIdHelper.write(out, the_server_id); org.omg.PortableInterceptor.ORBIdHelper.write(out, the_orb_id); org.omg.PortableInterceptor.AdapterNameHelper.write(out, the_adapter_name); org.omg.IOP.IORHelper.write(out, the_ior_template); } public org.omg.CORBA.TypeCode _type() { return PersistentORTHelper.type(); } }
6,150
0
Create_ds/geronimo-yoko/yoko-core/src/main/java/org/apache/yoko/orb
Create_ds/geronimo-yoko/yoko-core/src/main/java/org/apache/yoko/orb/OBPortableInterceptor/IMRORTHolder.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.yoko.orb.OBPortableInterceptor; // // IDL:orb.yoko.apache.org/OBPortableInterceptor/IMRORT:1.0 // final public class IMRORTHolder implements org.omg.CORBA.portable.Streamable { public IMRORT value; public IMRORTHolder() { } public IMRORTHolder(IMRORT initial) { value = initial; } public void _read(org.omg.CORBA.portable.InputStream in) { value = IMRORTHelper.read(in); } public void _write(org.omg.CORBA.portable.OutputStream out) { IMRORTHelper.write(out, value); } public org.omg.CORBA.TypeCode _type() { return IMRORTHelper.type(); } }
6,151
0
Create_ds/geronimo-yoko/yoko-core/src/main/java/org/apache/yoko/orb
Create_ds/geronimo-yoko/yoko-core/src/main/java/org/apache/yoko/orb/OBPortableInterceptor/PersistentORTHelper.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.yoko.orb.OBPortableInterceptor; // // IDL:orb.yoko.apache.org/OBPortableInterceptor/PersistentORT:1.0 // final public class PersistentORTHelper { public static void insert(org.omg.CORBA.Any any, PersistentORT val) { any.insert_Value(val, type()); } public static PersistentORT extract(org.omg.CORBA.Any any) { if(any.type().equivalent(type())) { java.io.Serializable _ob_v = any.extract_Value(); if(_ob_v == null || _ob_v instanceof PersistentORT) return (PersistentORT)_ob_v; } throw new org.omg.CORBA.BAD_OPERATION( org.apache.yoko.orb.OB.MinorCodes .describeBadOperation(org.apache.yoko.orb.OB.MinorCodes.MinorTypeMismatch), org.apache.yoko.orb.OB.MinorCodes.MinorTypeMismatch, org.omg.CORBA.CompletionStatus.COMPLETED_NO); } private static org.omg.CORBA.TypeCode typeCode_; public static org.omg.CORBA.TypeCode type() { if(typeCode_ == null) { org.omg.CORBA.ORB orb = org.omg.CORBA.ORB.init(); org.omg.CORBA.ValueMember[] members = new org.omg.CORBA.ValueMember[4]; members[0] = new org.omg.CORBA.ValueMember(); members[0].name = "the_server_id"; members[0].type = org.omg.PortableInterceptor.ServerIdHelper.type(); members[0].access = org.omg.CORBA.PRIVATE_MEMBER.value; members[1] = new org.omg.CORBA.ValueMember(); members[1].name = "the_orb_id"; members[1].type = org.omg.PortableInterceptor.ORBIdHelper.type(); members[1].access = org.omg.CORBA.PRIVATE_MEMBER.value; members[2] = new org.omg.CORBA.ValueMember(); members[2].name = "the_adapter_name"; members[2].type = org.omg.PortableInterceptor.AdapterNameHelper.type(); members[2].access = org.omg.CORBA.PRIVATE_MEMBER.value; members[3] = new org.omg.CORBA.ValueMember(); members[3].name = "the_ior_template"; members[3].type = org.omg.IOP.IORHelper.type(); members[3].access = org.omg.CORBA.PRIVATE_MEMBER.value; typeCode_ = orb.create_value_tc(id(), "PersistentORT", org.omg.CORBA.VM_NONE.value, null, members); } return typeCode_; } public static String id() { return "IDL:orb.yoko.apache.org/OBPortableInterceptor/PersistentORT:1.0"; } public static PersistentORT read(org.omg.CORBA.portable.InputStream in) { if(!(in instanceof org.omg.CORBA_2_3.portable.InputStream)) { throw new org.omg.CORBA.BAD_PARAM(org.apache.yoko.orb.OB.MinorCodes .describeBadParam(org.apache.yoko.orb.OB.MinorCodes.MinorIncompatibleObjectType), org.apache.yoko.orb.OB.MinorCodes.MinorIncompatibleObjectType, org.omg.CORBA.CompletionStatus.COMPLETED_NO); } return (PersistentORT)((org.omg.CORBA_2_3.portable.InputStream)in).read_value(id()); } public static void write(org.omg.CORBA.portable.OutputStream out, PersistentORT val) { if(!(out instanceof org.omg.CORBA_2_3.portable.OutputStream)) { throw new org.omg.CORBA.BAD_PARAM(org.apache.yoko.orb.OB.MinorCodes .describeBadParam(org.apache.yoko.orb.OB.MinorCodes.MinorIncompatibleObjectType), org.apache.yoko.orb.OB.MinorCodes.MinorIncompatibleObjectType, org.omg.CORBA.CompletionStatus.COMPLETED_NO); } ((org.omg.CORBA_2_3.portable.OutputStream)out).write_value(val, id()); } }
6,152
0
Create_ds/geronimo-yoko/yoko-core/src/main/java/org/apache/yoko/orb
Create_ds/geronimo-yoko/yoko-core/src/main/java/org/apache/yoko/orb/OBPortableInterceptor/TransientORTHelper.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.yoko.orb.OBPortableInterceptor; // // IDL:orb.yoko.apache.org/OBPortableInterceptor/TransientORT:1.0 // final public class TransientORTHelper { public static void insert(org.omg.CORBA.Any any, TransientORT val) { any.insert_Value(val, type()); } public static TransientORT extract(org.omg.CORBA.Any any) { if(any.type().equivalent(type())) { java.io.Serializable _ob_v = any.extract_Value(); if(_ob_v == null || _ob_v instanceof TransientORT) return (TransientORT)_ob_v; } throw new org.omg.CORBA.BAD_OPERATION( org.apache.yoko.orb.OB.MinorCodes .describeBadOperation(org.apache.yoko.orb.OB.MinorCodes.MinorTypeMismatch), org.apache.yoko.orb.OB.MinorCodes.MinorTypeMismatch, org.omg.CORBA.CompletionStatus.COMPLETED_NO); } private static org.omg.CORBA.TypeCode typeCode_; public static org.omg.CORBA.TypeCode type() { if(typeCode_ == null) { org.omg.CORBA.ORB orb = org.omg.CORBA.ORB.init(); org.omg.CORBA.ValueMember[] members = new org.omg.CORBA.ValueMember[5]; members[0] = new org.omg.CORBA.ValueMember(); members[0].name = "the_server_id"; members[0].type = org.omg.PortableInterceptor.ServerIdHelper.type(); members[0].access = org.omg.CORBA.PRIVATE_MEMBER.value; members[1] = new org.omg.CORBA.ValueMember(); members[1].name = "the_orb_id"; members[1].type = org.omg.PortableInterceptor.ORBIdHelper.type(); members[1].access = org.omg.CORBA.PRIVATE_MEMBER.value; members[2] = new org.omg.CORBA.ValueMember(); members[2].name = "the_adapter_name"; members[2].type = org.omg.PortableInterceptor.AdapterNameHelper.type(); members[2].access = org.omg.CORBA.PRIVATE_MEMBER.value; members[3] = new org.omg.CORBA.ValueMember(); members[3].name = "the_create_time"; members[3].type = orb.get_primitive_tc(org.omg.CORBA.TCKind.tk_ulong); members[3].access = org.omg.CORBA.PRIVATE_MEMBER.value; members[4] = new org.omg.CORBA.ValueMember(); members[4].name = "the_ior_template"; members[4].type = org.omg.IOP.IORHelper.type(); members[4].access = org.omg.CORBA.PRIVATE_MEMBER.value; typeCode_ = orb.create_value_tc(id(), "TransientORT", org.omg.CORBA.VM_NONE.value, null, members); } return typeCode_; } public static String id() { return "IDL:orb.yoko.apache.org/OBPortableInterceptor/TransientORT:1.0"; } public static TransientORT read(org.omg.CORBA.portable.InputStream in) { if(!(in instanceof org.omg.CORBA_2_3.portable.InputStream)) { throw new org.omg.CORBA.BAD_PARAM(org.apache.yoko.orb.OB.MinorCodes .describeBadParam(org.apache.yoko.orb.OB.MinorCodes.MinorIncompatibleObjectType), org.apache.yoko.orb.OB.MinorCodes.MinorIncompatibleObjectType, org.omg.CORBA.CompletionStatus.COMPLETED_NO); } return (TransientORT)((org.omg.CORBA_2_3.portable.InputStream)in).read_value(id()); } public static void write(org.omg.CORBA.portable.OutputStream out, TransientORT val) { if(!(out instanceof org.omg.CORBA_2_3.portable.OutputStream)) { throw new org.omg.CORBA.BAD_PARAM(org.apache.yoko.orb.OB.MinorCodes .describeBadParam(org.apache.yoko.orb.OB.MinorCodes.MinorIncompatibleObjectType), org.apache.yoko.orb.OB.MinorCodes.MinorIncompatibleObjectType, org.omg.CORBA.CompletionStatus.COMPLETED_NO); } ((org.omg.CORBA_2_3.portable.OutputStream)out).write_value(val, id()); } }
6,153
0
Create_ds/geronimo-yoko/yoko-core/src/main/java/org/apache/yoko/orb
Create_ds/geronimo-yoko/yoko-core/src/main/java/org/apache/yoko/orb/OBPortableInterceptor/TransientORTHolder.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.yoko.orb.OBPortableInterceptor; // // IDL:orb.yoko.apache.org/OBPortableInterceptor/TransientORT:1.0 // final public class TransientORTHolder implements org.omg.CORBA.portable.Streamable { public TransientORT value; public TransientORTHolder() { } public TransientORTHolder(TransientORT initial) { value = initial; } public void _read(org.omg.CORBA.portable.InputStream in) { value = TransientORTHelper.read(in); } public void _write(org.omg.CORBA.portable.OutputStream out) { TransientORTHelper.write(out, value); } public org.omg.CORBA.TypeCode _type() { return TransientORTHelper.type(); } }
6,154
0
Create_ds/geronimo-yoko/yoko-core/src/main/java/org/apache/yoko/orb
Create_ds/geronimo-yoko/yoko-core/src/main/java/org/apache/yoko/orb/OBPortableInterceptor/ObjectReferenceTemplate.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.yoko.orb.OBPortableInterceptor; // // IDL:orb.yoko.apache.org/OBPortableInterceptor/ObjectReferenceTemplate:1.0 // /***/ public interface ObjectReferenceTemplate extends org.omg.CORBA.portable.ValueBase, org.omg.PortableInterceptor.ObjectReferenceTemplate { // // IDL:orb.yoko.apache.org/OBPortableInterceptor/ObjectReferenceTemplate/make_object_for:1.0 // /***/ org.omg.CORBA.Object make_object_for(String repository_id, byte[] id, String[] name); }
6,155
0
Create_ds/geronimo-yoko/yoko-core/src/main/java/org/apache/yoko/orb
Create_ds/geronimo-yoko/yoko-core/src/main/java/org/apache/yoko/orb/OBPortableInterceptor/PersistentORTFactory_impl.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.yoko.orb.OBPortableInterceptor; // // The Persistent ObjectReferenceTemplate // final public class PersistentORTFactory_impl implements org.omg.CORBA.portable.ValueFactory { private org.apache.yoko.orb.OB.ORBInstance orbInstance_; // ------------------------------------------------------------------ // Public member functions // ------------------------------------------------------------------ public PersistentORTFactory_impl( org.apache.yoko.orb.OB.ORBInstance orbInstance) { orbInstance_ = orbInstance; } public java.io.Serializable read_value( org.omg.CORBA_2_3.portable.InputStream in) { return in.read_value(new PersistentORT_impl(orbInstance_)); } }
6,156
0
Create_ds/geronimo-yoko/yoko-core/src/main/java/org/apache/yoko/orb
Create_ds/geronimo-yoko/yoko-core/src/main/java/org/apache/yoko/orb/OBPortableInterceptor/PersistentORTHolder.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.yoko.orb.OBPortableInterceptor; // // IDL:orb.yoko.apache.org/OBPortableInterceptor/PersistentORT:1.0 // final public class PersistentORTHolder implements org.omg.CORBA.portable.Streamable { public PersistentORT value; public PersistentORTHolder() { } public PersistentORTHolder(PersistentORT initial) { value = initial; } public void _read(org.omg.CORBA.portable.InputStream in) { value = PersistentORTHelper.read(in); } public void _write(org.omg.CORBA.portable.OutputStream out) { PersistentORTHelper.write(out, value); } public org.omg.CORBA.TypeCode _type() { return PersistentORTHelper.type(); } }
6,157
0
Create_ds/geronimo-yoko/yoko-core/src/main/java/org/apache/yoko/orb
Create_ds/geronimo-yoko/yoko-core/src/main/java/org/apache/yoko/orb/OBPortableInterceptor/ORBInitInfoHelper.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.yoko.orb.OBPortableInterceptor; // // IDL:orb.yoko.apache.org/OBPortableInterceptor/ORBInitInfo:1.0 // final public class ORBInitInfoHelper { public static void insert(org.omg.CORBA.Any any, ORBInitInfo val) { any.insert_Object(val, type()); } public static ORBInitInfo extract(org.omg.CORBA.Any any) { if(any.type().equivalent(type())) return narrow(any.extract_Object()); throw new org.omg.CORBA.BAD_OPERATION( org.apache.yoko.orb.OB.MinorCodes .describeBadOperation(org.apache.yoko.orb.OB.MinorCodes.MinorTypeMismatch), org.apache.yoko.orb.OB.MinorCodes.MinorTypeMismatch, org.omg.CORBA.CompletionStatus.COMPLETED_NO); } private static org.omg.CORBA.TypeCode typeCode_; public static org.omg.CORBA.TypeCode type() { if(typeCode_ == null) { org.omg.CORBA.ORB orb = org.omg.CORBA.ORB.init(); typeCode_ = ((org.omg.CORBA_2_4.ORB)orb).create_local_interface_tc(id(), "ORBInitInfo"); } return typeCode_; } public static String id() { return "IDL:orb.yoko.apache.org/OBPortableInterceptor/ORBInitInfo:1.0"; } public static ORBInitInfo read(org.omg.CORBA.portable.InputStream in) { throw new org.omg.CORBA.MARSHAL( org.apache.yoko.orb.OB.MinorCodes .describeMarshal(org.apache.yoko.orb.OB.MinorCodes.MinorReadUnsupported), org.apache.yoko.orb.OB.MinorCodes.MinorReadUnsupported, org.omg.CORBA.CompletionStatus.COMPLETED_NO); } public static void write(org.omg.CORBA.portable.OutputStream out, ORBInitInfo val) { throw new org.omg.CORBA.MARSHAL( org.apache.yoko.orb.OB.MinorCodes .describeMarshal(org.apache.yoko.orb.OB.MinorCodes.MinorWriteUnsupported), org.apache.yoko.orb.OB.MinorCodes.MinorWriteUnsupported, org.omg.CORBA.CompletionStatus.COMPLETED_NO); } public static ORBInitInfo narrow(org.omg.CORBA.Object val) { try { return (ORBInitInfo)val; } catch(ClassCastException ex) { } throw new org.omg.CORBA.BAD_PARAM(org.apache.yoko.orb.OB.MinorCodes .describeBadParam(org.apache.yoko.orb.OB.MinorCodes.MinorIncompatibleObjectType), org.apache.yoko.orb.OB.MinorCodes.MinorIncompatibleObjectType, org.omg.CORBA.CompletionStatus.COMPLETED_NO); } }
6,158
0
Create_ds/geronimo-yoko/yoko-core/src/main/java/org/apache/yoko/orb
Create_ds/geronimo-yoko/yoko-core/src/main/java/org/apache/yoko/orb/OBPortableInterceptor/ORBInitInfoHolder.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.yoko.orb.OBPortableInterceptor; // // IDL:orb.yoko.apache.org/OBPortableInterceptor/ORBInitInfo:1.0 // final public class ORBInitInfoHolder implements org.omg.CORBA.portable.Streamable { public ORBInitInfo value; public ORBInitInfoHolder() { } public ORBInitInfoHolder(ORBInitInfo initial) { value = initial; } public void _read(org.omg.CORBA.portable.InputStream in) { value = ORBInitInfoHelper.read(in); } public void _write(org.omg.CORBA.portable.OutputStream out) { ORBInitInfoHelper.write(out, value); } public org.omg.CORBA.TypeCode _type() { return ORBInitInfoHelper.type(); } }
6,159
0
Create_ds/geronimo-yoko/yoko-core/src/main/java/org/apache/yoko/orb
Create_ds/geronimo-yoko/yoko-core/src/main/java/org/apache/yoko/orb/OBPortableInterceptor/PersistentORT_impl.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.yoko.orb.OBPortableInterceptor; import org.apache.yoko.orb.OBPortableInterceptor.PersistentORT; // // The Persistent ObjectReferenceTemplate // final public class PersistentORT_impl extends PersistentORT { // // The ORBInstance object // private org.apache.yoko.orb.OB.ORBInstance orbInstance_; // ------------------------------------------------------------------ // Public member implementations // ------------------------------------------------------------------ public PersistentORT_impl(org.apache.yoko.orb.OB.ORBInstance orbInstance) { orbInstance_ = orbInstance; } public PersistentORT_impl(org.apache.yoko.orb.OB.ORBInstance orbInstance, String serverId, String orbId, String[] adapterName, org.omg.IOP.IOR iorTemplate) { orbInstance_ = orbInstance; the_server_id = serverId; the_orb_id = orbId; the_adapter_name = adapterName; the_ior_template = iorTemplate; } // ------------------------------------------------------------------ // Private member implementation // ------------------------------------------------------------------ private org.omg.CORBA.Object makeObject(String repoid, byte[] id, String[] name) { // // Create the actual ORBacus ObjectKey // // TODO: // CreatePersistentObjectKey/CreateTransientObjectKey instead of // populating this ObjectKey data to avoid the copy? // org.apache.yoko.orb.OB.ObjectKeyData obkey = new org.apache.yoko.orb.OB.ObjectKeyData(); obkey.serverId = the_server_id; if (obkey.serverId.length() == 0) obkey.serverId = "_RootPOA"; obkey.poaId = name; obkey.oid = id; obkey.persistent = true; obkey.createTime = 0; byte[] key = org.apache.yoko.orb.OB.ObjectKey.CreateObjectKey(obkey); org.omg.IOP.IOR ior = new org.omg.IOP.IOR(); ior.type_id = repoid; ior.profiles = new org.omg.IOP.TaggedProfile[the_ior_template.profiles.length]; for (int profile = 0; profile < the_ior_template.profiles.length; ++profile) { ior.profiles[profile] = new org.omg.IOP.TaggedProfile(); ior.profiles[profile].tag = the_ior_template.profiles[profile].tag; ior.profiles[profile].profile_data = new byte[the_ior_template.profiles[profile].profile_data.length]; System.arraycopy(the_ior_template.profiles[profile].profile_data, 0, ior.profiles[profile].profile_data, 0, ior.profiles[profile].profile_data.length); } org.omg.IOP.IORHolder iorH = new org.omg.IOP.IORHolder(ior); org.apache.yoko.orb.OCI.AccFactoryRegistry registry = orbInstance_ .getAccFactoryRegistry(); org.apache.yoko.orb.OCI.AccFactory[] factories = registry .get_factories(); for (int i = 0; i < factories.length; ++i) factories[i].change_key(iorH, key); // // Create and return reference // org.apache.yoko.orb.OB.ObjectFactory objectFactory = orbInstance_ .getObjectFactory(); return objectFactory.createObject(iorH.value); } // ------------------------------------------------------------------ // Standard IDL to Java mapping // ------------------------------------------------------------------ public String server_id() { return the_server_id; } public String orb_id() { return the_orb_id; } public String[] adapter_name() { String[] result = new String[the_adapter_name.length]; System.arraycopy(the_adapter_name, 0, result, 0, the_adapter_name.length); return result; } public org.omg.CORBA.Object make_object(String repoid, byte[] id) { return makeObject(repoid, id, the_adapter_name); } public org.omg.CORBA.Object make_object_for(String repoid, byte[] id, String[] adapterName) { return makeObject(repoid, id, adapterName); } }
6,160
0
Create_ds/geronimo-yoko/yoko-core/src/main/java/org/apache/yoko/orb
Create_ds/geronimo-yoko/yoko-core/src/main/java/org/apache/yoko/orb/OBPortableInterceptor/IMRORT_impl.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.yoko.orb.OBPortableInterceptor; import org.apache.yoko.orb.OBPortableInterceptor.IMRORT; // // The IMR ObjectReferenceTemplate // final public class IMRORT_impl extends IMRORT { // ------------------------------------------------------------------ // Public member implementations // ------------------------------------------------------------------ public IMRORT_impl() { } public IMRORT_impl(String serverId, String[] adapterName, org.omg.PortableInterceptor.ObjectReferenceTemplate realTemplate) { the_server_id = serverId; the_adapter_name = adapterName; the_real_template = realTemplate; } // ------------------------------------------------------------------ // Standard IDL to Java mapping // ------------------------------------------------------------------ public String server_id() { return the_real_template.server_id(); } public String orb_id() { return the_real_template.orb_id(); } public String[] adapter_name() { return the_real_template.adapter_name(); } public org.omg.CORBA.Object make_object(String repoid, byte[] id) { // // Create the Yoko IMR ObjectKey // String[] poaId = the_adapter_name; org.apache.yoko.orb.OB.ObjectKeyData obkey = new org.apache.yoko.orb.OB.ObjectKeyData(); obkey.serverId = the_server_id; obkey.poaId = new String[poaId.length]; System.arraycopy(poaId, 0, obkey.poaId, 0, poaId.length); obkey.oid = id; obkey.persistent = true; obkey.createTime = 0; // // CreatePersistentObjectKey/CreateTransientObjectKey instead of // populating this ObjectKey data to avoid the copy? // byte[] key = org.apache.yoko.orb.OB.ObjectKey.CreateObjectKey(obkey); // // Create and return reference using the real template // return the_real_template.make_object(repoid, key); } }
6,161
0
Create_ds/geronimo-yoko/yoko-core/src/main/java/org/apache/yoko/orb
Create_ds/geronimo-yoko/yoko-core/src/main/java/org/apache/yoko/orb/OBPortableInterceptor/IMRORTFactory_impl.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.yoko.orb.OBPortableInterceptor; // // The IMR ObjectReferenceTemplate // final public class IMRORTFactory_impl implements org.omg.CORBA.portable.ValueFactory { public java.io.Serializable read_value( org.omg.CORBA_2_3.portable.InputStream in) { return in.read_value(new IMRORT_impl()); } }
6,162
0
Create_ds/geronimo-yoko/yoko-core/src/main/java/org/apache/yoko/orb
Create_ds/geronimo-yoko/yoko-core/src/main/java/org/apache/yoko/orb/OBPortableInterceptor/TransientORT.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.yoko.orb.OBPortableInterceptor; // // IDL:orb.yoko.apache.org/OBPortableInterceptor/TransientORT:1.0 // /***/ public abstract class TransientORT implements org.omg.CORBA.portable.StreamableValue, ObjectReferenceTemplate { // // IDL:orb.yoko.apache.org/OBPortableInterceptor/TransientORT/the_server_id:1.0 // /***/ protected String the_server_id; // // IDL:orb.yoko.apache.org/OBPortableInterceptor/TransientORT/the_orb_id:1.0 // /***/ protected String the_orb_id; // // IDL:orb.yoko.apache.org/OBPortableInterceptor/TransientORT/the_adapter_name:1.0 // /***/ protected String[] the_adapter_name; // // IDL:orb.yoko.apache.org/OBPortableInterceptor/TransientORT/the_create_time:1.0 // /***/ protected int the_create_time; // // IDL:orb.yoko.apache.org/OBPortableInterceptor/TransientORT/the_ior_template:1.0 // /***/ protected org.omg.IOP.IOR the_ior_template; private static String[] _OB_truncatableIds_ = { TransientORTHelper.id() }; public String[] _truncatable_ids() { return _OB_truncatableIds_; } public void _read(org.omg.CORBA.portable.InputStream in) { the_server_id = org.omg.PortableInterceptor.ServerIdHelper.read(in); the_orb_id = org.omg.PortableInterceptor.ORBIdHelper.read(in); the_adapter_name = org.omg.PortableInterceptor.AdapterNameHelper.read(in); the_create_time = in.read_ulong(); the_ior_template = org.omg.IOP.IORHelper.read(in); } public void _write(org.omg.CORBA.portable.OutputStream out) { org.omg.PortableInterceptor.ServerIdHelper.write(out, the_server_id); org.omg.PortableInterceptor.ORBIdHelper.write(out, the_orb_id); org.omg.PortableInterceptor.AdapterNameHelper.write(out, the_adapter_name); out.write_ulong(the_create_time); org.omg.IOP.IORHelper.write(out, the_ior_template); } public org.omg.CORBA.TypeCode _type() { return TransientORTHelper.type(); } }
6,163
0
Create_ds/geronimo-yoko/yoko-core/src/main/java/org/apache/yoko/orb
Create_ds/geronimo-yoko/yoko-core/src/main/java/org/apache/yoko/orb/OBPortableInterceptor/ORBInitInfo_impl.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.yoko.orb.OBPortableInterceptor; import org.omg.PortableInterceptor.ORBInitInfoPackage.InvalidName; // // An ORBacus-specific derivation of PortableInterceptor::ORBInitInfo // final public class ORBInitInfo_impl extends org.omg.CORBA.LocalObject implements org.apache.yoko.orb.OBPortableInterceptor.ORBInitInfo { // // The ORB // private org.omg.CORBA.ORB orb_; // // Arguments // private String[] args_; // // The ORB id // private String id_; // // The PIManager // private org.apache.yoko.orb.OB.PIManager manager_; // // The initial service mgr // private org.apache.yoko.orb.OB.InitialServiceManager initServiceManager_; // // The Codec Factory // private org.omg.IOP.CodecFactory codecFactory_; // The codec factory private boolean destroy_; // ------------------------------------------------------------------ // Public member implementations // ------------------------------------------------------------------ public ORBInitInfo_impl(org.omg.CORBA.ORB orb, String[] args, String id, org.apache.yoko.orb.OB.PIManager manager, org.apache.yoko.orb.OB.InitialServiceManager initServiceManager, org.omg.IOP.CodecFactory codecFactory) { orb_ = orb; args_ = args; id_ = id; manager_ = manager; initServiceManager_ = initServiceManager; codecFactory_ = codecFactory; destroy_ = false; } // ------------------------------------------------------------------ // Standard IDL to Java mapping // ------------------------------------------------------------------ public String[] arguments() { if (destroy_) throw new org.omg.CORBA.OBJECT_NOT_EXIST( "Object has been destroyed"); String[] seq = new String[args_.length]; System.arraycopy(args_, 0, seq, 0, args_.length); return seq; } public String orb_id() { if (destroy_) throw new org.omg.CORBA.OBJECT_NOT_EXIST( "Object has been destroyed"); return id_; } public org.omg.IOP.CodecFactory codec_factory() { if (destroy_) throw new org.omg.CORBA.OBJECT_NOT_EXIST( "Object has been destroyed"); return codecFactory_; } public void register_initial_reference(String name, org.omg.CORBA.Object obj) throws org.omg.PortableInterceptor.ORBInitInfoPackage.InvalidName { if (destroy_) throw new org.omg.CORBA.OBJECT_NOT_EXIST( "Object has been destroyed"); try { initServiceManager_.addInitialReference(name, obj); } catch (org.omg.CORBA.ORBPackage.InvalidName ex) { throw (org.omg.PortableInterceptor.ORBInitInfoPackage.InvalidName)new org.omg.PortableInterceptor.ORBInitInfoPackage.InvalidName().initCause(ex); } } public org.omg.CORBA.Object resolve_initial_references(String name) throws org.omg.PortableInterceptor.ORBInitInfoPackage.InvalidName { if (destroy_) throw new org.omg.CORBA.OBJECT_NOT_EXIST( "Object has been destroyed"); // TODO: check state try { // we delegate this to the ORB rather than call the initial service manager directly. // because the ORB has a special test to initialize the RootPOA service if it // doesn't exist. return orb_.resolve_initial_references(name); } catch (org.omg.CORBA.ORBPackage.InvalidName ex) { throw (org.omg.PortableInterceptor.ORBInitInfoPackage.InvalidName)new org.omg.PortableInterceptor.ORBInitInfoPackage.InvalidName().initCause(ex); } } public void add_client_request_interceptor( org.omg.PortableInterceptor.ClientRequestInterceptor i) throws org.omg.PortableInterceptor.ORBInitInfoPackage.DuplicateName { if (destroy_) throw new org.omg.CORBA.OBJECT_NOT_EXIST( "Object has been destroyed"); manager_.addClientRequestInterceptor(i); } public void add_server_request_interceptor( org.omg.PortableInterceptor.ServerRequestInterceptor i) throws org.omg.PortableInterceptor.ORBInitInfoPackage.DuplicateName { if (destroy_) throw new org.omg.CORBA.OBJECT_NOT_EXIST( "Object has been destroyed"); manager_.addServerRequestInterceptor(i); } public void add_ior_interceptor(org.omg.PortableInterceptor.IORInterceptor i) throws org.omg.PortableInterceptor.ORBInitInfoPackage.DuplicateName { if (destroy_) throw new org.omg.CORBA.OBJECT_NOT_EXIST( "Object has been destroyed"); manager_.addIORInterceptor(i, false); } public int allocate_slot_id() { if (destroy_) throw new org.omg.CORBA.OBJECT_NOT_EXIST( "Object has been destroyed"); return manager_.allocateSlotId(); } public void register_policy_factory(int type, org.omg.PortableInterceptor.PolicyFactory factory) { if (destroy_) throw new org.omg.CORBA.OBJECT_NOT_EXIST( "Object has been destroyed"); manager_.registerPolicyFactory(type, factory); } public org.omg.CORBA.ORB orb() { if (destroy_) throw new org.omg.CORBA.OBJECT_NOT_EXIST( "Object has been destroyed"); return orb_; } // ------------------------------------------------------------------ // Yoko internal functions // Application programs must not use these functions directly // ------------------------------------------------------------------ public void _OB_destroy() { destroy_ = true; orb_ = null; manager_ = null; initServiceManager_ = null; codecFactory_ = null; } }
6,164
0
Create_ds/geronimo-yoko/yoko-core/src/main/java/org/apache/yoko/orb
Create_ds/geronimo-yoko/yoko-core/src/main/java/org/apache/yoko/orb/OBPortableInterceptor/TransientORT_impl.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.yoko.orb.OBPortableInterceptor; import org.apache.yoko.orb.OBPortableInterceptor.TransientORT; // // The Transient ObjectReferenceTemplate // final public class TransientORT_impl extends TransientORT { // // The ORBInstance object // private org.apache.yoko.orb.OB.ORBInstance orbInstance_; // ------------------------------------------------------------------ // Public member implementations // ------------------------------------------------------------------ public TransientORT_impl(org.apache.yoko.orb.OB.ORBInstance orbInstance) { orbInstance_ = orbInstance; } public TransientORT_impl(org.apache.yoko.orb.OB.ORBInstance orbInstance, String serverId, String orbId, String[] adapterName, int createTime, org.omg.IOP.IOR iorTemplate) { orbInstance_ = orbInstance; the_server_id = serverId; the_orb_id = orbId; the_adapter_name = adapterName; the_create_time = createTime; the_ior_template = iorTemplate; } // ------------------------------------------------------------------ // Private member implementation // ------------------------------------------------------------------ private org.omg.CORBA.Object makeObject(String repoid, byte[] id, String[] name) { // // Create the actual ORBacus ObjectKey // // TODO: // CreatePersistentObjectKey/CreateTransientObjectKey instead of // populating this ObjectKey data to avoid the copy? // org.apache.yoko.orb.OB.ObjectKeyData obkey = new org.apache.yoko.orb.OB.ObjectKeyData(); obkey.serverId = the_server_id; if (obkey.serverId.length() == 0) obkey.serverId = "_RootPOA"; obkey.poaId = name; obkey.oid = id; obkey.persistent = false; obkey.createTime = the_create_time; byte[] key = org.apache.yoko.orb.OB.ObjectKey.CreateObjectKey(obkey); org.omg.IOP.IOR ior = new org.omg.IOP.IOR(); ior.type_id = repoid; ior.profiles = new org.omg.IOP.TaggedProfile[the_ior_template.profiles.length]; for (int profile = 0; profile < the_ior_template.profiles.length; ++profile) { ior.profiles[profile] = new org.omg.IOP.TaggedProfile(); ior.profiles[profile].tag = the_ior_template.profiles[profile].tag; ior.profiles[profile].profile_data = new byte[the_ior_template.profiles[profile].profile_data.length]; System.arraycopy(the_ior_template.profiles[profile].profile_data, 0, ior.profiles[profile].profile_data, 0, ior.profiles[profile].profile_data.length); } org.omg.IOP.IORHolder iorH = new org.omg.IOP.IORHolder(ior); org.apache.yoko.orb.OCI.AccFactoryRegistry registry = orbInstance_ .getAccFactoryRegistry(); org.apache.yoko.orb.OCI.AccFactory[] factories = registry .get_factories(); for (int i = 0; i < factories.length; ++i) factories[i].change_key(iorH, key); // // Create and return reference // org.apache.yoko.orb.OB.ObjectFactory objectFactory = orbInstance_ .getObjectFactory(); return objectFactory.createObject(iorH.value); } // ------------------------------------------------------------------ // Standard IDL to Java mapping // ------------------------------------------------------------------ public String server_id() { return the_server_id; } public String orb_id() { return the_orb_id; } public String[] adapter_name() { String[] result = new String[the_adapter_name.length]; System.arraycopy(the_adapter_name, 0, result, 0, the_adapter_name.length); return result; } public org.omg.CORBA.Object make_object(String repoid, byte[] id) { return makeObject(repoid, id, the_adapter_name); } public org.omg.CORBA.Object make_object_for(String repoid, byte[] id, String[] adapterName) { return makeObject(repoid, id, adapterName); } }
6,165
0
Create_ds/geronimo-yoko/yoko-core/src/main/java/org/apache/yoko/orb
Create_ds/geronimo-yoko/yoko-core/src/main/java/org/apache/yoko/orb/OBPortableInterceptor/IMRORT.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.yoko.orb.OBPortableInterceptor; // // IDL:orb.yoko.apache.org/OBPortableInterceptor/IMRORT:1.0 // /***/ public abstract class IMRORT implements org.omg.CORBA.portable.StreamableValue, org.omg.PortableInterceptor.ObjectReferenceTemplate { // // IDL:orb.yoko.apache.org/OBPortableInterceptor/IMRORT/the_server_id:1.0 // /***/ protected String the_server_id; // // IDL:orb.yoko.apache.org/OBPortableInterceptor/IMRORT/the_adapter_name:1.0 // /***/ protected String[] the_adapter_name; // // IDL:orb.yoko.apache.org/OBPortableInterceptor/IMRORT/the_real_template:1.0 // /***/ protected org.omg.PortableInterceptor.ObjectReferenceTemplate the_real_template; private static String[] _OB_truncatableIds_ = { IMRORTHelper.id() }; public String[] _truncatable_ids() { return _OB_truncatableIds_; } public void _read(org.omg.CORBA.portable.InputStream in) { the_server_id = org.omg.PortableInterceptor.ServerIdHelper.read(in); the_adapter_name = org.omg.PortableInterceptor.AdapterNameHelper.read(in); the_real_template = org.omg.PortableInterceptor.ObjectReferenceTemplateHelper.read(in); } public void _write(org.omg.CORBA.portable.OutputStream out) { org.omg.PortableInterceptor.ServerIdHelper.write(out, the_server_id); org.omg.PortableInterceptor.AdapterNameHelper.write(out, the_adapter_name); org.omg.PortableInterceptor.ObjectReferenceTemplateHelper.write(out, the_real_template); } public org.omg.CORBA.TypeCode _type() { return IMRORTHelper.type(); } }
6,166
0
Create_ds/geronimo-yoko/yoko-core/src/main/java/org/apache/yoko/orb
Create_ds/geronimo-yoko/yoko-core/src/main/java/org/apache/yoko/orb/OBPortableInterceptor/ObjectReferenceTemplateHelper.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.yoko.orb.OBPortableInterceptor; // // IDL:orb.yoko.apache.org/OBPortableInterceptor/ObjectReferenceTemplate:1.0 // final public class ObjectReferenceTemplateHelper { public static void insert(org.omg.CORBA.Any any, ObjectReferenceTemplate val) { any.insert_Value(val, type()); } public static ObjectReferenceTemplate extract(org.omg.CORBA.Any any) { if(any.type().equivalent(type())) { java.io.Serializable _ob_v = any.extract_Value(); if(_ob_v == null || _ob_v instanceof ObjectReferenceTemplate) return (ObjectReferenceTemplate)_ob_v; } throw new org.omg.CORBA.BAD_OPERATION( org.apache.yoko.orb.OB.MinorCodes .describeBadOperation(org.apache.yoko.orb.OB.MinorCodes.MinorTypeMismatch), org.apache.yoko.orb.OB.MinorCodes.MinorTypeMismatch, org.omg.CORBA.CompletionStatus.COMPLETED_NO); } private static org.omg.CORBA.TypeCode typeCode_; public static org.omg.CORBA.TypeCode type() { if(typeCode_ == null) { org.omg.CORBA.ORB orb = org.omg.CORBA.ORB.init(); org.omg.CORBA.ValueMember[] members = new org.omg.CORBA.ValueMember[0]; typeCode_ = orb.create_value_tc(id(), "ObjectReferenceTemplate", org.omg.CORBA.VM_ABSTRACT.value, null, members); } return typeCode_; } public static String id() { return "IDL:orb.yoko.apache.org/OBPortableInterceptor/ObjectReferenceTemplate:1.0"; } public static ObjectReferenceTemplate read(org.omg.CORBA.portable.InputStream in) { if(!(in instanceof org.omg.CORBA_2_3.portable.InputStream)) { throw new org.omg.CORBA.BAD_PARAM(org.apache.yoko.orb.OB.MinorCodes .describeBadParam(org.apache.yoko.orb.OB.MinorCodes.MinorIncompatibleObjectType), org.apache.yoko.orb.OB.MinorCodes.MinorIncompatibleObjectType, org.omg.CORBA.CompletionStatus.COMPLETED_NO); } return (ObjectReferenceTemplate)((org.omg.CORBA_2_3.portable.InputStream)in).read_value(id()); } public static void write(org.omg.CORBA.portable.OutputStream out, ObjectReferenceTemplate val) { if(!(out instanceof org.omg.CORBA_2_3.portable.OutputStream)) { throw new org.omg.CORBA.BAD_PARAM(org.apache.yoko.orb.OB.MinorCodes .describeBadParam(org.apache.yoko.orb.OB.MinorCodes.MinorIncompatibleObjectType), org.apache.yoko.orb.OB.MinorCodes.MinorIncompatibleObjectType, org.omg.CORBA.CompletionStatus.COMPLETED_NO); } ((org.omg.CORBA_2_3.portable.OutputStream)out).write_value(val, id()); } }
6,167
0
Create_ds/geronimo-yoko/yoko-core/src/main/java/org/apache/yoko/orb
Create_ds/geronimo-yoko/yoko-core/src/main/java/org/apache/yoko/orb/OBPortableInterceptor/ObjectReferenceTemplateHolder.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.yoko.orb.OBPortableInterceptor; // // IDL:orb.yoko.apache.org/OBPortableInterceptor/ObjectReferenceTemplate:1.0 // final public class ObjectReferenceTemplateHolder implements org.omg.CORBA.portable.Streamable { public ObjectReferenceTemplate value; public ObjectReferenceTemplateHolder() { } public ObjectReferenceTemplateHolder(ObjectReferenceTemplate initial) { value = initial; } public void _read(org.omg.CORBA.portable.InputStream in) { value = ObjectReferenceTemplateHelper.read(in); } public void _write(org.omg.CORBA.portable.OutputStream out) { ObjectReferenceTemplateHelper.write(out, value); } public org.omg.CORBA.TypeCode _type() { return ObjectReferenceTemplateHelper.type(); } }
6,168
0
Create_ds/geronimo-yoko/yoko-core/src/main/java/org/apache/yoko/orb
Create_ds/geronimo-yoko/yoko-core/src/main/java/org/apache/yoko/orb/OBPortableInterceptor/ORBInitInfo.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.yoko.orb.OBPortableInterceptor; // // IDL:orb.yoko.apache.org/OBPortableInterceptor/ORBInitInfo:1.0 // /** * * This interface is a proprietary extension to the standard ORBInitInfo. * * @see PortableInterceptor::ORBInitInfo * **/ public interface ORBInitInfo extends ORBInitInfoOperations, org.omg.PortableInterceptor.ORBInitInfo { }
6,169
0
Create_ds/geronimo-yoko/yoko-core/src/main/java/org/apache/yoko/orb
Create_ds/geronimo-yoko/yoko-core/src/main/java/org/apache/yoko/orb/OAD/_ProcessEndpointStub.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.yoko.orb.OAD; // // IDL:orb.yoko.apache.org/OAD/ProcessEndpoint:1.0 // public class _ProcessEndpointStub extends org.omg.CORBA.portable.ObjectImpl implements ProcessEndpoint { private static final String[] _ob_ids_ = { "IDL:orb.yoko.apache.org/OAD/ProcessEndpoint:1.0", }; public String[] _ids() { return _ob_ids_; } final public static java.lang.Class _ob_opsClass = ProcessEndpointOperations.class; // // IDL:orb.yoko.apache.org/OAD/ProcessEndpoint/reestablish_link:1.0 // public void reestablish_link(ProcessEndpointManager _ob_a0) { while(true) { if(!this._is_local()) { org.omg.CORBA.portable.OutputStream out = null; org.omg.CORBA.portable.InputStream in = null; try { out = _request("reestablish_link", false); ProcessEndpointManagerHelper.write(out, _ob_a0); in = _invoke(out); return; } catch(org.omg.CORBA.portable.RemarshalException _ob_ex) { continue; } catch(org.omg.CORBA.portable.ApplicationException _ob_aex) { final String _ob_id = _ob_aex.getId(); in = _ob_aex.getInputStream(); throw (org.omg.CORBA.UNKNOWN)new org.omg.CORBA.UNKNOWN("Unexpected User Exception: " + _ob_id).initCause(_ob_aex); } finally { _releaseReply(in); } } else { org.omg.CORBA.portable.ServantObject _ob_so = _servant_preinvoke("reestablish_link", _ob_opsClass); if(_ob_so == null) continue; ProcessEndpointOperations _ob_self = (ProcessEndpointOperations)_ob_so.servant; try { _ob_self.reestablish_link(_ob_a0); return; } finally { _servant_postinvoke(_ob_so); } } } } // // IDL:orb.yoko.apache.org/OAD/ProcessEndpoint/stop:1.0 // public void stop() { while(true) { if(!this._is_local()) { org.omg.CORBA.portable.OutputStream out = null; org.omg.CORBA.portable.InputStream in = null; try { out = _request("stop", true); in = _invoke(out); return; } catch(org.omg.CORBA.portable.RemarshalException _ob_ex) { continue; } catch(org.omg.CORBA.portable.ApplicationException _ob_aex) { final String _ob_id = _ob_aex.getId(); in = _ob_aex.getInputStream(); throw (org.omg.CORBA.UNKNOWN)new org.omg.CORBA.UNKNOWN("Unexpected User Exception: " + _ob_id).initCause(_ob_aex); } finally { _releaseReply(in); } } else { org.omg.CORBA.portable.ServantObject _ob_so = _servant_preinvoke("stop", _ob_opsClass); if(_ob_so == null) continue; ProcessEndpointOperations _ob_self = (ProcessEndpointOperations)_ob_so.servant; try { _ob_self.stop(); return; } finally { _servant_postinvoke(_ob_so); } } } } }
6,170
0
Create_ds/geronimo-yoko/yoko-core/src/main/java/org/apache/yoko/orb
Create_ds/geronimo-yoko/yoko-core/src/main/java/org/apache/yoko/orb/OAD/AlreadyLinkedHolder.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.yoko.orb.OAD; // // IDL:orb.yoko.apache.org/OAD/AlreadyLinked:1.0 // final public class AlreadyLinkedHolder implements org.omg.CORBA.portable.Streamable { public AlreadyLinked value; public AlreadyLinkedHolder() { } public AlreadyLinkedHolder(AlreadyLinked initial) { value = initial; } public void _read(org.omg.CORBA.portable.InputStream in) { value = AlreadyLinkedHelper.read(in); } public void _write(org.omg.CORBA.portable.OutputStream out) { AlreadyLinkedHelper.write(out, value); } public org.omg.CORBA.TypeCode _type() { return AlreadyLinkedHelper.type(); } }
6,171
0
Create_ds/geronimo-yoko/yoko-core/src/main/java/org/apache/yoko/orb
Create_ds/geronimo-yoko/yoko-core/src/main/java/org/apache/yoko/orb/OAD/ProcessEndpoint_impl.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.yoko.orb.OAD; import org.apache.yoko.orb.OAD.AlreadyLinked; import org.apache.yoko.orb.OAD.ProcessEndpoint; import org.apache.yoko.orb.OAD.ProcessEndpointManager; import org.apache.yoko.orb.OAD.ProcessEndpointManagerHelper; import org.apache.yoko.orb.OAD.ProcessEndpointPOA; final public class ProcessEndpoint_impl extends ProcessEndpointPOA { private String name_; private String id_; private org.omg.CORBA.Policy[] pl_; private org.omg.PortableServer.POA poa_; private org.apache.yoko.orb.OB.ORBControl orbControl_; public ProcessEndpoint_impl(String name, String id, org.omg.PortableServer.POA poa, org.apache.yoko.orb.OB.ORBControl orbControl) { name_ = name; id_ = id; poa_ = poa; orbControl_ = orbControl; // // Create a PolicyList for RETRY_ALWAYS // pl_ = new org.omg.CORBA.Policy[1]; pl_[0] = new org.apache.yoko.orb.OB.RetryPolicy_impl( org.apache.yoko.orb.OB.RETRY_ALWAYS.value, 0, 1, false); } public void reestablish_link(ProcessEndpointManager d) { // // Set the retry policy on this object // org.omg.CORBA.Object obj = d._set_policy_override(pl_, org.omg.CORBA.SetOverrideType.SET_OVERRIDE); ProcessEndpointManager manager = ProcessEndpointManagerHelper .narrow(obj); ProcessEndpoint cb = _this(); // // Establish a new link with the ProcessEndpointManager // try { manager.establish_link(name_, id_, 0xFFFFFFFF, cb); } catch (AlreadyLinked ex) { } catch (org.omg.CORBA.SystemException ex) { // logger.error("connect_server failed: " + ex); } } public void stop() { orbControl_.shutdownServer(false); } public org.omg.PortableServer.POA _default_POA() { return poa_; } }
6,172
0
Create_ds/geronimo-yoko/yoko-core/src/main/java/org/apache/yoko/orb
Create_ds/geronimo-yoko/yoko-core/src/main/java/org/apache/yoko/orb/OAD/AlreadyLinkedHelper.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.yoko.orb.OAD; // // IDL:orb.yoko.apache.org/OAD/AlreadyLinked:1.0 // final public class AlreadyLinkedHelper { public static void insert(org.omg.CORBA.Any any, AlreadyLinked val) { org.omg.CORBA.portable.OutputStream out = any.create_output_stream(); write(out, val); any.read_value(out.create_input_stream(), type()); } public static AlreadyLinked extract(org.omg.CORBA.Any any) { if(any.type().equivalent(type())) return read(any.create_input_stream()); else throw new org.omg.CORBA.BAD_OPERATION( org.apache.yoko.orb.OB.MinorCodes .describeBadOperation(org.apache.yoko.orb.OB.MinorCodes.MinorTypeMismatch), org.apache.yoko.orb.OB.MinorCodes.MinorTypeMismatch, org.omg.CORBA.CompletionStatus.COMPLETED_NO); } private static org.omg.CORBA.TypeCode typeCode_; public static org.omg.CORBA.TypeCode type() { if(typeCode_ == null) { org.omg.CORBA.ORB orb = org.omg.CORBA.ORB.init(); org.omg.CORBA.StructMember[] members = new org.omg.CORBA.StructMember[0]; typeCode_ = orb.create_exception_tc(id(), "AlreadyLinked", members); } return typeCode_; } public static String id() { return "IDL:orb.yoko.apache.org/OAD/AlreadyLinked:1.0"; } public static AlreadyLinked read(org.omg.CORBA.portable.InputStream in) { if(!id().equals(in.read_string())) { throw new org.omg.CORBA.MARSHAL( org.apache.yoko.orb.OB.MinorCodes .describeMarshal(org.apache.yoko.orb.OB.MinorCodes.MinorReadIDMismatch), org.apache.yoko.orb.OB.MinorCodes.MinorReadIDMismatch, org.omg.CORBA.CompletionStatus.COMPLETED_NO); } AlreadyLinked _ob_v = new AlreadyLinked(); return _ob_v; } public static void write(org.omg.CORBA.portable.OutputStream out, AlreadyLinked val) { out.write_string(id()); } }
6,173
0
Create_ds/geronimo-yoko/yoko-core/src/main/java/org/apache/yoko/orb
Create_ds/geronimo-yoko/yoko-core/src/main/java/org/apache/yoko/orb/OAD/ProcessEndpointHelper.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.yoko.orb.OAD; // // IDL:orb.yoko.apache.org/OAD/ProcessEndpoint:1.0 // final public class ProcessEndpointHelper { public static void insert(org.omg.CORBA.Any any, ProcessEndpoint val) { any.insert_Object(val, type()); } public static ProcessEndpoint extract(org.omg.CORBA.Any any) { if(any.type().equivalent(type())) return narrow(any.extract_Object()); throw new org.omg.CORBA.BAD_OPERATION( org.apache.yoko.orb.OB.MinorCodes .describeBadOperation(org.apache.yoko.orb.OB.MinorCodes.MinorTypeMismatch), org.apache.yoko.orb.OB.MinorCodes.MinorTypeMismatch, org.omg.CORBA.CompletionStatus.COMPLETED_NO); } private static org.omg.CORBA.TypeCode typeCode_; public static org.omg.CORBA.TypeCode type() { if(typeCode_ == null) { org.omg.CORBA.ORB orb = org.omg.CORBA.ORB.init(); typeCode_ = orb.create_interface_tc(id(), "ProcessEndpoint"); } return typeCode_; } public static String id() { return "IDL:orb.yoko.apache.org/OAD/ProcessEndpoint:1.0"; } public static ProcessEndpoint read(org.omg.CORBA.portable.InputStream in) { org.omg.CORBA.Object _ob_v = in.read_Object(); try { return (ProcessEndpoint)_ob_v; } catch(ClassCastException ex) { } org.omg.CORBA.portable.ObjectImpl _ob_impl; _ob_impl = (org.omg.CORBA.portable.ObjectImpl)_ob_v; _ProcessEndpointStub _ob_stub = new _ProcessEndpointStub(); _ob_stub._set_delegate(_ob_impl._get_delegate()); return _ob_stub; } public static void write(org.omg.CORBA.portable.OutputStream out, ProcessEndpoint val) { out.write_Object(val); } public static ProcessEndpoint narrow(org.omg.CORBA.Object val) { if(val != null) { try { return (ProcessEndpoint)val; } catch(ClassCastException ex) { } if(val._is_a(id())) { org.omg.CORBA.portable.ObjectImpl _ob_impl; _ProcessEndpointStub _ob_stub = new _ProcessEndpointStub(); _ob_impl = (org.omg.CORBA.portable.ObjectImpl)val; _ob_stub._set_delegate(_ob_impl._get_delegate()); return _ob_stub; } throw new org.omg.CORBA.BAD_PARAM(org.apache.yoko.orb.OB.MinorCodes .describeBadParam(org.apache.yoko.orb.OB.MinorCodes.MinorIncompatibleObjectType), org.apache.yoko.orb.OB.MinorCodes.MinorIncompatibleObjectType, org.omg.CORBA.CompletionStatus.COMPLETED_NO); } return null; } public static ProcessEndpoint unchecked_narrow(org.omg.CORBA.Object val) { if(val != null) { try { return (ProcessEndpoint)val; } catch(ClassCastException ex) { } org.omg.CORBA.portable.ObjectImpl _ob_impl; _ProcessEndpointStub _ob_stub = new _ProcessEndpointStub(); _ob_impl = (org.omg.CORBA.portable.ObjectImpl)val; _ob_stub._set_delegate(_ob_impl._get_delegate()); return _ob_stub; } return null; } }
6,174
0
Create_ds/geronimo-yoko/yoko-core/src/main/java/org/apache/yoko/orb
Create_ds/geronimo-yoko/yoko-core/src/main/java/org/apache/yoko/orb/OAD/ProcessEndpointHolder.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.yoko.orb.OAD; // // IDL:orb.yoko.apache.org/OAD/ProcessEndpoint:1.0 // final public class ProcessEndpointHolder implements org.omg.CORBA.portable.Streamable { public ProcessEndpoint value; public ProcessEndpointHolder() { } public ProcessEndpointHolder(ProcessEndpoint initial) { value = initial; } public void _read(org.omg.CORBA.portable.InputStream in) { value = ProcessEndpointHelper.read(in); } public void _write(org.omg.CORBA.portable.OutputStream out) { ProcessEndpointHelper.write(out, value); } public org.omg.CORBA.TypeCode _type() { return ProcessEndpointHelper.type(); } }
6,175
0
Create_ds/geronimo-yoko/yoko-core/src/main/java/org/apache/yoko/orb
Create_ds/geronimo-yoko/yoko-core/src/main/java/org/apache/yoko/orb/OAD/ProcessEndpointPOA.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.yoko.orb.OAD; // // IDL:orb.yoko.apache.org/OAD/ProcessEndpoint:1.0 // public abstract class ProcessEndpointPOA extends org.omg.PortableServer.Servant implements org.omg.CORBA.portable.InvokeHandler, ProcessEndpointOperations { static final String[] _ob_ids_ = { "IDL:orb.yoko.apache.org/OAD/ProcessEndpoint:1.0", }; public ProcessEndpoint _this() { return ProcessEndpointHelper.narrow(super._this_object()); } public ProcessEndpoint _this(org.omg.CORBA.ORB orb) { return ProcessEndpointHelper.narrow(super._this_object(orb)); } public String[] _all_interfaces(org.omg.PortableServer.POA poa, byte[] objectId) { return _ob_ids_; } public org.omg.CORBA.portable.OutputStream _invoke(String opName, org.omg.CORBA.portable.InputStream in, org.omg.CORBA.portable.ResponseHandler handler) { final String[] _ob_names = { "reestablish_link", "stop" }; int _ob_left = 0; int _ob_right = _ob_names.length; int _ob_index = -1; while(_ob_left < _ob_right) { int _ob_m = (_ob_left + _ob_right) / 2; int _ob_res = _ob_names[_ob_m].compareTo(opName); if(_ob_res == 0) { _ob_index = _ob_m; break; } else if(_ob_res > 0) _ob_right = _ob_m; else _ob_left = _ob_m + 1; } if(_ob_index == -1 && opName.charAt(0) == '_') { _ob_left = 0; _ob_right = _ob_names.length; String _ob_ami_op = opName.substring(1); while(_ob_left < _ob_right) { int _ob_m = (_ob_left + _ob_right) / 2; int _ob_res = _ob_names[_ob_m].compareTo(_ob_ami_op); if(_ob_res == 0) { _ob_index = _ob_m; break; } else if(_ob_res > 0) _ob_right = _ob_m; else _ob_left = _ob_m + 1; } } switch(_ob_index) { case 0: // reestablish_link return _OB_op_reestablish_link(in, handler); case 1: // stop return _OB_op_stop(in, handler); } throw new org.omg.CORBA.BAD_OPERATION( org.apache.yoko.orb.OB.MinorCodes .describeBadOperation(org.apache.yoko.orb.OB.MinorCodes.MinorTypeMismatch), org.apache.yoko.orb.OB.MinorCodes.MinorTypeMismatch, org.omg.CORBA.CompletionStatus.COMPLETED_NO); } private org.omg.CORBA.portable.OutputStream _OB_op_reestablish_link(org.omg.CORBA.portable.InputStream in, org.omg.CORBA.portable.ResponseHandler handler) { org.omg.CORBA.portable.OutputStream out = null; ProcessEndpointManager _ob_a0 = ProcessEndpointManagerHelper.read(in); reestablish_link(_ob_a0); out = handler.createReply(); return out; } private org.omg.CORBA.portable.OutputStream _OB_op_stop(org.omg.CORBA.portable.InputStream in, org.omg.CORBA.portable.ResponseHandler handler) { org.omg.CORBA.portable.OutputStream out = null; stop(); out = handler.createReply(); return out; } }
6,176
0
Create_ds/geronimo-yoko/yoko-core/src/main/java/org/apache/yoko/orb
Create_ds/geronimo-yoko/yoko-core/src/main/java/org/apache/yoko/orb/OAD/ProcessEndpoint.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.yoko.orb.OAD; // // IDL:orb.yoko.apache.org/OAD/ProcessEndpoint:1.0 // /** * * The ProcessEndpoint. This is used to reestablish a link between * the ProcessManager and the Process * **/ public interface ProcessEndpoint extends ProcessEndpointOperations, org.omg.CORBA.Object, org.omg.CORBA.portable.IDLEntity { }
6,177
0
Create_ds/geronimo-yoko/yoko-core/src/main/java/org/apache/yoko/orb
Create_ds/geronimo-yoko/yoko-core/src/main/java/org/apache/yoko/orb/OAD/AlreadyLinked.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.yoko.orb.OAD; // // IDL:orb.yoko.apache.org/OAD/AlreadyLinked:1.0 // /** * * This exception is raised if a link already exists between a Process * and the ProcessManager * **/ final public class AlreadyLinked extends org.omg.CORBA.UserException { private static final String _ob_id = "IDL:orb.yoko.apache.org/OAD/AlreadyLinked:1.0"; public AlreadyLinked() { super(_ob_id); } public AlreadyLinked(String _reason) { super(_ob_id + " " + _reason); } }
6,178
0
Create_ds/geronimo-yoko/yoko-core/src/main/java/org/apache/yoko/orb
Create_ds/geronimo-yoko/yoko-core/src/main/java/org/apache/yoko/orb/OAD/ProcessEndpointManagerHelper.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.yoko.orb.OAD; // // IDL:orb.yoko.apache.org/OAD/ProcessEndpointManager:1.0 // final public class ProcessEndpointManagerHelper { public static void insert(org.omg.CORBA.Any any, ProcessEndpointManager val) { any.insert_Object(val, type()); } public static ProcessEndpointManager extract(org.omg.CORBA.Any any) { if(any.type().equivalent(type())) return narrow(any.extract_Object()); throw new org.omg.CORBA.BAD_OPERATION( org.apache.yoko.orb.OB.MinorCodes .describeBadOperation(org.apache.yoko.orb.OB.MinorCodes.MinorTypeMismatch), org.apache.yoko.orb.OB.MinorCodes.MinorTypeMismatch, org.omg.CORBA.CompletionStatus.COMPLETED_NO); } private static org.omg.CORBA.TypeCode typeCode_; public static org.omg.CORBA.TypeCode type() { if(typeCode_ == null) { org.omg.CORBA.ORB orb = org.omg.CORBA.ORB.init(); typeCode_ = orb.create_interface_tc(id(), "ProcessEndpointManager"); } return typeCode_; } public static String id() { return "IDL:orb.yoko.apache.org/OAD/ProcessEndpointManager:1.0"; } public static ProcessEndpointManager read(org.omg.CORBA.portable.InputStream in) { org.omg.CORBA.Object _ob_v = in.read_Object(); try { return (ProcessEndpointManager)_ob_v; } catch(ClassCastException ex) { } org.omg.CORBA.portable.ObjectImpl _ob_impl; _ob_impl = (org.omg.CORBA.portable.ObjectImpl)_ob_v; _ProcessEndpointManagerStub _ob_stub = new _ProcessEndpointManagerStub(); _ob_stub._set_delegate(_ob_impl._get_delegate()); return _ob_stub; } public static void write(org.omg.CORBA.portable.OutputStream out, ProcessEndpointManager val) { out.write_Object(val); } public static ProcessEndpointManager narrow(org.omg.CORBA.Object val) { if(val != null) { try { return (ProcessEndpointManager)val; } catch(ClassCastException ex) { } if(val._is_a(id())) { org.omg.CORBA.portable.ObjectImpl _ob_impl; _ProcessEndpointManagerStub _ob_stub = new _ProcessEndpointManagerStub(); _ob_impl = (org.omg.CORBA.portable.ObjectImpl)val; _ob_stub._set_delegate(_ob_impl._get_delegate()); return _ob_stub; } throw new org.omg.CORBA.BAD_PARAM(org.apache.yoko.orb.OB.MinorCodes .describeBadParam(org.apache.yoko.orb.OB.MinorCodes.MinorIncompatibleObjectType), org.apache.yoko.orb.OB.MinorCodes.MinorIncompatibleObjectType, org.omg.CORBA.CompletionStatus.COMPLETED_NO); } return null; } public static ProcessEndpointManager unchecked_narrow(org.omg.CORBA.Object val) { if(val != null) { try { return (ProcessEndpointManager)val; } catch(ClassCastException ex) { } org.omg.CORBA.portable.ObjectImpl _ob_impl; _ProcessEndpointManagerStub _ob_stub = new _ProcessEndpointManagerStub(); _ob_impl = (org.omg.CORBA.portable.ObjectImpl)val; _ob_stub._set_delegate(_ob_impl._get_delegate()); return _ob_stub; } return null; } }
6,179
0
Create_ds/geronimo-yoko/yoko-core/src/main/java/org/apache/yoko/orb
Create_ds/geronimo-yoko/yoko-core/src/main/java/org/apache/yoko/orb/OAD/ProcessEndpointManager.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.yoko.orb.OAD; // // IDL:orb.yoko.apache.org/OAD/ProcessEndpointManager:1.0 // /** * * The ProcessEndpointManager. This endpoint tracks links * between the ProcessManager and spawned processes * **/ public interface ProcessEndpointManager extends ProcessEndpointManagerOperations, org.omg.CORBA.Object, org.omg.CORBA.portable.IDLEntity { }
6,180
0
Create_ds/geronimo-yoko/yoko-core/src/main/java/org/apache/yoko/orb
Create_ds/geronimo-yoko/yoko-core/src/main/java/org/apache/yoko/orb/OAD/ProcessEndpointManagerHolder.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.yoko.orb.OAD; // // IDL:orb.yoko.apache.org/OAD/ProcessEndpointManager:1.0 // final public class ProcessEndpointManagerHolder implements org.omg.CORBA.portable.Streamable { public ProcessEndpointManager value; public ProcessEndpointManagerHolder() { } public ProcessEndpointManagerHolder(ProcessEndpointManager initial) { value = initial; } public void _read(org.omg.CORBA.portable.InputStream in) { value = ProcessEndpointManagerHelper.read(in); } public void _write(org.omg.CORBA.portable.OutputStream out) { ProcessEndpointManagerHelper.write(out, value); } public org.omg.CORBA.TypeCode _type() { return ProcessEndpointManagerHelper.type(); } }
6,181
0
Create_ds/geronimo-yoko/yoko-core/src/main/java/org/apache/yoko/orb
Create_ds/geronimo-yoko/yoko-core/src/main/java/org/apache/yoko/orb/OAD/ProcessEndpointManagerOperations.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.yoko.orb.OAD; // // IDL:orb.yoko.apache.org/OAD/ProcessEndpointManager:1.0 // /** * * The ProcessEndpointManager. This endpoint tracks links * between the ProcessManager and spawned processes * **/ public interface ProcessEndpointManagerOperations { // // IDL:orb.yoko.apache.org/OAD/ProcessEndpointManager/establish_link:1.0 // /** * * Called by the Process to establish a link between the Process * and the ProcessManager * * @param server The server name * @param instance The Server Instance ID * @param pid The Server Process ID * @param endpoint The ProcessEndpoint * * @exception org.apache.yoko.orb.OAD.AlreadyLinked Thrown if the process is already linked * **/ void establish_link(String server, String id, int pid, ProcessEndpoint endpoint) throws AlreadyLinked; }
6,182
0
Create_ds/geronimo-yoko/yoko-core/src/main/java/org/apache/yoko/orb
Create_ds/geronimo-yoko/yoko-core/src/main/java/org/apache/yoko/orb/OAD/ProcessEndpointManagerPOA.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.yoko.orb.OAD; // // IDL:orb.yoko.apache.org/OAD/ProcessEndpointManager:1.0 // public abstract class ProcessEndpointManagerPOA extends org.omg.PortableServer.Servant implements org.omg.CORBA.portable.InvokeHandler, ProcessEndpointManagerOperations { static final String[] _ob_ids_ = { "IDL:orb.yoko.apache.org/OAD/ProcessEndpointManager:1.0", }; public ProcessEndpointManager _this() { return ProcessEndpointManagerHelper.narrow(super._this_object()); } public ProcessEndpointManager _this(org.omg.CORBA.ORB orb) { return ProcessEndpointManagerHelper.narrow(super._this_object(orb)); } public String[] _all_interfaces(org.omg.PortableServer.POA poa, byte[] objectId) { return _ob_ids_; } public org.omg.CORBA.portable.OutputStream _invoke(String opName, org.omg.CORBA.portable.InputStream in, org.omg.CORBA.portable.ResponseHandler handler) { final String[] _ob_names = { "establish_link" }; int _ob_left = 0; int _ob_right = _ob_names.length; int _ob_index = -1; while(_ob_left < _ob_right) { int _ob_m = (_ob_left + _ob_right) / 2; int _ob_res = _ob_names[_ob_m].compareTo(opName); if(_ob_res == 0) { _ob_index = _ob_m; break; } else if(_ob_res > 0) _ob_right = _ob_m; else _ob_left = _ob_m + 1; } if(_ob_index == -1 && opName.charAt(0) == '_') { _ob_left = 0; _ob_right = _ob_names.length; String _ob_ami_op = opName.substring(1); while(_ob_left < _ob_right) { int _ob_m = (_ob_left + _ob_right) / 2; int _ob_res = _ob_names[_ob_m].compareTo(_ob_ami_op); if(_ob_res == 0) { _ob_index = _ob_m; break; } else if(_ob_res > 0) _ob_right = _ob_m; else _ob_left = _ob_m + 1; } } switch(_ob_index) { case 0: // establish_link return _OB_op_establish_link(in, handler); } throw new org.omg.CORBA.BAD_OPERATION(); } private org.omg.CORBA.portable.OutputStream _OB_op_establish_link(org.omg.CORBA.portable.InputStream in, org.omg.CORBA.portable.ResponseHandler handler) { org.omg.CORBA.portable.OutputStream out = null; try { String _ob_a0 = in.read_string(); String _ob_a1 = in.read_string(); int _ob_a2 = org.apache.yoko.orb.IMR.ProcessIDHelper.read(in); ProcessEndpoint _ob_a3 = ProcessEndpointHelper.read(in); establish_link(_ob_a0, _ob_a1, _ob_a2, _ob_a3); out = handler.createReply(); } catch(AlreadyLinked _ob_ex) { out = handler.createExceptionReply(); AlreadyLinkedHelper.write(out, _ob_ex); } return out; } }
6,183
0
Create_ds/geronimo-yoko/yoko-core/src/main/java/org/apache/yoko/orb
Create_ds/geronimo-yoko/yoko-core/src/main/java/org/apache/yoko/orb/OAD/ProcessEndpointOperations.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.yoko.orb.OAD; // // IDL:orb.yoko.apache.org/OAD/ProcessEndpoint:1.0 // /** * * The ProcessEndpoint. This is used to reestablish a link between * the ProcessManager and the Process * **/ public interface ProcessEndpointOperations { // // IDL:orb.yoko.apache.org/OAD/ProcessEndpoint/reestablish_link:1.0 // /** * * Called by the ProcessManager to establish a link between the * Process and the ProcessManager * * @param endpoint The ProcessEndpointManager with which to establish * a link **/ void reestablish_link(ProcessEndpointManager endpoint); // // IDL:orb.yoko.apache.org/OAD/ProcessEndpoint/stop:1.0 // /** * * Called by the ProcessManager to inform the Process to shutdown. * **/ void stop(); }
6,184
0
Create_ds/geronimo-yoko/yoko-core/src/main/java/org/apache/yoko/orb
Create_ds/geronimo-yoko/yoko-core/src/main/java/org/apache/yoko/orb/OAD/_ProcessEndpointManagerStub.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.yoko.orb.OAD; // // IDL:orb.yoko.apache.org/OAD/ProcessEndpointManager:1.0 // public class _ProcessEndpointManagerStub extends org.omg.CORBA.portable.ObjectImpl implements ProcessEndpointManager { private static final String[] _ob_ids_ = { "IDL:orb.yoko.apache.org/OAD/ProcessEndpointManager:1.0", }; public String[] _ids() { return _ob_ids_; } final public static java.lang.Class _ob_opsClass = ProcessEndpointManagerOperations.class; // // IDL:orb.yoko.apache.org/OAD/ProcessEndpointManager/establish_link:1.0 // public void establish_link(String _ob_a0, String _ob_a1, int _ob_a2, ProcessEndpoint _ob_a3) throws AlreadyLinked { while(true) { if(!this._is_local()) { org.omg.CORBA.portable.OutputStream out = null; org.omg.CORBA.portable.InputStream in = null; try { out = _request("establish_link", true); out.write_string(_ob_a0); out.write_string(_ob_a1); org.apache.yoko.orb.IMR.ProcessIDHelper.write(out, _ob_a2); ProcessEndpointHelper.write(out, _ob_a3); in = _invoke(out); return; } catch(org.omg.CORBA.portable.RemarshalException _ob_ex) { continue; } catch(org.omg.CORBA.portable.ApplicationException _ob_aex) { final String _ob_id = _ob_aex.getId(); in = _ob_aex.getInputStream(); if(_ob_id.equals(AlreadyLinkedHelper.id())) throw AlreadyLinkedHelper.read(in); throw (org.omg.CORBA.UNKNOWN)new org.omg.CORBA.UNKNOWN("Unexpected User Exception: " + _ob_id).initCause(_ob_aex); } finally { _releaseReply(in); } } else { org.omg.CORBA.portable.ServantObject _ob_so = _servant_preinvoke("establish_link", _ob_opsClass); if(_ob_so == null) continue; ProcessEndpointManagerOperations _ob_self = (ProcessEndpointManagerOperations)_ob_so.servant; try { _ob_self.establish_link(_ob_a0, _ob_a1, _ob_a2, _ob_a3); return; } finally { _servant_postinvoke(_ob_so); } } } } }
6,185
0
Create_ds/geronimo-yoko/yoko-core/src/main/java/org/apache/yoko/orb
Create_ds/geronimo-yoko/yoko-core/src/main/java/org/apache/yoko/orb/activator/Activator.java
package org.apache.yoko.orb.activator; import org.apache.yoko.osgi.locator.activator.AbstractBundleActivator; public class Activator extends AbstractBundleActivator { public Activator() { super(new Info[] {new Info("org.apache.yoko.orb.CORBA.ORB", "org.apache.yoko.orb.CORBA.ORB", 1), new Info("org.apache.yoko.orb.CORBA.ORBSingleton", "org.apache.yoko.orb.CORBA.ORBSingleton", 1) }, new Info[] {new Info("org.omg.CORBA.ORBClass", "org.apache.yoko.orb.CORBA.ORB", 1), new Info("org.omg.CORBA.ORBSingletonClass", "org.apache.yoko.orb.CORBA.ORBSingleton", 1) }); } }
6,186
0
Create_ds/geronimo-yoko/yoko-core/src/main/java/org/apache/yoko/orb
Create_ds/geronimo-yoko/yoko-core/src/main/java/org/apache/yoko/orb/csi/CSIClientRequestInterceptor.java
/** * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.yoko.orb.csi; import java.util.logging.Logger; import org.omg.CORBA.Any; import org.omg.CORBA.CompletionStatus; import org.omg.CORBA.MARSHAL; import org.omg.CORBA.UserException; import org.omg.CSI.*; import org.omg.CSIIOP.*; import org.omg.GSSUP.InitialContextToken; import org.omg.IOP.Codec; import org.omg.IOP.SecurityAttributeService; import org.omg.IOP.ServiceContext; import org.omg.IOP.TaggedComponent; import org.omg.PortableInterceptor.ClientRequestInfo; import org.omg.PortableInterceptor.ForwardRequest; public class CSIClientRequestInterceptor extends CSIInterceptorBase implements org.omg.PortableInterceptor.ClientRequestInterceptor { CSIClientRequestInterceptor(Codec codec) { super(codec); } private static final Logger log = Logger .getLogger(CSIClientRequestInterceptor.class.getName()); // // CLIENT REQUEST API // public void send_request(ClientRequestInfo ri) throws ForwardRequest { org.omg.CORBA.Object target = ri.effective_target(); if (target instanceof org.omg.CORBA.portable.ObjectImpl) { boolean isLocal = ((org.omg.CORBA.portable.ObjectImpl) target) ._is_local(); // save value of isLocal if (ri.response_expected()) CallStatus.pushIsLocal(isLocal); // ignore CSI for local calls if (isLocal) { return; } } boolean target_supports_gssup = false; boolean target_requires_gssup = false; CompoundSecMech mech = null; try { TaggedComponent tc = ri .get_effective_component(TAG_CSI_SEC_MECH_LIST.value); byte[] data = tc.component_data; Any sl_any = codec.decode_value(data, CompoundSecMechListHelper .type()); CompoundSecMechList sl = CompoundSecMechListHelper.extract(sl_any); if (sl.mechanism_list.length == 0) { log.fine("empty sec mech list"); return; } mech = sl.mechanism_list[0]; } catch (org.omg.CORBA.BAD_PARAM ex) { log.fine("no security mechanism"); return; } catch (UserException e) { MARSHAL me = new MARSHAL("cannot decode local security descriptor", 0, CompletionStatus.COMPLETED_NO); me.initCause(e); throw me; } log.fine("transport_mech tag = " + mech.transport_mech.tag); String target_name = null; AS_ContextSec as = mech.as_context_mech; if (as != null) { if (java.util.Arrays.equals(GSSUP_OID, as.client_authentication_mech)) { target_requires_gssup = (as.target_requires & EstablishTrustInClient.value) != 0; target_supports_gssup = (as.target_supports & EstablishTrustInClient.value) != 0; target_name = decodeGSSExportedName(as.target_name); log.fine("decoded target name = " + target_name); } } boolean support_gssup_delegation = false; boolean support_x500_delegation = false; if (!target_supports_gssup) { SAS_ContextSec sas = mech.sas_context_mech; for (int i = 0; i < sas.supported_naming_mechanisms.length; i++) { if (java.util.Arrays.equals(GSSUP_OID, sas.supported_naming_mechanisms[i]) && (sas.supported_identity_types & ITTPrincipalName.value) != 0) { support_gssup_delegation = true; log.fine("target supports GSSUP identity delegation"); break; } } if ((sas.supported_identity_types & ITTDistinguishedName.value) != 0) { support_x500_delegation = true; } if (!support_gssup_delegation && !support_x500_delegation) { log.fine("target supports security, but not GSSUP/X500"); return; } } else { log.fine("AS SPEC:" + " target_supports=" + target_supports_gssup + " target_requires=" + target_requires_gssup); } AuthenticationInfo authInfo = SecurityContext.getAuthenticationInfo(); if (authInfo == null) { log.fine("no auth info"); return; } String name = authInfo.getPrincipalName(); String realm = authInfo.getRealm(); String password = authInfo.getPassword(); SASContextBody sasBody = new SASContextBody(); EstablishContext establishMsg = new EstablishContext(); // Indicate stateless CSS establishMsg.client_context_id = 0; // Make empty authorization token list establishMsg.authorization_token = EMPTY_AUTH_ELEMENT; String scopedUserName = name + "@" + realm; if (support_gssup_delegation) { establishMsg.client_authentication_token = EMPTY_BARR; // // indicate identitytoken as ITTPrincipalName // IdentityToken identityToken = new IdentityToken(); identityToken .principal_name(encapsulateByteArray(encodeGSSExportedName(scopedUserName))); establishMsg.identity_token = identityToken; log.fine("send_request, name: \"" + scopedUserName + "\""); } else { // Make GSSUP InitialContextToken InitialContextToken gssupToken = new InitialContextToken(); gssupToken.username = utf8encode(scopedUserName); gssupToken.target_name = encodeGSSExportedName(realm); gssupToken.password = utf8encode(password); establishMsg.client_authentication_token = encodeGSSUPToken(gssupToken); // Indicate identity token is ITTAbsent IdentityToken identityToken = new IdentityToken(); identityToken.absent(true); establishMsg.identity_token = identityToken; log.fine("send_request, name: \"" + scopedUserName + "\", pw: \"" + password + "\""); } sasBody.establish_msg(establishMsg); ri.add_request_service_context(encodeSASContextBody(sasBody), true); } public void send_poll(ClientRequestInfo ri) { } public void receive_reply(ClientRequestInfo ri) { // ignore tx for local calls if (CallStatus.popIsLocal()) { return; } ServiceContext serviceContext; try { serviceContext = ri .get_reply_service_context(SecurityAttributeService.value); } catch (org.omg.CORBA.BAD_PARAM ex) { serviceContext = null; } SASContextBody sasBody = null; if (serviceContext != null) { sasBody = decodeSASContextBody(serviceContext); switch (sasBody.discriminator()) { case MTEstablishContext.value: case MTMessageInContext.value: // Unexpected log.severe("Unexpected message of type " + sasBody.discriminator()); break; case MTCompleteEstablishContext.value: // Things went well break; case MTContextError.value: // Things did not go well break; } } } public void receive_exception(ClientRequestInfo ri) throws ForwardRequest { log.fine("receive_exception"); receive_reply(ri); } public void receive_other(ClientRequestInfo ri) throws ForwardRequest { log.fine("receive_other"); receive_reply(ri); } public String name() { return "CSI Client Interceptor"; } public void destroy() { } }
6,187
0
Create_ds/geronimo-yoko/yoko-core/src/main/java/org/apache/yoko/orb
Create_ds/geronimo-yoko/yoko-core/src/main/java/org/apache/yoko/orb/csi/CSIInterceptorBase.java
/** * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.yoko.orb.csi; import java.util.logging.Logger; import org.omg.CORBA.Any; import org.omg.CORBA.CompletionStatus; import org.omg.CORBA.LocalObject; import org.omg.CORBA.MARSHAL; import org.omg.CORBA.ORB; import org.omg.CORBA.OctetSeqHelper; import org.omg.CORBA.UserException; import org.omg.CSI.AuthorizationElement; import org.omg.CSI.SASContextBody; import org.omg.CSI.SASContextBodyHelper; import org.omg.CSIIOP.CompoundSecMechList; import org.omg.CSIIOP.CompoundSecMechListHelper; import org.omg.CSIIOP.CompoundSecMechanismsHelper; import org.omg.GSSUP.InitialContextToken; import org.omg.GSSUP.InitialContextTokenHelper; import org.omg.IOP.Codec; import org.omg.IOP.CodecPackage.FormatMismatch; import org.omg.IOP.CodecPackage.InvalidTypeForEncoding; import org.omg.IOP.CodecPackage.TypeMismatch; import org.omg.IOP.SecurityAttributeService; import org.omg.IOP.ServiceContext; import org.omg.IOP.TaggedComponent; public abstract class CSIInterceptorBase extends LocalObject { private static final Logger log = Logger.getLogger(CSIInterceptorBase.class.getName()); static final AuthorizationElement[] EMPTY_AUTH_ELEMENT = new AuthorizationElement[0]; static final byte[] EMPTY_BARR = new byte[0]; ORB orb; final protected Codec codec; CSIInterceptorBase(Codec codec) { this.codec = codec; } /** * we need to ORB to be able to create the Any's into which we encode * various info */ protected final ORB getOrb() { if (orb == null) { orb = ORB.init(); } return orb; } SASContextBody decodeSASContextBody(ServiceContext sasSC) { // // Decode encapsulated SAS context body // /* * org.omg.CORBA.portable.InputStream in = * Porting.open_encapsulated_input_stream( sasSC.context_data, 0, * sasSC.context_data.length, getOrb()); * * return SASContextBodyHelper.read(in); */ Any any; try { any = codec.decode_value(sasSC.context_data, SASContextBodyHelper .type()); } catch (FormatMismatch ex) { throw (org.omg.CORBA.INTERNAL)new org.omg.CORBA.INTERNAL(ex.getMessage()).initCause(ex); } catch (TypeMismatch ex) { throw (org.omg.CORBA.INTERNAL)new org.omg.CORBA.INTERNAL(ex.getMessage()).initCause(ex); } return SASContextBodyHelper.extract(any); } CompoundSecMechList decodeCompoundSecMechList(TaggedComponent seccomp) throws FormatMismatch, TypeMismatch { /* * org.omg.CORBA.portable.InputStream in = openEncapsulatedInputStream( * seccomp.component_data, 0, seccomp.component_data.length, getOrb()); * * return CompoundSecMechListHelper.read(in); */ Any any = codec.decode_value(seccomp.component_data, CompoundSecMechanismsHelper.type()); return CompoundSecMechListHelper.extract(any); } byte[] utf8encode(String text) { if (text == null) { return EMPTY_BARR; } else { try { return text.getBytes("UTF8"); } catch (java.io.UnsupportedEncodingException ex) { throw (org.omg.CORBA.INTERNAL)new org.omg.CORBA.INTERNAL(ex.getMessage()).initCause(ex); } } } String utf8decode(byte[] data) { try { return new String(data, "UTF8"); } catch (java.io.UnsupportedEncodingException ex) { throw (org.omg.CORBA.INTERNAL)new org.omg.CORBA.INTERNAL(ex.getMessage()).initCause(ex); } } static final byte[] GSSUP_OID = {0x06, // OBJECT IDENTIFIER 6, // length of OID (2 * 40 + 23), // ISO[2]*40 + INTERNATIONAL[23] (byte) 0x81, // 0x80 | (OMG[130] >> 7) 130 & 0x7f, // OMG[130] & 0x7f 1, // SECURITY[1] 1, // AUTHENTICATION[1] 1 // GSSUP-MECH[1] }; byte[] encapsulateByteArray(byte[] data) { // org.omg.CORBA.portable.OutputStream out = // Porting.create_encapsulated_output_stream(); // // out.write_long(data.length); // out.write_octet_array(data, 0, data.length); // // return Porting.extract_data(out); Any a = getOrb().create_any(); OctetSeqHelper.insert(a, data); try { return codec.encode_value(a); } catch (InvalidTypeForEncoding e) { MARSHAL me = new MARSHAL("cannot encode security descriptor", 0, CompletionStatus.COMPLETED_NO); me.initCause(e); throw me; } } byte[] encodeGSSUPToken(InitialContextToken gssupToken) { // first, create the Any encoding of the token Any a = getOrb().create_any(); InitialContextTokenHelper.insert(a, gssupToken); //OutputStream out = a.create_output_stream(); //a.type(InitialContextTokenHelper.type()); //InitialContextTokenHelper.write(out, gssupToken); //InputStream in = out.create_input_stream(); //a.read_value(in, InitialContextTokenHelper.type()); byte[] data; try { data = codec.encode_value(a); } catch (InvalidTypeForEncoding e) { MARSHAL me = new MARSHAL("cannot encode security descriptor", 0, CompletionStatus.COMPLETED_NO); me.initCause(e); throw me; } // // next, wrap the byte encoding in the ASN.1 magic // int len = data.length + GSSUP_OID.length; if (len < (1 << 7)) { byte[] result = new byte[len + 2]; result[0] = 0x60; result[1] = (byte) len; System.arraycopy(GSSUP_OID, 0, result, 2, GSSUP_OID.length); System.arraycopy(data, 0, result, 10, data.length); return result; } else if (len < (1 << 14)) { byte[] result = new byte[len + 3]; result[0] = 0x60; result[1] = (byte) ((byte) (len >> 7) | (byte) 0x80); result[2] = ((byte) (len & 0x7f)); System.arraycopy(GSSUP_OID, 0, result, 3, GSSUP_OID.length); System.arraycopy(data, 0, result, 11, data.length); return result; } else if (len < (1 << 21)) { byte[] result = new byte[len + 4]; result[0] = 0x60; result[2] = (byte) ((byte) 0x80 | (byte) (0x7f & (len >> 14))); result[1] = (byte) ((byte) 0x80 | (byte) (0x7f & (len >> 7))); result[3] = (byte) (len & 0x7f); System.arraycopy(GSSUP_OID, 0, result, 4, GSSUP_OID.length); System.arraycopy(data, 0, result, 12, data.length); return result; } else { throw new org.omg.CORBA.INTERNAL("user/password too long"); } // return data; } InitialContextToken decodeGSSUPToken(byte[] data) { if (data[0] != 0x60) throw new org.omg.CORBA.MARSHAL("Invalid Token"); int idx = 1; int len = 0; byte b; // collect length do { len <<= 7; len |= (b = data[idx++]) & 0x7f; } while ((b & 0x80) == 0x80); if ((len + idx) != data.length) throw new org.omg.CORBA.MARSHAL("Bad Token Size"); for (int i = 0; i < GSSUP_OID.length; i++) { if (data[idx + i] != GSSUP_OID[i]) { throw new org.omg.CORBA.NO_PERMISSION("Not GSSUP_OID"); } } idx += GSSUP_OID.length; byte[] token = new byte[data.length - idx]; System.arraycopy(data, idx, token, 0, data.length - idx); try { Any a = codec.decode_value(data, InitialContextTokenHelper.type()); return InitialContextTokenHelper.extract(a); } catch (UserException e) { MARSHAL me = new MARSHAL("cannot decode local security descriptor", 0, CompletionStatus.COMPLETED_NO); me.initCause(e); throw me; } } ServiceContext encodeSASContextBody(SASContextBody sasBody) { // // Create encapsulation for SAS context body // Any a = getOrb().create_any(); SASContextBodyHelper.insert(a, sasBody); // wrap the ANY in an encapsulation byte[] data; try { data = codec.encode_value(a); } catch (UserException ex) { MARSHAL me = new MARSHAL("cannot encode local security descriptor", 0, CompletionStatus.COMPLETED_NO); me.initCause(ex); throw me; } return new ServiceContext(SecurityAttributeService.value, data); } // // thread-local mechanism to shortcut local calls // static class CallStatus { boolean isLocal; CallStatus prev; CallStatus(boolean l, CallStatus p) { isLocal = l; prev = p; } static ThreadLocal status = new ThreadLocal(); static void pushIsLocal(boolean isLocal) { CallStatus cs = new CallStatus(isLocal, (CallStatus) status.get()); status.set(cs); } static boolean peekIsLocal() { CallStatus cs = (CallStatus) status.get(); if (cs == null) return false; else return cs.isLocal; } static boolean popIsLocal() { CallStatus cs = (CallStatus) status.get(); if (cs == null) return false; status.set(cs.prev); return cs.isLocal; } } /** * RFC 2743, Section 3.2. Construct a GSS_ExportedName for a GSSUP domain * given a String */ byte[] encodeGSSExportedName(String value) { byte[] name_data = utf8encode(value); int len = 8 + name_data.length + GSSUP_OID.length; byte[] result = new byte[len]; result[0] = 0x04; // Token Identifier result[1] = 0x01; result[2] = 0x00; // 2-byte Length of GSSUP_OID result[3] = (byte) GSSUP_OID.length; // the OID for (int i = 0; i < GSSUP_OID.length; i++) { result[4 + i] = GSSUP_OID[i]; } int name_len = name_data.length; int idx = 4 + GSSUP_OID.length; // 4-byte length of name result[idx + 0] = (byte) ((name_len >> 24) & 0xff); result[idx + 1] = (byte) ((name_len >> 16) & 0xff); result[idx + 2] = (byte) ((name_len >> 8) & 0xff); result[idx + 3] = (byte) ((name_len) & 0xff); for (int i = 0; i < name_len; i++) { result[idx + 4 + i] = name_data[i]; } return result; } String decodeGSSExportedName(byte[] data) { if (data.length < 8 + GSSUP_OID.length) { log.fine("exported name too short len=" + data.length); return null; } if (data[0] != 0x04 || data[1] != 0x01 || data[2] != 0x00 || data[3] != GSSUP_OID.length) { log.fine("wrong name header"); return null; } for (int i = 0; i < GSSUP_OID.length; i++) { if (data[4 + i] != GSSUP_OID[i]) { log.fine("wrong name OID @ " + i); return null; } } int idx = 4 + GSSUP_OID.length; int len = ((data[idx + 0] << 24) & 0xff000000) | ((data[idx + 1] << 16) & 0x00ff0000) | ((data[idx + 2] << 8) & 0x0000ff00) | ((data[idx + 3] << 0) & 0x000000ff); try { return new String(data, idx + 4, data.length - (idx + 4), "UTF8"); } catch (java.io.UnsupportedEncodingException ex) { throw (org.omg.CORBA.INTERNAL)new org.omg.CORBA.INTERNAL(ex.getMessage()).initCause(ex); } } }
6,188
0
Create_ds/geronimo-yoko/yoko-core/src/main/java/org/apache/yoko/orb
Create_ds/geronimo-yoko/yoko-core/src/main/java/org/apache/yoko/orb/csi/CSIPolicyFactory.java
/** * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.yoko.orb.csi; import org.apache.yoko.orb.csi.gssup.GSSUPPolicyValue; import org.apache.yoko.orb.csi.gssup.GSSUPPolicyValueHelper; import org.apache.yoko.orb.csi.gssup.SecGSSUPPolicy; import org.omg.CORBA.Any; import org.omg.CORBA.LocalObject; import org.omg.CORBA.Policy; import org.omg.Security.*; import org.omg.SecurityLevel2.Credentials; import org.omg.SecurityLevel2.CredentialsListHelper; class CSIPolicyFactory extends LocalObject implements org.omg.PortableInterceptor.PolicyFactory { public Policy create_policy(int type, Any value) throws org.omg.CORBA.PolicyError { switch (type) { case SecMechanismsPolicy.value: return new MechanismPolicy(value); case SecInvocationCredentialsPolicy.value: return new InvocationCredentialsPolicy(value); case SecQOPPolicy.value: return new QOPPolicy(value); case SecEstablishTrustPolicy.value: return new EstablishTrustPolicy(value); case SecDelegationDirectivePolicy.value: return new DelegationDirectivePolicy(value); case SecGSSUPPolicy.value: return new GSSUPPolicy(value); } throw new org.omg.CORBA.PolicyError (org.omg.CORBA.BAD_POLICY.value); } static abstract class SecurityPolicy extends LocalObject implements Policy, Cloneable { public Policy copy() { try { return (Policy) super.clone(); } catch (CloneNotSupportedException ex) { return null; } } public void destroy() { // do nothing // } } static class MechanismPolicy extends SecurityPolicy implements org.omg.SecurityLevel2.MechanismPolicy { String[] mechanisms; MechanismPolicy(Any value) { mechanisms = MechanismTypeListHelper.extract(value); } public int policy_type() { return SecMechanismsPolicy.value; } public String[] mechanisms() { return mechanisms; } } static class InvocationCredentialsPolicy extends SecurityPolicy implements org.omg.SecurityLevel2.InvocationCredentialsPolicy { Credentials[] creds; InvocationCredentialsPolicy(Any value) { creds = CredentialsListHelper.extract(value); } public int policy_type() { return SecInvocationCredentialsPolicy.value; } public Credentials[] creds() { return creds; } } static class QOPPolicy extends SecurityPolicy implements org.omg.SecurityLevel2.QOPPolicy { QOP qop; QOPPolicy(Any value) { qop = QOPHelper.extract(value); } public int policy_type() { return SecQOPPolicy.value; } public QOP qop() { return qop; } } static class EstablishTrustPolicy extends SecurityPolicy implements org.omg.SecurityLevel2.EstablishTrustPolicy { EstablishTrust trust; EstablishTrustPolicy(Any value) { trust = EstablishTrustHelper.extract(value); } public int policy_type() { return SecEstablishTrustPolicy.value; } public EstablishTrust trust() { return trust; } } static class DelegationDirectivePolicy extends SecurityPolicy implements org.omg.SecurityLevel2.DelegationDirectivePolicy { DelegationDirective directive; DelegationDirectivePolicy(Any value) { directive = DelegationDirectiveHelper.extract(value); } public int policy_type() { return SecDelegationDirectivePolicy.value; } public DelegationDirective delegation_directive() { return directive; } } static class GSSUPPolicy extends SecurityPolicy implements org.apache.yoko.orb.csi.gssup.GSSUPPolicy { RequiresSupports mode; String domain; GSSUPPolicy(Any value) { GSSUPPolicyValue val = GSSUPPolicyValueHelper.extract(value); mode = val.mode; domain = val.domain; } public int policy_type() { return SecGSSUPPolicy.value; } public RequiresSupports mode() { return mode; } public String domain() { return domain; } } }
6,189
0
Create_ds/geronimo-yoko/yoko-core/src/main/java/org/apache/yoko/orb
Create_ds/geronimo-yoko/yoko-core/src/main/java/org/apache/yoko/orb/csi/GSSUPIORInterceptor.java
/** * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.yoko.orb.csi; import java.util.logging.Logger; import java.util.logging.Level; import org.omg.CORBA.Any; import org.omg.CORBA.CompletionStatus; import org.omg.CORBA.MARSHAL; import org.omg.CSI.*; import org.omg.CSIIOP.*; import org.omg.IOP.Codec; import org.omg.IOP.CodecPackage.InvalidTypeForEncoding; import org.omg.IOP.TaggedComponent; import org.omg.PortableInterceptor.IORInfo; import org.omg.Security.DelegationDirective; import org.omg.Security.RequiresSupports; import org.omg.Security.SecDelegationDirectivePolicy; import org.omg.SecurityLevel2.DelegationDirectivePolicy; import org.apache.yoko.orb.csi.gssup.GSSUPPolicy; import org.apache.yoko.orb.csi.gssup.SecGSSUPPolicy; /** * This interceptor adds GSSUP security information to the IOR, if the relevant * policy is set. */ public class GSSUPIORInterceptor extends CSIInterceptorBase implements org.omg.PortableInterceptor.IORInterceptor { private static final Logger log = Logger.getLogger(GSSUPIORInterceptor.class.getName()); GSSUPIORInterceptor(Codec codec) { super(codec); } public void establish_components(IORInfo info) { try { TaggedComponent mechanism_list = constructMechList(info); if (mechanism_list != null) { // add this component to all outgoing profiles! info.add_ior_component(mechanism_list); } } catch (NullPointerException ex) { // ex.printStackTrace (); throw ex; } } public String name() { return "CSI IOR Interceptor"; } private TaggedComponent constructMechList(IORInfo info) { short as_target_requires = (short) 0; short as_target_supports = (short) 0; short sas_target_requires = (short) 0; short sas_target_supports = (short) 0; GSSUPPolicy gp = null; String gssup_realm = null; boolean has_security = false; try { gp = (GSSUPPolicy) info.get_effective_policy(SecGSSUPPolicy.value); if (gp.mode() == RequiresSupports.SecRequires) { as_target_requires |= EstablishTrustInClient.value; } as_target_supports |= EstablishTrustInClient.value; gssup_realm = gp.domain(); has_security = true; } catch (org.omg.CORBA.INV_POLICY ex) { // ignore } try { DelegationDirectivePolicy delegatePolicy = (DelegationDirectivePolicy) info .get_effective_policy(SecDelegationDirectivePolicy.value); if (delegatePolicy != null && delegatePolicy.delegation_directive() == DelegationDirective.Delegate) { sas_target_supports |= DelegationByClient.value | IdentityAssertion.value; has_security = true; } } catch (org.omg.CORBA.INV_POLICY ex) { // ignore } if (!has_security) { return null; } CompoundSecMech mech = new CompoundSecMech(); AS_ContextSec as = new AS_ContextSec(); as.target_supports = as_target_supports; as.target_requires = as_target_requires; if (as_target_supports != 0) { as.client_authentication_mech = GSSUP_OID; if (gssup_realm != null) { as.target_name = encodeGSSExportedName(gssup_realm); } else { as.target_name = EMPTY_BARR; } } else { as.target_name = EMPTY_BARR; as.client_authentication_mech = EMPTY_BARR; } if (log.isLoggable(Level.FINE)) { log.fine("AS.target_requires=" + as_target_requires); log.fine("AS.target_supports=" + as_target_supports); log.fine("SAS.target_requires=" + sas_target_requires); log.fine("SAS.target_supports=" + sas_target_supports); } SAS_ContextSec sas = new SAS_ContextSec(); sas.target_supports = sas_target_supports; sas.target_requires = sas_target_requires; sas.privilege_authorities = new ServiceConfiguration[0]; sas.supported_naming_mechanisms = new byte[][]{GSSUP_OID}; sas.supported_identity_types = ITTAnonymous.value; if (as_target_supports != 0) { sas.supported_identity_types |= ITTAbsent.value; } if (sas_target_supports != 0) { sas.supported_identity_types |= ITTPrincipalName.value | ITTDistinguishedName.value | ITTX509CertChain.value; } // transport mech is null here, this field is modified by code // inside SSL server-side logic, adding SSL-specific information. mech.transport_mech = new TaggedComponent(TAG_NULL_TAG.value, EMPTY_BARR); mech.target_requires = (short) (as_target_requires | sas_target_requires); mech.as_context_mech = as; mech.sas_context_mech = sas; CompoundSecMechList mech_list = new CompoundSecMechList(false, new CompoundSecMech[]{mech}); Any a = getOrb().create_any(); CompoundSecMechListHelper.insert(a, mech_list); byte[] mech_data; try { mech_data = codec.encode_value(a); } catch (InvalidTypeForEncoding e) { MARSHAL me = new MARSHAL("cannot encode security descriptor", 0, CompletionStatus.COMPLETED_NO); me.initCause(e); throw me; } return new TaggedComponent(TAG_CSI_SEC_MECH_LIST.value, mech_data); } public void destroy() { // TODO Auto-generated method stub } }
6,190
0
Create_ds/geronimo-yoko/yoko-core/src/main/java/org/apache/yoko/orb
Create_ds/geronimo-yoko/yoko-core/src/main/java/org/apache/yoko/orb/csi/SecurityContext.java
/** * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.yoko.orb.csi; import javax.security.auth.Subject; import javax.security.auth.login.LoginException; import java.security.AccessController; import org.apache.yoko.orb.util.GetSystemPropertyAction; import org.apache.yoko.osgi.ProviderLocator; public abstract class SecurityContext { private static SecurityContextDelegate delegate; public static void setAuthenticatedSubject(Subject subject) { getDelegate().setAuthenticatedSubject(subject); } private static SecurityContextDelegate getDelegate() { if (delegate == null) { delegate = allocateDelegate(); } return delegate; } private static SecurityContextDelegate allocateDelegate() { String className = (String)AccessController.doPrivileged(new GetSystemPropertyAction( "org.freeorb.csi.SecurityContextClass", "org.freeorb.csi.DefaultSecurityContextDelegate")); try { // get the appropriate class for the loading. ClassLoader loader = Thread.currentThread().getContextClassLoader(); Class c = ProviderLocator.loadClass(className, SecurityContext.class, loader); return (SecurityContextDelegate) c.newInstance(); } catch (Exception ex) { throw new InternalError("unable to attach to SecurityContext"); } } public static Subject anonymousLogin() throws LoginException { return getDelegate().anonymousLogin(); } public static Subject login(String name, String realm, String password) throws LoginException { return getDelegate().login(name, realm, password); } public static Subject delegate(String user, String domain) { return getDelegate().delegate(user, domain); } public static AuthenticationInfo getAuthenticationInfo() { return getDelegate().getAuthenticationInfo(); } }
6,191
0
Create_ds/geronimo-yoko/yoko-core/src/main/java/org/apache/yoko/orb
Create_ds/geronimo-yoko/yoko-core/src/main/java/org/apache/yoko/orb/csi/CSIServerRequestInterceptor.java
/** * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.yoko.orb.csi; import java.util.logging.Level; import java.util.logging.Logger; import javax.security.auth.Subject; import javax.security.auth.login.LoginException; import javax.security.auth.x500.X500Principal; import org.omg.CORBA.Any; import org.omg.CORBA.CompletionStatus; import org.omg.CORBA.MARSHAL; import org.omg.CORBA.OctetSeqHelper; import org.omg.CORBA.UserException; import org.omg.CSI.*; import org.omg.GSSUP.InitialContextToken; import org.omg.IOP.Codec; import org.omg.IOP.SecurityAttributeService; import org.omg.IOP.ServiceContext; import org.omg.PortableInterceptor.ForwardRequest; import org.omg.PortableInterceptor.ServerRequestInfo; import org.omg.Security.DelegationDirective; import org.omg.Security.RequiresSupports; import org.omg.Security.SecDelegationDirectivePolicy; import org.omg.SecurityLevel2.DelegationDirectivePolicy; import org.apache.yoko.orb.csi.gssup.GSSUPPolicy; import org.apache.yoko.orb.csi.gssup.SecGSSUPPolicy; public class CSIServerRequestInterceptor extends CSIInterceptorBase implements org.omg.PortableInterceptor.ServerRequestInterceptor { CSIServerRequestInterceptor(Codec codec) { super(codec); } private static final Logger log = Logger .getLogger(CSIServerRequestInterceptor.class.getName()); // // SERVER REQUEST API // public void receive_request_service_contexts(ServerRequestInfo ri) throws ForwardRequest { log.fine("receive_request_service_contexts " + ri.operation()); if (CallStatus.peekIsLocal()) { log.fine("local call"); return; } // set null subject so that we won't run in context of some // previous subject // CSISubjectInfo.clear (); boolean support_gssup_authorization = false; boolean require_gssup_authorization = false; String gssup_domain = null; // if there is no GSSUP policy on this POA, then we won't try // to validate the user. try { GSSUPPolicy gp = (GSSUPPolicy) ri .get_server_policy(SecGSSUPPolicy.value); if (gp == null) { log.fine("null GSSUPPolicy"); } else { support_gssup_authorization = true; if (gp.mode() == RequiresSupports.SecRequires) { require_gssup_authorization = true; } gssup_domain = gp.domain(); } } catch (org.omg.CORBA.INV_POLICY ex) { log.log(java.util.logging.Level.FINE, "no GSSUPPolicy", ex); } boolean support_gssup_principal_identity = false; try { DelegationDirectivePolicy delegate = (DelegationDirectivePolicy) ri .get_server_policy(SecDelegationDirectivePolicy.value); if (delegate != null) { DelegationDirective dir = delegate.delegation_directive(); if (dir == DelegationDirective.Delegate) { support_gssup_principal_identity = true; } } } catch (org.omg.CORBA.INV_POLICY ex) { // ignore // } if (log.isLoggable(Level.FINE)) { log.fine("support gssup authorization: " + support_gssup_authorization); log.fine("require gssup authorization: " + require_gssup_authorization); log.fine("support gssup identity: " + support_gssup_principal_identity); } ServiceContext serviceContext; try { serviceContext = ri .get_request_service_context(SecurityAttributeService.value); } catch (org.omg.CORBA.BAD_PARAM ex) { serviceContext = null; } log.fine("Received request service context: " + serviceContext); if (require_gssup_authorization && serviceContext == null) { throw new org.omg.CORBA.NO_PERMISSION( "GSSUP authorization required" + " (missing SAS EstablishContext message)"); } SASContextBody sasBody = null; if (serviceContext != null) { sasBody = decodeSASContextBody(serviceContext); log.fine("received request of type " + sasBody.discriminator()); switch (sasBody.discriminator()) { case MTCompleteEstablishContext.value: case MTContextError.value: // Unexpected log.severe("Unexpected message of type " + sasBody.discriminator()); throw new org.omg.CORBA.NO_PERMISSION("unexpected SAS message"); case MTMessageInContext.value: log.fine("MTMessageInContext"); throw new org.omg.CORBA.NO_PERMISSION( "Stateful SAS not supported"); case MTEstablishContext.value: log.fine("MTEstablishContext"); acceptContext(ri, sasBody.establish_msg(), support_gssup_authorization, require_gssup_authorization, support_gssup_principal_identity, gssup_domain); break; } } } public void receive_request(ServerRequestInfo ri) throws ForwardRequest { } public void send_reply(ServerRequestInfo ri) { if (CallStatus.peekIsLocal()) { return; } } public void send_exception(ServerRequestInfo ri) throws ForwardRequest { send_reply(ri); } public void send_other(ServerRequestInfo ri) throws ForwardRequest { send_reply(ri); } public String name() { return "CSI Server Interceptor"; } void acceptContext(ServerRequestInfo ri, EstablishContext establishMsg, boolean support_gssup_authorization, boolean require_gssup_authorization, boolean support_gssup_principal_identity, String gssup_domain) { if (establishMsg.client_context_id != 0) { // Error, we do not support stateful mode log.severe("Stateful security contexts not supported"); throw new org.omg.CORBA.NO_PERMISSION( "Stateful security contexts not supported"); } log.fine("accepting context..."); // Ignore authorization token list (not supported) // establishMsg.authorization_token; // Ignore identity token for now // establishMsg.identity_token; // Extract client authentication token if (support_gssup_authorization && establishMsg.identity_token.discriminator() == ITTAbsent.value && establishMsg.client_authentication_token.length > 0) { InitialContextToken gssupToken = decodeGSSUPToken(establishMsg.client_authentication_token); String useratrealm = utf8decode(gssupToken.username); String name; String realm; int idx = useratrealm.lastIndexOf('@'); if (idx == -1) { name = useratrealm; realm = "default"; } else { name = useratrealm.substring(0, idx); realm = useratrealm.substring(idx + 1); } if (!realm.equals(gssup_domain)) { returnContextError(ri, 1, 1); throw new org.omg.CORBA.NO_PERMISSION("bad domain: \"" + realm + "\""); } String password = utf8decode(gssupToken.password); log.fine("GSSUP initial context token name=" + name + "; realm=" + realm + "; password=" + password); try { Subject subject = SecurityContext.login(name, realm, password); // Login succeeded SecurityContext.setAuthenticatedSubject(subject); log.fine("Login succeeded"); returnCompleteEstablishContext(ri); } catch (LoginException ex) { // Login failed log.log(Level.SEVERE, "Login failed", ex); returnContextError(ri, 1, 1); throw new org.omg.CORBA.NO_PERMISSION("login failed"); } catch (Exception ex) { log.log(Level.SEVERE, "Exception occured: ", ex); } } else if (require_gssup_authorization) { returnContextError(ri, 1, 1); throw new org.omg.CORBA.NO_PERMISSION( "GSSUP authorization required"); } else if (support_gssup_principal_identity && establishMsg.identity_token.discriminator() == ITTPrincipalName.value) { log.fine("accepting ITTPrincipalName"); byte[] name = establishMsg.identity_token.principal_name(); Any aa; try { aa = codec.decode_value(name, OctetSeqHelper.type()); } catch (UserException e) { MARSHAL me = new MARSHAL("cannot decode security descriptor", 0, CompletionStatus.COMPLETED_NO); me.initCause(e); throw me; } byte[] exported_name = OctetSeqHelper.extract(aa); // byte[] exported_name = uncapsulateByteArray(name); String userAtDomain = decodeGSSExportedName(exported_name); log.fine("establish ITTPrincipalName " + userAtDomain); int idx = userAtDomain.indexOf('@'); String user = ""; String domain; if (idx == -1) { user = userAtDomain; domain = "default"; } else { user = userAtDomain.substring(0, idx); domain = userAtDomain.substring(idx + 1); } if (gssup_domain != null && !domain.equals(gssup_domain)) { returnContextError(ri, 1, 1); log.warning("request designates wrong domain: " + userAtDomain); throw new org.omg.CORBA.NO_PERMISSION("bad domain"); } // CSISubjectInfo.setPropagatedCaller (user, domain); Subject subject = SecurityContext.delegate(user, domain); SecurityContext.setAuthenticatedSubject(subject); returnCompleteEstablishContext(ri); } else if (establishMsg.identity_token.discriminator() == ITTAnonymous.value) { // establish anoynous identity log.fine("accepting ITTAnonymous"); // CSISubjectInfo.setAnonymousSubject (); try { Subject subject = SecurityContext.anonymousLogin(); SecurityContext.setAuthenticatedSubject(subject); } catch (LoginException ex) { // Won't happen } returnCompleteEstablishContext(ri); } else if (establishMsg.identity_token.discriminator() == ITTDistinguishedName.value) { log.fine("accepting ITTDistinguishedName"); byte[] name_data = establishMsg.identity_token.dn(); Any aa; try { aa = codec.decode_value(name_data, OctetSeqHelper.type()); } catch (UserException e) { MARSHAL me = new MARSHAL("cannot encode security descriptor", 0, CompletionStatus.COMPLETED_NO); me.initCause(e); throw me; } byte[] x500name_data = OctetSeqHelper.extract(aa); // byte[] x500name_data = uncapsulateByteArray(name_data); try { Subject subject = new Subject(); subject.getPrincipals().add(new X500Principal(x500name_data)); SecurityContext.setAuthenticatedSubject(subject); } catch (IllegalArgumentException ex) { log.log(Level.FINE, "cannot decode X500 name", ex); returnContextError(ri, 1, 1); throw new org.omg.CORBA.NO_PERMISSION("cannot decode X500 name"); } returnCompleteEstablishContext(ri); } else { returnContextError(ri, 2, 1); throw new org.omg.CORBA.NO_PERMISSION("Unsupported IdentityToken"); } } void returnCompleteEstablishContext(ServerRequestInfo ri) { // Create CompleteEstablishContext SASContextBody sasBody = new SASContextBody(); CompleteEstablishContext completeMsg = new CompleteEstablishContext(); completeMsg.client_context_id = 0; completeMsg.context_stateful = false; completeMsg.final_context_token = EMPTY_BARR; sasBody.complete_msg(completeMsg); log.fine("Adding SASContextBody, discriminator = " + sasBody.discriminator()); ri.add_reply_service_context(encodeSASContextBody(sasBody), true); } void returnContextError(ServerRequestInfo ri, int major, int minor) { // Create CompleteEstablishContext SASContextBody sasBody = new SASContextBody(); ContextError errorMsg = new ContextError(); errorMsg.client_context_id = 0; errorMsg.major_status = major; errorMsg.minor_status = minor; errorMsg.error_token = EMPTY_BARR; sasBody.error_msg(errorMsg); log.fine("Adding SASContextBody, discriminator = " + sasBody.discriminator()); ri.add_reply_service_context(encodeSASContextBody(sasBody), true); } public void destroy() { // TODO Auto-generated method stub } // void login(Subject subject, String realm, String name, // String password) throws LoginException { // LoginContext lc = new LoginContext // ("EASSERVER", subject, new LoginCallbackHandler(name, password)); // lc.login(); // } }
6,192
0
Create_ds/geronimo-yoko/yoko-core/src/main/java/org/apache/yoko/orb
Create_ds/geronimo-yoko/yoko-core/src/main/java/org/apache/yoko/orb/csi/SecurityContextDelegate.java
/** * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.yoko.orb.csi; import javax.security.auth.Subject; import javax.security.auth.login.LoginException; /** * Interface to the application server logic needed by CSI */ public interface SecurityContextDelegate { /** * get info needed to construct an out-bound IIOP request with CSIv2 */ AuthenticationInfo getAuthenticationInfo(); /** * do a login */ Subject login(String name, String realm, String password) throws LoginException; /** * do an anonymous login */ Subject anonymousLogin() throws LoginException; /** * set the current system subject */ void setAuthenticatedSubject(Subject subject); /** * establish user */ Subject delegate(String user, String domain); }
6,193
0
Create_ds/geronimo-yoko/yoko-core/src/main/java/org/apache/yoko/orb
Create_ds/geronimo-yoko/yoko-core/src/main/java/org/apache/yoko/orb/csi/CSIInterceptorLoader.java
/** * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.yoko.orb.csi; import java.util.logging.Logger; import java.util.logging.Level; import org.omg.IOP.Codec; import org.omg.IOP.CodecFactoryPackage.UnknownEncoding; import org.omg.IOP.ENCODING_CDR_ENCAPS; import org.omg.IOP.Encoding; import org.omg.PortableInterceptor.ORBInitInfo; import org.omg.PortableInterceptor.ORBInitializer; import org.omg.PortableInterceptor.PolicyFactory; import org.omg.Security.*; import org.apache.yoko.orb.csi.gssup.SecGSSUPPolicy; /** * @author Jeppe Sommer (jso@eos.dk) */ public class CSIInterceptorLoader extends org.omg.CORBA.LocalObject implements ORBInitializer { static Logger log = Logger.getLogger(CSIInterceptorLoader.class.getName()); CSIClientRequestInterceptor client_interceptor; CSIServerRequestInterceptor server_interceptor; GSSUPIORInterceptor ior_interceptor; public void pre_init(ORBInitInfo info) { log.fine("******** Running PortableCSILoader ******** "); Codec codec = null; try { codec = info.codec_factory() .create_codec( new Encoding(ENCODING_CDR_ENCAPS.value, (byte) 1, (byte) 2)); } catch (UnknownEncoding ex) { log.log(Level.SEVERE, "Could not get codec: ", ex); return; } client_interceptor = new CSIClientRequestInterceptor(codec); server_interceptor = new CSIServerRequestInterceptor(codec); ior_interceptor = new GSSUPIORInterceptor(codec); // Install factory for security policies... PolicyFactory factory = new CSIPolicyFactory(); info.register_policy_factory(SecMechanismsPolicy.value, factory); info.register_policy_factory(SecInvocationCredentialsPolicy.value, factory); info.register_policy_factory(SecQOPPolicy.value, factory); info.register_policy_factory(SecEstablishTrustPolicy.value, factory); info.register_policy_factory(SecGSSUPPolicy.value, factory); info.register_policy_factory(SecDelegationDirectivePolicy.value, factory); try { info.add_client_request_interceptor(client_interceptor); info.add_server_request_interceptor(server_interceptor); info.add_ior_interceptor(ior_interceptor); } catch (org.omg.PortableInterceptor.ORBInitInfoPackage.DuplicateName ex) { throw (org.omg.CORBA.INITIALIZE)new org.omg.CORBA.INITIALIZE(ex.getMessage()).initCause(ex); } } public void post_init(ORBInitInfo info) { } }
6,194
0
Create_ds/geronimo-yoko/yoko-core/src/main/java/org/apache/yoko/orb
Create_ds/geronimo-yoko/yoko-core/src/main/java/org/apache/yoko/orb/csi/AuthenticationInfo.java
/** * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.yoko.orb.csi; import javax.security.auth.Subject; import javax.security.auth.x500.X500Principal; public interface AuthenticationInfo { void setX500Principal(X500Principal principal); X500Principal getX500Principal(); void setPrincipalName(String name); String getPrincipalName(); void setPassword(String name); String getPassword(); void setRealm(String realm); String getRealm(); void setAnonymous(boolean value); boolean isAnonymous(); void setSubject(Subject subject); Subject getSubject(); }
6,195
0
Create_ds/geronimo-yoko/yoko-core/src/main/java/org/apache/yoko/orb/csi
Create_ds/geronimo-yoko/yoko-core/src/main/java/org/apache/yoko/orb/csi/gssup/GSSUPPolicyHolder.java
/** * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.yoko.orb.csi.gssup; /** * Generated by the JacORB IDL compiler. */ public class GSSUPPolicyHolder implements org.omg.CORBA.portable.Streamable { public GSSUPPolicy value; public GSSUPPolicyHolder() { } public GSSUPPolicyHolder(GSSUPPolicy initial) { value = initial; } public org.omg.CORBA.TypeCode _type() { return GSSUPPolicyHelper.type(); } public void _read(org.omg.CORBA.portable.InputStream in) { value = GSSUPPolicyHelper.read(in); } public void _write(org.omg.CORBA.portable.OutputStream _out) { GSSUPPolicyHelper.write(_out, value); } }
6,196
0
Create_ds/geronimo-yoko/yoko-core/src/main/java/org/apache/yoko/orb/csi
Create_ds/geronimo-yoko/yoko-core/src/main/java/org/apache/yoko/orb/csi/gssup/GSSUPPolicyHelper.java
/** * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.yoko.orb.csi.gssup; /** * Generated by the JacORB IDL compiler. */ public class GSSUPPolicyHelper { public GSSUPPolicyHelper() { } public static void insert(org.omg.CORBA.Any any, GSSUPPolicy s) { any.insert_Object(s); } public static GSSUPPolicy extract(org.omg.CORBA.Any any) { return narrow(any.extract_Object()); } public static org.omg.CORBA.TypeCode type() { return org.omg.CORBA.ORB.init().create_interface_tc("IDL:org/apache/yoko/orb/csi/gssup/GSSUPPolicy:1.0", "GSSUPPolicy"); } public static String id() { return "IDL:org/apache/yoko/orb/csi/gssup/GSSUPPolicy:1.0"; } public static GSSUPPolicy read(org.omg.CORBA.portable.InputStream in) { return narrow(in.read_Object()); } public static void write(org.omg.CORBA.portable.OutputStream _out, GSSUPPolicy s) { _out.write_Object(s); } public static GSSUPPolicy narrow(org.omg.CORBA.Object obj) { if (obj == null) return null; if (obj instanceof GSSUPPolicy) return (GSSUPPolicy) obj; else throw new org.omg.CORBA.BAD_PARAM("Narrow failed, not a GSSUPPolicy"); } public void write_Object(org.omg.CORBA.portable.OutputStream _out, java.lang.Object obj) { throw new RuntimeException(" not implemented"); } public java.lang.Object read_Object(org.omg.CORBA.portable.InputStream in) { throw new RuntimeException(" not implemented"); } public String get_id() { return id(); } public org.omg.CORBA.TypeCode get_type() { return type(); } }
6,197
0
Create_ds/geronimo-yoko/yoko-core/src/main/java/org/apache/yoko/orb/csi
Create_ds/geronimo-yoko/yoko-core/src/main/java/org/apache/yoko/orb/csi/gssup/GSSUPPolicyValueHolder.java
/** * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.yoko.orb.csi.gssup; final public class GSSUPPolicyValueHolder implements org.omg.CORBA.portable.Streamable { public GSSUPPolicyValue value; public GSSUPPolicyValueHolder() { } public GSSUPPolicyValueHolder(GSSUPPolicyValue initial) { value = initial; } public org.omg.CORBA.TypeCode _type() { return GSSUPPolicyValueHelper.type(); } public void _read(org.omg.CORBA.portable.InputStream _in) { value = GSSUPPolicyValueHelper.read(_in); } public void _write(org.omg.CORBA.portable.OutputStream _out) { GSSUPPolicyValueHelper.write(_out, value); } }
6,198
0
Create_ds/geronimo-yoko/yoko-core/src/main/java/org/apache/yoko/orb/csi
Create_ds/geronimo-yoko/yoko-core/src/main/java/org/apache/yoko/orb/csi/gssup/GSSUPPolicyValueHelper.java
/** * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.yoko.orb.csi.gssup; public class GSSUPPolicyValueHelper { private static org.omg.CORBA.TypeCode _type = org.omg.CORBA.ORB .init() .create_struct_tc( GSSUPPolicyValueHelper.id(), "GSSUPPolicyValue", new org.omg.CORBA.StructMember[]{ new org.omg.CORBA.StructMember( "mode", org.omg.CORBA.ORB .init() .create_enum_tc( org.omg.Security.RequiresSupportsHelper .id(), "RequiresSupports", new String[]{ "SecRequires", "SecSupports"}), null), new org.omg.CORBA.StructMember("domain", org.omg.CORBA.ORB.init() .create_string_tc(0), null)}); public GSSUPPolicyValueHelper() { } public static void insert(org.omg.CORBA.Any any, GSSUPPolicyValue s) { any.type(type()); write(any.create_output_stream(), s); } public static GSSUPPolicyValue extract(org.omg.CORBA.Any any) { return read(any.create_input_stream()); } public static org.omg.CORBA.TypeCode type() { return _type; } public String get_id() { return id(); } public org.omg.CORBA.TypeCode get_type() { return type(); } public void write_Object(org.omg.CORBA.portable.OutputStream out, java.lang.Object obj) { throw new RuntimeException(" not implemented"); } public java.lang.Object read_Object(org.omg.CORBA.portable.InputStream in) { throw new RuntimeException(" not implemented"); } public static String id() { return "IDL:org/apache/yoko/orb/csi/gssup/GSSUPPolicyValue:1.0"; } public static GSSUPPolicyValue read( org.omg.CORBA.portable.InputStream in) { GSSUPPolicyValue result = new GSSUPPolicyValue(); result.mode = org.omg.Security.RequiresSupportsHelper.read(in); result.domain = in.read_string(); return result; } public static void write(org.omg.CORBA.portable.OutputStream out, GSSUPPolicyValue s) { org.omg.Security.RequiresSupportsHelper.write(out, s.mode); out.write_string(s.domain); } }
6,199