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/main/java/org/apache/yoko/orb
Create_ds/geronimo-yoko/yoko-core/src/main/java/org/apache/yoko/orb/OB/RequestTimeoutPolicy_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.OB; import org.apache.yoko.orb.OB.REQUEST_TIMEOUT_POLICY_ID; import org.apache.yoko.orb.OB.RequestTimeoutPolicy; final public class RequestTimeoutPolicy_impl extends org.omg.CORBA.LocalObject implements RequestTimeoutPolicy { private int value_; // ------------------------------------------------------------------ // Standard IDL to Java Mapping // ------------------------------------------------------------------ public int value() { return value_; } public int policy_type() { return REQUEST_TIMEOUT_POLICY_ID.value; } public org.omg.CORBA.Policy copy() { return this; } public void destroy() { } // ------------------------------------------------------------------ // Yoko internal functions // Application programs must not use these functions directly // ------------------------------------------------------------------ public RequestTimeoutPolicy_impl(int t) { if (t < 0) throw new org.omg.CORBA.IMP_LIMIT("Invalid value for " + "RequestTimeoutPolicy"); value_ = t; } }
6,400
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/OB/CodeSetUtil.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.OB; final public class CodeSetUtil { // // The supported codesets in the preferred order // private static java.util.Vector supportedCharCodeSets_ = new java.util.Vector(); private static java.util.Vector supportedWcharCodeSets_ = new java.util.Vector(); static void addCharCodeSet(int id) { supportedCharCodeSets_.addElement(new Integer(id)); } static void addWcharCodeSet(int id) { supportedWcharCodeSets_.addElement(new Integer(id)); } static org.omg.CONV_FRAME.CodeSetComponent createCodeSetComponent(int id, boolean wChar) { CodeSetDatabase.instance(); org.omg.CONV_FRAME.CodeSetComponent codeSetComponent = new org.omg.CONV_FRAME.CodeSetComponent(); codeSetComponent.native_code_set = id; java.util.Vector conversion_code_sets = new java.util.Vector(); // // Add conversion codesets, filter native codeset // java.util.Enumeration e = wChar ? supportedWcharCodeSets_.elements() : supportedCharCodeSets_.elements(); while (e.hasMoreElements()) { Integer cs = (Integer) e.nextElement(); if (cs.intValue() != id) conversion_code_sets.addElement(cs); } codeSetComponent.conversion_code_sets = new int[conversion_code_sets .size()]; e = conversion_code_sets.elements(); int i = 0; while (e.hasMoreElements()) codeSetComponent.conversion_code_sets[i++] = ((Integer) e .nextElement()).intValue(); return codeSetComponent; } // // Extract codeset information // static boolean getCodeSetInfoFromComponents(ORBInstance orbInstance, org.apache.yoko.orb.OCI.ProfileInfo profileInfo, org.omg.CONV_FRAME.CodeSetComponentInfoHolder info) { // // Only IIOP 1.1 or newer has codeset information // if (profileInfo.major == 1 && profileInfo.minor > 0) { for (int i = 0; i < profileInfo.components.length; i++) { if (checkForCodeSetInfo(profileInfo.components[i], info)) return true; } } // // For IIOP 1.0 use proprietary mechanism (ISOLATIN1 and UCS2), // if configured. // else { if (orbInstance.extendedWchar()) { info.value = new org.omg.CONV_FRAME.CodeSetComponentInfo( new org.omg.CONV_FRAME.CodeSetComponent( CodeSetDatabase.ISOLATIN1, new int[0]), new org.omg.CONV_FRAME.CodeSetComponent( CodeSetDatabase.UCS2, new int[0])); return true; } } return false; } // // Get code converters from ProfileInfo and/or IOR // static CodeConverters getCodeConverters(ORBInstance orbInstance, org.apache.yoko.orb.OCI.ProfileInfo profileInfo) { // // Set codeset defaults: ISO 8859-1 for char, no default for wchar // (13.7.2.4) but ORBacus uses default_wcs, which is initially 0 // org.omg.CONV_FRAME.CodeSetComponentInfoHolder serverInfo = new org.omg.CONV_FRAME.CodeSetComponentInfoHolder(); serverInfo.value = new org.omg.CONV_FRAME.CodeSetComponentInfo(); serverInfo.value.ForCharData = new org.omg.CONV_FRAME.CodeSetComponent(); serverInfo.value.ForWcharData = new org.omg.CONV_FRAME.CodeSetComponent(); serverInfo.value.ForCharData.native_code_set = CodeSetDatabase.ISOLATIN1; serverInfo.value.ForCharData.conversion_code_sets = new int[0]; serverInfo.value.ForWcharData.native_code_set = orbInstance .getDefaultWcs(); serverInfo.value.ForWcharData.conversion_code_sets = new int[0]; // // Set up code converters // int nativeCs = orbInstance.getNativeCs(); org.omg.CONV_FRAME.CodeSetComponent client_cs = createCodeSetComponent( nativeCs, false); int tcs_c = CodeSetDatabase.ISOLATIN1; int nativeWcs = orbInstance.getNativeWcs(); org.omg.CONV_FRAME.CodeSetComponent client_wcs = createCodeSetComponent( nativeWcs, true); int tcs_wc = orbInstance.getDefaultWcs(); CodeSetDatabase db = CodeSetDatabase.instance(); // // Other transmission codesets than the defaults can only be // determined if a codeset profile was present in the IOR. // The fallbacks in this case according to the specification // are UTF-8 (not ISOLATIN1!) and UTF-16 (not UCS2!). // if (getCodeSetInfoFromComponents(orbInstance, profileInfo, serverInfo)) { tcs_c = db.determineTCS(client_cs, serverInfo.value.ForCharData, CodeSetDatabase.UTF8); tcs_wc = db.determineTCS(client_wcs, serverInfo.value.ForWcharData, CodeSetDatabase.UTF16); } CodeConverters conv = new CodeConverters(); conv.inputCharConverter = db.getConverter(nativeCs, tcs_c); conv.outputCharConverter = db.getConverter(tcs_c, nativeCs); conv.inputWcharConverter = db.getConverter(nativeWcs, tcs_wc); conv.outputWcharConverter = db.getConverter(tcs_wc, nativeWcs); return conv; } // // Check for codeset information in a tagged component // static boolean checkForCodeSetInfo(org.omg.IOP.TaggedComponent comp, org.omg.CONV_FRAME.CodeSetComponentInfoHolder info) { if (comp.tag == org.omg.IOP.TAG_CODE_SETS.value) { byte[] coct = comp.component_data; org.apache.yoko.orb.OCI.Buffer buf = new org.apache.yoko.orb.OCI.Buffer( coct, coct.length); org.apache.yoko.orb.CORBA.InputStream in = new org.apache.yoko.orb.CORBA.InputStream( buf, 0, false); in._OB_readEndian(); info.value = org.omg.CONV_FRAME.CodeSetComponentInfoHelper.read(in); return true; } return false; } // // Extract codeset context from service context // static void extractCodeSetContext(org.omg.IOP.ServiceContext context, org.omg.CONV_FRAME.CodeSetContextHolder ctx) { byte[] coct = context.context_data; org.apache.yoko.orb.OCI.Buffer buf = new org.apache.yoko.orb.OCI.Buffer( coct, coct.length); org.apache.yoko.orb.CORBA.InputStream in = new org.apache.yoko.orb.CORBA.InputStream( buf, 0, false); in._OB_readEndian(); ctx.value = org.omg.CONV_FRAME.CodeSetContextHelper.read(in); } }
6,401
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/OB/DispatchRequestOperations.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.OB; // // IDL:orb.yoko.apache.org/OB/DispatchRequest:1.0 // /** * * This interface encaspulates a request. * * @see DispatchStrategy * **/ public interface DispatchRequestOperations { // // IDL:orb.yoko.apache.org/OB/DispatchRequest/invoke:1.0 // /** * * Execute the request in the current thread context. * **/ void invoke(); }
6,402
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/OB/UTF8Reader.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.OB; import org.omg.CORBA.DATA_CONVERSION; final class UTF8Reader extends CodeSetReader { public char read_char(org.apache.yoko.orb.CORBA.InputStream in) throws org.omg.CORBA.DATA_CONVERSION { return utf8ToUnicode(in); } public char read_wchar(org.apache.yoko.orb.CORBA.InputStream in, int len) throws org.omg.CORBA.DATA_CONVERSION { return utf8ToUnicode(in); } public int count_wchar(char first) { if ((first & 0x80) == 0) return 1; else if ((first & 0xf8) == 0xc0) return 2; else if ((first & 0xf8) == 0xe0) return 3; throw new org.omg.CORBA.DATA_CONVERSION( org.apache.yoko.orb.OB.MinorCodes .describeDataConversion(org.apache.yoko.orb.OB.MinorCodes.MinorUTF8Overflow), org.apache.yoko.orb.OB.MinorCodes.MinorUTF8Overflow, org.omg.CORBA.CompletionStatus.COMPLETED_NO); } private char utf8ToUnicode(org.apache.yoko.orb.CORBA.InputStream in) throws org.omg.CORBA.DATA_CONVERSION { byte first = in.buf_.data_[in.buf_.pos_++]; // // Direct mapping for characters < 0x80 // if ((first & 0x80) == 0) return (char) first; char value; if ((first & 0xf8) == 0xc0) { // 5 free bits value = (char) (first & 0x1f); } else if ((first & 0xf8) == 0xe0) { // 4 free bits value = (char) (first & 0x0f); if ((in.buf_.data_[in.buf_.pos_] & 0xc0) != 0x80) { throw new org.omg.CORBA.DATA_CONVERSION( org.apache.yoko.orb.OB.MinorCodes .describeDataConversion(org.apache.yoko.orb.OB.MinorCodes.MinorUTF8Encoding), org.apache.yoko.orb.OB.MinorCodes.MinorUTF8Encoding, org.omg.CORBA.CompletionStatus.COMPLETED_NO); } value <<= 6; value |= in.buf_.data_[in.buf_.pos_++] & 0x3f; } // // 16 bit overflow // else { throw new org.omg.CORBA.DATA_CONVERSION( org.apache.yoko.orb.OB.MinorCodes .describeDataConversion(org.apache.yoko.orb.OB.MinorCodes.MinorUTF8Overflow), org.apache.yoko.orb.OB.MinorCodes.MinorUTF8Overflow, org.omg.CORBA.CompletionStatus.COMPLETED_NO); } if ((in.buf_.data_[in.buf_.pos_] & 0xc0) != 0x80) { throw new org.omg.CORBA.DATA_CONVERSION( org.apache.yoko.orb.OB.MinorCodes .describeDataConversion(org.apache.yoko.orb.OB.MinorCodes.MinorUTF8Encoding), org.apache.yoko.orb.OB.MinorCodes.MinorUTF8Encoding, org.omg.CORBA.CompletionStatus.COMPLETED_NO); } value <<= 6; value |= in.buf_.data_[in.buf_.pos_++] & 0x3f; return value; } public void set_flags(int flags) { } }
6,403
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/OB/TypeCodeFactory.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.OB; import org.apache.yoko.orb.CORBA.TypeCode; public final class TypeCodeFactory { // // Cache the primitive TypeCodes // private static org.omg.CORBA.TypeCode[] primitives_; static { primitives_ = new org.omg.CORBA.TypeCode[34]; } private TypeCodeFactory() { } // ---------------------------------------------------------------------- // TypeCodeFactory private and protected member implementation // ---------------------------------------------------------------------- private static boolean checkId(String id) { // // Check for a valid repository ID (<format>:<string>) // if (id.length() > 0) { int colon = id.indexOf(':'); if (colon == -1 || colon == 0 || colon == id.length() - 1) return false; } return true; } private static final boolean CHECK_IDL_NAMES = false; private static boolean checkName(String name) { if (!CHECK_IDL_NAMES) return true; // // Check for a valid IDL name // if (name.length() > 0) { if (!Character.isLetter(name.charAt(0))) return false; for (int i = 1; i < name.length(); i++) { char ch = name.charAt(i); if (!Character.isLetterOrDigit(ch) && ch != '_') return false; } } return true; } private static boolean checkType(org.omg.CORBA.TypeCode type) { // // Check for an illegal content or member type // try { org.omg.CORBA.TypeCode origType = TypeCode._OB_getOrigType(type); org.omg.CORBA.TCKind kind = origType.kind(); if (kind == org.omg.CORBA.TCKind.tk_null || kind == org.omg.CORBA.TCKind.tk_void || kind == org.omg.CORBA.TCKind.tk_except) return false; } catch (org.omg.CORBA.BAD_TYPECODE ex) { // TypeCode may be recursive } return true; } private static boolean compareLabels(org.omg.CORBA.TCKind kind, org.omg.CORBA.Any a1, org.omg.CORBA.Any a2) { switch (kind.value()) { case org.omg.CORBA.TCKind._tk_short: return a1.extract_short() == a2.extract_short(); case org.omg.CORBA.TCKind._tk_ushort: return a1.extract_ushort() == a2.extract_ushort(); case org.omg.CORBA.TCKind._tk_long: return a1.extract_long() == a2.extract_long(); case org.omg.CORBA.TCKind._tk_ulong: return a1.extract_ulong() == a2.extract_ulong(); case org.omg.CORBA.TCKind._tk_longlong: return a1.extract_longlong() == a2.extract_longlong(); case org.omg.CORBA.TCKind._tk_ulonglong: return a1.extract_ulonglong() == a2.extract_ulonglong(); case org.omg.CORBA.TCKind._tk_char: return a1.extract_char() == a2.extract_char(); case org.omg.CORBA.TCKind._tk_boolean: return a1.extract_boolean() == a2.extract_boolean(); case org.omg.CORBA.TCKind._tk_wchar: return a1.extract_wchar() == a2.extract_wchar(); case org.omg.CORBA.TCKind._tk_enum: return a1.create_input_stream().read_ulong() == a2 .create_input_stream().read_ulong(); default: Assert._OB_assert("Unsupported typecode for compare"); } return false; } // ---------------------------------------------------------------------- // TypeCodeFactory public member implementation // ---------------------------------------------------------------------- public static org.omg.CORBA.TypeCode createPrimitiveTC( org.omg.CORBA.TCKind kind) { Assert._OB_assert(kind.value() < primitives_.length); if (primitives_[kind.value()] != null) return primitives_[kind.value()]; org.omg.CORBA.TypeCode tc = null; switch (kind.value()) { case org.omg.CORBA.TCKind._tk_null: case org.omg.CORBA.TCKind._tk_void: case org.omg.CORBA.TCKind._tk_short: case org.omg.CORBA.TCKind._tk_long: case org.omg.CORBA.TCKind._tk_ushort: case org.omg.CORBA.TCKind._tk_ulong: case org.omg.CORBA.TCKind._tk_float: case org.omg.CORBA.TCKind._tk_double: case org.omg.CORBA.TCKind._tk_boolean: case org.omg.CORBA.TCKind._tk_char: case org.omg.CORBA.TCKind._tk_octet: case org.omg.CORBA.TCKind._tk_any: case org.omg.CORBA.TCKind._tk_TypeCode: case org.omg.CORBA.TCKind._tk_Principal: case org.omg.CORBA.TCKind._tk_string: case org.omg.CORBA.TCKind._tk_longlong: case org.omg.CORBA.TCKind._tk_ulonglong: case org.omg.CORBA.TCKind._tk_longdouble: case org.omg.CORBA.TCKind._tk_wchar: case org.omg.CORBA.TCKind._tk_wstring: case org.omg.CORBA.TCKind._tk_fixed: { TypeCode p = new TypeCode(); p.kind_ = kind; p.length_ = 0; // For strings tc = p; break; } case org.omg.CORBA.TCKind._tk_objref: tc = createInterfaceTC("IDL:omg.org/CORBA/Object:1.0", "Object"); break; case org.omg.CORBA.TCKind._tk_value: tc = createValueTC("IDL:omg.org/CORBA/ValueBase:1.0", "ValueBase", org.omg.CORBA.VM_ABSTRACT.value, null, new org.omg.CORBA.ValueMember[0]); break; default: Assert._OB_assert(false); } primitives_[kind.value()] = tc; return tc; } public static org.omg.CORBA.TypeCode createStructTC(String id, String name, org.omg.CORBA.StructMember[] members) { Assert._OB_assert(id != null && name != null); if (!checkId(id)) throw new org.omg.CORBA.BAD_PARAM(org.apache.yoko.orb.OB.MinorCodes .describeBadParam(org.apache.yoko.orb.OB.MinorCodes.MinorInvalidId) + ": " + id, org.apache.yoko.orb.OB.MinorCodes.MinorInvalidId, org.omg.CORBA.CompletionStatus.COMPLETED_NO); if (!checkName(name)) throw new org.omg.CORBA.BAD_PARAM(org.apache.yoko.orb.OB.MinorCodes .describeBadParam(org.apache.yoko.orb.OB.MinorCodes.MinorInvalidName) + ": " + name, org.apache.yoko.orb.OB.MinorCodes.MinorInvalidName, org.omg.CORBA.CompletionStatus.COMPLETED_NO); for (int i = 0; i < members.length; i++) { if (!checkName(members[i].name)) throw new org.omg.CORBA.BAD_PARAM(org.apache.yoko.orb.OB.MinorCodes .describeBadParam(org.apache.yoko.orb.OB.MinorCodes.MinorInvalidMemberName) + ": " + members[i].name, org.apache.yoko.orb.OB.MinorCodes.MinorInvalidMemberName, org.omg.CORBA.CompletionStatus.COMPLETED_NO); if (!checkType(members[i].type)) throw new org.omg.CORBA.BAD_TYPECODE(org.apache.yoko.orb.OB.MinorCodes .describeBadTypecode(org.apache.yoko.orb.OB.MinorCodes.MinorInvalidMemberType) + ": " + members[i].name, org.apache.yoko.orb.OB.MinorCodes.MinorInvalidMemberType, org.omg.CORBA.CompletionStatus.COMPLETED_NO); for (int j = i + 1; j < members.length; j++) if (members[i].name.length() > 0 && members[i].name.equalsIgnoreCase(members[j].name)) { throw new org.omg.CORBA.BAD_PARAM( MinorCodes .describeBadParam(org.apache.yoko.orb.OB.MinorCodes.MinorInvalidMemberName) + ": " + members[i].name, org.apache.yoko.orb.OB.MinorCodes.MinorInvalidMemberName, org.omg.CORBA.CompletionStatus.COMPLETED_NO); } } TypeCode tc = new TypeCode(); tc.kind_ = org.omg.CORBA.TCKind.tk_struct; tc.id_ = id; tc.name_ = name; tc.memberNames_ = new String[members.length]; tc.memberTypes_ = new TypeCode[members.length]; for (int i = 0; i < members.length; i++) { tc.memberNames_[i] = members[i].name; try { tc.memberTypes_[i] = (TypeCode) members[i].type; } catch (ClassCastException ex) { tc.memberTypes_[i] = TypeCode ._OB_convertForeignTypeCode(members[i].type); } } TypeCode._OB_embedRecTC(tc); return tc; } public static org.omg.CORBA.TypeCode createUnionTC(String id, String name, org.omg.CORBA.TypeCode discriminator_type, org.omg.CORBA.UnionMember[] members) { Assert._OB_assert(id != null && name != null); if (!checkId(id)) throw new org.omg.CORBA.BAD_PARAM(org.apache.yoko.orb.OB.MinorCodes .describeBadParam(org.apache.yoko.orb.OB.MinorCodes.MinorInvalidId) + ": " + id, org.apache.yoko.orb.OB.MinorCodes.MinorInvalidId, org.omg.CORBA.CompletionStatus.COMPLETED_NO); if (!checkName(name)) throw new org.omg.CORBA.BAD_PARAM(org.apache.yoko.orb.OB.MinorCodes .describeBadParam(org.apache.yoko.orb.OB.MinorCodes.MinorInvalidName) + ": " + name, org.apache.yoko.orb.OB.MinorCodes.MinorInvalidName, org.omg.CORBA.CompletionStatus.COMPLETED_NO); org.omg.CORBA.TypeCode origDisc = TypeCode ._OB_getOrigType(discriminator_type); switch (origDisc.kind().value()) { case org.omg.CORBA.TCKind._tk_short: case org.omg.CORBA.TCKind._tk_ushort: case org.omg.CORBA.TCKind._tk_long: case org.omg.CORBA.TCKind._tk_ulong: case org.omg.CORBA.TCKind._tk_longlong: case org.omg.CORBA.TCKind._tk_ulonglong: case org.omg.CORBA.TCKind._tk_char: case org.omg.CORBA.TCKind._tk_boolean: case org.omg.CORBA.TCKind._tk_wchar: case org.omg.CORBA.TCKind._tk_enum: break; default: throw new org.omg.CORBA.BAD_PARAM( MinorCodes .describeBadParam(org.apache.yoko.orb.OB.MinorCodes.MinorInvalidDiscriminatorType), org.apache.yoko.orb.OB.MinorCodes.MinorInvalidDiscriminatorType, org.omg.CORBA.CompletionStatus.COMPLETED_NO); } for (int i = 0; i < members.length; i++) { if (!checkName(members[i].name)) throw new org.omg.CORBA.BAD_PARAM(org.apache.yoko.orb.OB.MinorCodes .describeBadParam(org.apache.yoko.orb.OB.MinorCodes.MinorInvalidMemberName) + ": " + members[i].name, org.apache.yoko.orb.OB.MinorCodes.MinorInvalidMemberName, org.omg.CORBA.CompletionStatus.COMPLETED_NO); if (!checkType(members[i].type)) throw new org.omg.CORBA.BAD_TYPECODE(org.apache.yoko.orb.OB.MinorCodes .describeBadTypecode(org.apache.yoko.orb.OB.MinorCodes.MinorInvalidMemberType) + ": " + members[i].name, org.apache.yoko.orb.OB.MinorCodes.MinorInvalidMemberType, org.omg.CORBA.CompletionStatus.COMPLETED_NO); org.omg.CORBA.TypeCode labelType = members[i].label.type(); org.omg.CORBA.TypeCode origLabelType = TypeCode ._OB_getOrigType(labelType); org.omg.CORBA.TCKind kind = origLabelType.kind(); if (kind != org.omg.CORBA.TCKind.tk_octet && !origLabelType.equivalent(discriminator_type)) { throw new org.omg.CORBA.BAD_PARAM( MinorCodes .describeBadParam(org.apache.yoko.orb.OB.MinorCodes.MinorIncompatibleLabelType) + ": " + members[i].name, org.apache.yoko.orb.OB.MinorCodes.MinorIncompatibleLabelType, org.omg.CORBA.CompletionStatus.COMPLETED_NO); } for (int j = i + 1; j < members.length; j++) { if (kind != org.omg.CORBA.TCKind.tk_octet) { org.omg.CORBA.TypeCode otherLabelType = members[j].label .type(); if (origLabelType.equivalent(otherLabelType) && compareLabels(kind, members[i].label, members[j].label)) { throw new org.omg.CORBA.BAD_PARAM( MinorCodes .describeBadParam(org.apache.yoko.orb.OB.MinorCodes.MinorDuplicateLabel) + ": " + members[i].name, org.apache.yoko.orb.OB.MinorCodes.MinorDuplicateLabel, org.omg.CORBA.CompletionStatus.COMPLETED_NO); } } } } TypeCode tc = new TypeCode(); tc.kind_ = org.omg.CORBA.TCKind.tk_union; tc.id_ = id; tc.name_ = name; try { tc.discriminatorType_ = (TypeCode) discriminator_type; } catch (ClassCastException ex) { tc.discriminatorType_ = TypeCode ._OB_convertForeignTypeCode(discriminator_type); } tc.labels_ = new org.apache.yoko.orb.CORBA.Any[members.length]; tc.memberNames_ = new String[members.length]; tc.memberTypes_ = new TypeCode[members.length]; for (int i = 0; i < members.length; i++) { try { tc.labels_[i] = (org.apache.yoko.orb.CORBA.Any) members[i].label; } catch (ClassCastException ex) { tc.labels_[i] = new org.apache.yoko.orb.CORBA.Any( members[i].label); } tc.memberNames_[i] = members[i].name; try { tc.memberTypes_[i] = (TypeCode) members[i].type; } catch (ClassCastException ex) { tc.memberTypes_[i] = TypeCode ._OB_convertForeignTypeCode(members[i].type); } } TypeCode._OB_embedRecTC(tc); return tc; } public static org.omg.CORBA.TypeCode createEnumTC(String id, String name, String[] members) { Assert._OB_assert(id != null && name != null); if (!checkId(id)) throw new org.omg.CORBA.BAD_PARAM(org.apache.yoko.orb.OB.MinorCodes .describeBadParam(org.apache.yoko.orb.OB.MinorCodes.MinorInvalidId) + ": " + id, org.apache.yoko.orb.OB.MinorCodes.MinorInvalidId, org.omg.CORBA.CompletionStatus.COMPLETED_NO); if (!checkName(name)) throw new org.omg.CORBA.BAD_PARAM(org.apache.yoko.orb.OB.MinorCodes .describeBadParam(org.apache.yoko.orb.OB.MinorCodes.MinorInvalidName) + ": " + name, org.apache.yoko.orb.OB.MinorCodes.MinorInvalidName, org.omg.CORBA.CompletionStatus.COMPLETED_NO); for (int i = 0; i < members.length; i++) { if (!checkName(members[i])) throw new org.omg.CORBA.BAD_PARAM(org.apache.yoko.orb.OB.MinorCodes .describeBadParam(org.apache.yoko.orb.OB.MinorCodes.MinorInvalidMemberName) + ": " + members[i], org.apache.yoko.orb.OB.MinorCodes.MinorInvalidMemberName, org.omg.CORBA.CompletionStatus.COMPLETED_NO); for (int j = i + 1; j < members.length; j++) if (members[i].length() > 0 && members[i].equalsIgnoreCase(members[j])) { throw new org.omg.CORBA.BAD_PARAM( MinorCodes .describeBadParam(org.apache.yoko.orb.OB.MinorCodes.MinorInvalidMemberName) + ": " + members[i], org.apache.yoko.orb.OB.MinorCodes.MinorInvalidMemberName, org.omg.CORBA.CompletionStatus.COMPLETED_NO); } } TypeCode tc = new TypeCode(); tc.kind_ = org.omg.CORBA.TCKind.tk_enum; tc.id_ = id; tc.name_ = name; tc.memberNames_ = new String[members.length]; System.arraycopy(members, 0, tc.memberNames_, 0, members.length); return tc; } public static org.omg.CORBA.TypeCode createAliasTC(String id, String name, org.omg.CORBA.TypeCode original_type) { Assert._OB_assert(id != null && name != null); if (!checkId(id)) throw new org.omg.CORBA.BAD_PARAM(org.apache.yoko.orb.OB.MinorCodes .describeBadParam(org.apache.yoko.orb.OB.MinorCodes.MinorInvalidId) + ": " + id, org.apache.yoko.orb.OB.MinorCodes.MinorInvalidId, org.omg.CORBA.CompletionStatus.COMPLETED_NO); if (!checkName(name)) throw new org.omg.CORBA.BAD_PARAM(org.apache.yoko.orb.OB.MinorCodes .describeBadParam(org.apache.yoko.orb.OB.MinorCodes.MinorInvalidName) + ": " + name, org.apache.yoko.orb.OB.MinorCodes.MinorInvalidName, org.omg.CORBA.CompletionStatus.COMPLETED_NO); if (!checkType(original_type)) throw new org.omg.CORBA.BAD_TYPECODE(org.apache.yoko.orb.OB.MinorCodes .describeBadTypecode(org.apache.yoko.orb.OB.MinorCodes.MinorInvalidMemberType), org.apache.yoko.orb.OB.MinorCodes.MinorInvalidMemberType, org.omg.CORBA.CompletionStatus.COMPLETED_NO); TypeCode tc = new TypeCode(); tc.kind_ = org.omg.CORBA.TCKind.tk_alias; tc.id_ = id; tc.name_ = name; try { tc.contentType_ = (TypeCode) original_type; } catch (ClassCastException ex) { tc.contentType_ = TypeCode ._OB_convertForeignTypeCode(original_type); } return tc; } public static org.omg.CORBA.TypeCode createExceptionTC(String id, String name, org.omg.CORBA.StructMember[] members) { Assert._OB_assert(id != null && name != null); if (!checkId(id)) throw new org.omg.CORBA.BAD_PARAM(org.apache.yoko.orb.OB.MinorCodes .describeBadParam(org.apache.yoko.orb.OB.MinorCodes.MinorInvalidId) + ": " + id, org.apache.yoko.orb.OB.MinorCodes.MinorInvalidId, org.omg.CORBA.CompletionStatus.COMPLETED_NO); if (!checkName(name)) throw new org.omg.CORBA.BAD_PARAM(org.apache.yoko.orb.OB.MinorCodes .describeBadParam(org.apache.yoko.orb.OB.MinorCodes.MinorInvalidName) + ": " + name, org.apache.yoko.orb.OB.MinorCodes.MinorInvalidName, org.omg.CORBA.CompletionStatus.COMPLETED_NO); for (int i = 0; i < members.length; i++) { if (!checkName(members[i].name)) throw new org.omg.CORBA.BAD_PARAM(org.apache.yoko.orb.OB.MinorCodes .describeBadParam(org.apache.yoko.orb.OB.MinorCodes.MinorInvalidMemberName) + ": " + members[i].name, org.apache.yoko.orb.OB.MinorCodes.MinorInvalidMemberName, org.omg.CORBA.CompletionStatus.COMPLETED_NO); if (!checkType(members[i].type)) throw new org.omg.CORBA.BAD_TYPECODE(org.apache.yoko.orb.OB.MinorCodes .describeBadTypecode(org.apache.yoko.orb.OB.MinorCodes.MinorInvalidMemberType) + ": " + members[i].name, org.apache.yoko.orb.OB.MinorCodes.MinorInvalidMemberType, org.omg.CORBA.CompletionStatus.COMPLETED_NO); for (int j = i + 1; j < members.length; j++) if (members[i].name.length() > 0 && members[i].name.equalsIgnoreCase(members[j].name)) { throw new org.omg.CORBA.BAD_PARAM( MinorCodes .describeBadParam(org.apache.yoko.orb.OB.MinorCodes.MinorInvalidMemberName) + ": " + members[i].name, org.apache.yoko.orb.OB.MinorCodes.MinorInvalidMemberName, org.omg.CORBA.CompletionStatus.COMPLETED_NO); } } TypeCode tc = new TypeCode(); tc.kind_ = org.omg.CORBA.TCKind.tk_except; tc.id_ = id; tc.name_ = name; tc.memberNames_ = new String[members.length]; tc.memberTypes_ = new TypeCode[members.length]; for (int i = 0; i < members.length; i++) { tc.memberNames_[i] = members[i].name; try { tc.memberTypes_[i] = (TypeCode) members[i].type; } catch (ClassCastException ex) { tc.memberTypes_[i] = TypeCode ._OB_convertForeignTypeCode(members[i].type); } } TypeCode._OB_embedRecTC(tc); return tc; } public static org.omg.CORBA.TypeCode createInterfaceTC(String id, String name) { Assert._OB_assert(id != null && name != null); if (!checkId(id)) throw new org.omg.CORBA.BAD_PARAM(org.apache.yoko.orb.OB.MinorCodes .describeBadParam(org.apache.yoko.orb.OB.MinorCodes.MinorInvalidId) + ": " + id, org.apache.yoko.orb.OB.MinorCodes.MinorInvalidId, org.omg.CORBA.CompletionStatus.COMPLETED_NO); if (!checkName(name)) throw new org.omg.CORBA.BAD_PARAM(org.apache.yoko.orb.OB.MinorCodes .describeBadParam(org.apache.yoko.orb.OB.MinorCodes.MinorInvalidName) + ": " + name, org.apache.yoko.orb.OB.MinorCodes.MinorInvalidName, org.omg.CORBA.CompletionStatus.COMPLETED_NO); TypeCode tc = new TypeCode(); tc.kind_ = org.omg.CORBA.TCKind.tk_objref; tc.id_ = id; tc.name_ = name; return tc; } public static org.omg.CORBA.TypeCode createStringTC(int bound) { Assert._OB_assert(bound >= 0); TypeCode tc = new TypeCode(); tc.kind_ = org.omg.CORBA.TCKind.tk_string; tc.length_ = bound; return tc; } public static org.omg.CORBA.TypeCode createWStringTC(int bound) { Assert._OB_assert(bound >= 0); TypeCode tc = new TypeCode(); tc.kind_ = org.omg.CORBA.TCKind.tk_wstring; tc.length_ = bound; return tc; } public static org.omg.CORBA.TypeCode createFixedTC(short digits, short scale) { Assert._OB_assert(digits >= 0); TypeCode tc = new TypeCode(); tc.kind_ = org.omg.CORBA.TCKind.tk_fixed; tc.fixedDigits_ = digits; tc.fixedScale_ = scale; return tc; } public static org.omg.CORBA.TypeCode createSequenceTC(int bound, org.omg.CORBA.TypeCode element_type) { Assert._OB_assert(bound >= 0); if (!checkType(element_type)) throw new org.omg.CORBA.BAD_TYPECODE(org.apache.yoko.orb.OB.MinorCodes .describeBadTypecode(org.apache.yoko.orb.OB.MinorCodes.MinorInvalidMemberType), org.apache.yoko.orb.OB.MinorCodes.MinorInvalidMemberType, org.omg.CORBA.CompletionStatus.COMPLETED_NO); TypeCode tc = new TypeCode(); tc.kind_ = org.omg.CORBA.TCKind.tk_sequence; tc.length_ = bound; try { tc.contentType_ = (TypeCode) element_type; } catch (ClassCastException ex) { tc.contentType_ = TypeCode._OB_convertForeignTypeCode(element_type); } return tc; } public static org.omg.CORBA.TypeCode createRecursiveSequenceTC(int bound, int offset) { throw new org.omg.CORBA.NO_IMPLEMENT(); } public static org.omg.CORBA.TypeCode createArrayTC(int length, org.omg.CORBA.TypeCode element_type) { Assert._OB_assert(length > 0); if (!checkType(element_type)) throw new org.omg.CORBA.BAD_TYPECODE(org.apache.yoko.orb.OB.MinorCodes .describeBadTypecode(org.apache.yoko.orb.OB.MinorCodes.MinorInvalidMemberType), org.apache.yoko.orb.OB.MinorCodes.MinorInvalidMemberType, org.omg.CORBA.CompletionStatus.COMPLETED_NO); TypeCode tc = new TypeCode(); tc.kind_ = org.omg.CORBA.TCKind.tk_array; tc.length_ = length; try { tc.contentType_ = (TypeCode) element_type; } catch (ClassCastException ex) { tc.contentType_ = TypeCode._OB_convertForeignTypeCode(element_type); } return tc; } public static org.omg.CORBA.TypeCode createValueTC(String id, String name, short type_modifier, org.omg.CORBA.TypeCode concrete_base, org.omg.CORBA.ValueMember[] members) { Assert._OB_assert(id != null && name != null); if (!checkId(id)) throw new org.omg.CORBA.BAD_PARAM(org.apache.yoko.orb.OB.MinorCodes .describeBadParam(org.apache.yoko.orb.OB.MinorCodes.MinorInvalidId) + ": " + id, org.apache.yoko.orb.OB.MinorCodes.MinorInvalidId, org.omg.CORBA.CompletionStatus.COMPLETED_NO); if (!checkName(name)) throw new org.omg.CORBA.BAD_PARAM(org.apache.yoko.orb.OB.MinorCodes .describeBadParam(org.apache.yoko.orb.OB.MinorCodes.MinorInvalidName) + ": " + name, org.apache.yoko.orb.OB.MinorCodes.MinorInvalidName, org.omg.CORBA.CompletionStatus.COMPLETED_NO); if (concrete_base != null) { try { org.omg.CORBA.TypeCode origBaseType = TypeCode ._OB_getOrigType(concrete_base); if (origBaseType.kind() != org.omg.CORBA.TCKind.tk_value) throw new org.omg.CORBA.BAD_TYPECODE(); // TODO: No standard minor code } catch (org.omg.CORBA.BAD_TYPECODE ex) { // TypeCode may be recursive } } for (int i = 0; i < members.length; i++) { if (!checkName(members[i].name)) throw new org.omg.CORBA.BAD_PARAM(org.apache.yoko.orb.OB.MinorCodes .describeBadParam(org.apache.yoko.orb.OB.MinorCodes.MinorInvalidMemberName) + ": " + members[i].name, org.apache.yoko.orb.OB.MinorCodes.MinorInvalidMemberName, org.omg.CORBA.CompletionStatus.COMPLETED_NO); if (!checkType(members[i].type)) throw new org.omg.CORBA.BAD_TYPECODE(org.apache.yoko.orb.OB.MinorCodes .describeBadTypecode(org.apache.yoko.orb.OB.MinorCodes.MinorInvalidMemberType) + ": " + members[i].name, org.apache.yoko.orb.OB.MinorCodes.MinorInvalidMemberType, org.omg.CORBA.CompletionStatus.COMPLETED_NO); if (!CHECK_IDL_NAMES) continue; for (int j = i + 1; j < members.length; j++) if (members[i].name.length() > 0 && members[i].name.equalsIgnoreCase(members[j].name)) { throw new org.omg.CORBA.BAD_PARAM( MinorCodes .describeBadParam(org.apache.yoko.orb.OB.MinorCodes.MinorInvalidMemberName) + ": " + members[i].name, org.apache.yoko.orb.OB.MinorCodes.MinorInvalidMemberName, org.omg.CORBA.CompletionStatus.COMPLETED_NO); } } TypeCode tc = new TypeCode(); tc.kind_ = org.omg.CORBA.TCKind.tk_value; tc.id_ = id; tc.name_ = name; tc.typeModifier_ = type_modifier; try { tc.concreteBaseType_ = (TypeCode) concrete_base; } catch (ClassCastException ex) { tc.concreteBaseType_ = TypeCode ._OB_convertForeignTypeCode(concrete_base); } tc.memberNames_ = new String[members.length]; tc.memberTypes_ = new TypeCode[members.length]; tc.memberVisibility_ = new short[members.length]; for (int i = 0; i < members.length; i++) { tc.memberNames_[i] = members[i].name; try { tc.memberTypes_[i] = (TypeCode) members[i].type; } catch (ClassCastException ex) { tc.memberTypes_[i] = TypeCode ._OB_convertForeignTypeCode(members[i].type); } tc.memberVisibility_[i] = members[i].access; } TypeCode._OB_embedRecTC(tc); return tc; } public static org.omg.CORBA.TypeCode createValueBoxTC(String id, String name, org.omg.CORBA.TypeCode boxed_type) { Assert._OB_assert(id != null && name != null); if (!checkId(id)) throw new org.omg.CORBA.BAD_PARAM(org.apache.yoko.orb.OB.MinorCodes .describeBadParam(org.apache.yoko.orb.OB.MinorCodes.MinorInvalidId) + ": " + id, org.apache.yoko.orb.OB.MinorCodes.MinorInvalidId, org.omg.CORBA.CompletionStatus.COMPLETED_NO); if (!checkName(name)) throw new org.omg.CORBA.BAD_PARAM(org.apache.yoko.orb.OB.MinorCodes .describeBadParam(org.apache.yoko.orb.OB.MinorCodes.MinorInvalidName) + ": " + name, org.apache.yoko.orb.OB.MinorCodes.MinorInvalidName, org.omg.CORBA.CompletionStatus.COMPLETED_NO); if (!checkType(boxed_type)) throw new org.omg.CORBA.BAD_TYPECODE(org.apache.yoko.orb.OB.MinorCodes .describeBadTypecode(org.apache.yoko.orb.OB.MinorCodes.MinorInvalidMemberType), org.apache.yoko.orb.OB.MinorCodes.MinorInvalidMemberType, org.omg.CORBA.CompletionStatus.COMPLETED_NO); TypeCode tc = new TypeCode(); tc.kind_ = org.omg.CORBA.TCKind.tk_value_box; tc.id_ = id; tc.name_ = name; try { tc.contentType_ = (TypeCode) boxed_type; } catch (ClassCastException ex) { tc.contentType_ = TypeCode._OB_convertForeignTypeCode(boxed_type); } return tc; } public static org.omg.CORBA.TypeCode createNativeTC(String id, String name) { Assert._OB_assert(id != null && name != null); if (!checkId(id)) throw new org.omg.CORBA.BAD_PARAM(org.apache.yoko.orb.OB.MinorCodes .describeBadParam(org.apache.yoko.orb.OB.MinorCodes.MinorInvalidId) + ": " + id, org.apache.yoko.orb.OB.MinorCodes.MinorInvalidId, org.omg.CORBA.CompletionStatus.COMPLETED_NO); if (!checkName(name)) throw new org.omg.CORBA.BAD_PARAM(org.apache.yoko.orb.OB.MinorCodes .describeBadParam(org.apache.yoko.orb.OB.MinorCodes.MinorInvalidName) + ": " + name, org.apache.yoko.orb.OB.MinorCodes.MinorInvalidName, org.omg.CORBA.CompletionStatus.COMPLETED_NO); TypeCode tc = new TypeCode(); tc.kind_ = org.omg.CORBA.TCKind.tk_native; tc.id_ = id; tc.name_ = name; return tc; } public static org.omg.CORBA.TypeCode createRecursiveTC(String id) { Assert._OB_assert(id != null); if (!checkId(id)) throw new org.omg.CORBA.BAD_PARAM(org.apache.yoko.orb.OB.MinorCodes .describeBadParam(org.apache.yoko.orb.OB.MinorCodes.MinorInvalidId) + ": " + id, org.apache.yoko.orb.OB.MinorCodes.MinorInvalidId, org.omg.CORBA.CompletionStatus.COMPLETED_NO); TypeCode tc = new TypeCode(); tc.recId_ = id; return tc; } public static org.omg.CORBA.TypeCode createAbstractInterfaceTC(String id, String name) { Assert._OB_assert(id != null && name != null); if (!checkId(id)) throw new org.omg.CORBA.BAD_PARAM(org.apache.yoko.orb.OB.MinorCodes .describeBadParam(org.apache.yoko.orb.OB.MinorCodes.MinorInvalidId) + ": " + id, org.apache.yoko.orb.OB.MinorCodes.MinorInvalidId, org.omg.CORBA.CompletionStatus.COMPLETED_NO); if (!checkName(name)) throw new org.omg.CORBA.BAD_PARAM(org.apache.yoko.orb.OB.MinorCodes .describeBadParam(org.apache.yoko.orb.OB.MinorCodes.MinorInvalidName) + ": " + name, org.apache.yoko.orb.OB.MinorCodes.MinorInvalidName, org.omg.CORBA.CompletionStatus.COMPLETED_NO); TypeCode tc = new TypeCode(); tc.kind_ = org.omg.CORBA.TCKind.tk_abstract_interface; tc.id_ = id; tc.name_ = name; return tc; } public static org.omg.CORBA.TypeCode createLocalInterfaceTC(String id, String name) { Assert._OB_assert(id != null && name != null); if (!checkId(id)) throw new org.omg.CORBA.BAD_PARAM(org.apache.yoko.orb.OB.MinorCodes .describeBadParam(org.apache.yoko.orb.OB.MinorCodes.MinorInvalidId) + ": " + id, org.apache.yoko.orb.OB.MinorCodes.MinorInvalidId, org.omg.CORBA.CompletionStatus.COMPLETED_NO); if (!checkName(name)) throw new org.omg.CORBA.BAD_PARAM(org.apache.yoko.orb.OB.MinorCodes .describeBadParam(org.apache.yoko.orb.OB.MinorCodes.MinorInvalidName) + ": " + name, org.apache.yoko.orb.OB.MinorCodes.MinorInvalidName, org.omg.CORBA.CompletionStatus.COMPLETED_NO); TypeCode tc = new TypeCode(); tc.kind_ = org.omg.CORBA_2_4.TCKind.tk_local_interface; tc.id_ = id; tc.name_ = name; return tc; } }
6,404
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/OB/ProtocolPolicy.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.OB; // // IDL:orb.yoko.apache.org/OB/ProtocolPolicy:1.0 // /** * * The protocol policy. This policy specifies the order in which profiles * should be tried. * **/ public interface ProtocolPolicy extends ProtocolPolicyOperations, org.omg.CORBA.Policy { }
6,405
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/OB/ServerManager.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.OB; import java.util.logging.Level; import java.util.logging.Logger; public final class ServerManager { static final Logger logger = Logger.getLogger(ServerManager.class.getName()); private boolean destroy_; // if destroy() was called private CollocatedServer collocatedServer_; // The collocated server private java.util.Vector allServers_ = new java.util.Vector(); // all other // servers // ---------------------------------------------------------------------- // ServerManager private and protected member implementations // ---------------------------------------------------------------------- protected void finalize() throws Throwable { Assert._OB_assert(destroy_); Assert._OB_assert(allServers_.isEmpty()); Assert._OB_assert(collocatedServer_ == null); super.finalize(); } // ---------------------------------------------------------------------- // ServerManager public member implementations // ---------------------------------------------------------------------- public ServerManager(ORBInstance orbInstance, org.apache.yoko.orb.OCI.Acceptor[] acceptors, org.apache.yoko.orb.OB.OAInterface oaInterface, int concModel) { destroy_ = false; // // Create a server for each acceptor, and the collocated server // for (int i = 0; i < acceptors.length; i++) { GIOPServer server = new GIOPServer(orbInstance, acceptors[i], oaInterface, concModel); allServers_.addElement(server); } collocatedServer_ = new CollocatedServer(oaInterface, concModel); allServers_.addElement(collocatedServer_); } public synchronized void destroy() { // // Don't destroy twice // if (destroy_) return; // // Set the destroy flag // destroy_ = true; // // Destroy all servers // java.util.Enumeration e = allServers_.elements(); while (e.hasMoreElements()) ((Server) e.nextElement()).destroy(); allServers_.removeAllElements(); collocatedServer_ = null; } public synchronized void hold() { logger.fine("Holding all servers"); java.util.Enumeration e = allServers_.elements(); while (e.hasMoreElements()) { ((Server) e.nextElement()).hold(); } } public synchronized void activate() { logger.fine("Activating all servers"); java.util.Enumeration e = allServers_.elements(); while (e.hasMoreElements()) { ((Server) e.nextElement()).activate(); } } public synchronized CollocatedServer getCollocatedServer() { return collocatedServer_; } public synchronized org.apache.yoko.orb.OB.Server[] getServers() { org.apache.yoko.orb.OB.Server[] servers = new org.apache.yoko.orb.OB.Server[allServers_ .size()]; for (int i = 0; i < allServers_.size(); i++) { servers[i] = (org.apache.yoko.orb.OB.Server) allServers_.elementAt(i); } return servers; } }
6,406
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/OB/UnknownExceptionStrategy.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.OB; // // IDL:orb.yoko.apache.org/OB/UnknownExceptionStrategy:1.0 // /** * * The unknown exception strategy interface. * **/ public interface UnknownExceptionStrategy extends UnknownExceptionStrategyOperations, org.omg.CORBA.Object { }
6,407
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/OB/ConnectTimeoutPolicyOperations.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.OB; // // IDL:orb.yoko.apache.org/OB/ConnectTimeoutPolicy:1.0 // /** * * The connect timeout policy. This policy can be used to specify * a maximum time limit for connection establishment. * * @see TimeoutPolicy * **/ public interface ConnectTimeoutPolicyOperations extends org.omg.CORBA.PolicyOperations { // // IDL:orb.yoko.apache.org/OB/ConnectTimeoutPolicy/value:1.0 // /** * * If an object has a <code>ConnectTimeoutPolicy</code> set and * a connection cannot be established after <code>value</code> * milliseconds, a <code>CORBA::NO_RESPONSE</code> exception is * raised. The default value is <code>-1</code>, which means no * timeout. * **/ int value(); }
6,408
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/OB/MultiRequestSender.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.OB; // // The MultiRequestSender class. ORB::send_multiple_requests() and all // related operations delegate to this class. // public class MultiRequestSender { // org.apache.yoko.orb.CORBA.Request needs access to private members public java.util.Vector deferredRequests_ = new java.util.Vector(); // OBORB_impl creates MultiRequestSender public MultiRequestSender() { } // ---------------------------------------------------------------------- // Convenience functions for use by org.apache.yoko.orb.CORBA.Request // ---------------------------------------------------------------------- public synchronized boolean findDeferredRequest( org.omg.CORBA.Request request) { for (int index = 0; index < deferredRequests_.size(); index++) if (deferredRequests_.elementAt(index) == request) return true; return false; } public synchronized void addDeferredRequest(org.omg.CORBA.Request request) { deferredRequests_.addElement(request); } public synchronized void removeDeferredRequest(org.omg.CORBA.Request request) { int index; for (index = 0; index < deferredRequests_.size(); index++) if (deferredRequests_.elementAt(index) == request) break; if (index < deferredRequests_.size()) deferredRequests_.removeElementAt(index); } // ---------------------------------------------------------------------- // Public member implementations // ---------------------------------------------------------------------- public void sendMultipleRequestsOneway(org.omg.CORBA.Request[] requests) { // // Send all requests oneway // for (int i = 0; i < requests.length; i++) requests[i].send_oneway(); } public void sendMultipleRequestsDeferred(org.omg.CORBA.Request[] requests) { // // Send all requests deferred // for (int i = 0; i < requests.length; i++) requests[i].send_deferred(); } public synchronized boolean pollNextResponse() { if (deferredRequests_.size() == 0) throw new org.omg.CORBA.BAD_INV_ORDER(org.apache.yoko.orb.OB.MinorCodes .describeBadInvOrder(org.apache.yoko.orb.OB.MinorCodes.MinorRequestNotSent), org.apache.yoko.orb.OB.MinorCodes.MinorRequestNotSent, org.omg.CORBA.CompletionStatus.COMPLETED_NO); // // Poll all deferred requests // boolean polled = false; for (int i = 0; i < deferredRequests_.size(); i++) { org.omg.CORBA.Request req = (org.omg.CORBA.Request) deferredRequests_ .elementAt(i); if (req.poll_response()) polled = true; } return polled; } public synchronized org.omg.CORBA.Request getNextResponse() throws org.omg.CORBA.WrongTransaction { org.omg.CORBA.Request request = null; // // Try to find a deferred request that has completed already // for (int i = 0; i < deferredRequests_.size(); i++) { request = (org.omg.CORBA.Request) deferredRequests_.elementAt(i); if (((org.apache.yoko.orb.CORBA.Request) request)._OB_completed()) { deferredRequests_.removeElementAt(i); return request; } } // // No completed deferred request. Let's simply get the response of // the first request. // if (deferredRequests_.size() > 0) { request = (org.omg.CORBA.Request) deferredRequests_.elementAt(0); request.get_response(); return request; } throw new org.omg.CORBA.BAD_INV_ORDER(org.apache.yoko.orb.OB.MinorCodes .describeBadInvOrder(org.apache.yoko.orb.OB.MinorCodes.MinorRequestNotSent), org.apache.yoko.orb.OB.MinorCodes.MinorRequestNotSent, org.omg.CORBA.CompletionStatus.COMPLETED_NO); } }
6,409
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/OB/TimeoutPolicyOperations.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.OB; // // IDL:orb.yoko.apache.org/OB/TimeoutPolicy:1.0 // /** * * The timeout policy. This policy can be used to specify the * default timeout for connection establishment and requests. * If an object also has <code>ConnectionTimeoutPolicy</code> or * <code>RequestTimeoutPolicy</code> set, those values have precedence. * * @see ConnectionTimeoutPolicy * @see RequestTimeoutPolicy * **/ public interface TimeoutPolicyOperations extends org.omg.CORBA.PolicyOperations { // // IDL:orb.yoko.apache.org/OB/TimeoutPolicy/value:1.0 // /** * * If an object has a <code>TimeoutPolicy</code> set and a * connection cannot be established or no response to a request * is available after <code>value</code> milliseconds, a * <code>CORBA::NO_RESPONSE</code> exception is raised. * The default value is <code>-1</code>, which means no timeout. * **/ int value(); }
6,410
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/OB/FixedWidth2Writer.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.OB; final class FixedWidth2Writer extends CodeSetWriter { public void write_char(org.apache.yoko.orb.CORBA.OutputStream out, char v) throws org.omg.CORBA.DATA_CONVERSION { out.buf_.data_[out.buf_.pos_++] = (byte) v; } public void write_wchar(org.apache.yoko.orb.CORBA.OutputStream out, char v) throws org.omg.CORBA.DATA_CONVERSION { out.buf_.data_[out.buf_.pos_] = (byte) (v >> 8); out.buf_.data_[out.buf_.pos_ + 1] = (byte) v; } public int count_wchar(char v) { return 2; } public void set_flags(int flags) { } }
6,411
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/OB/InterceptorPolicy_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.OB; import org.apache.yoko.orb.OB.INTERCEPTOR_POLICY_ID; import org.apache.yoko.orb.OB.InterceptorPolicy; final public class InterceptorPolicy_impl extends org.omg.CORBA.LocalObject implements InterceptorPolicy { private boolean value_; // ------------------------------------------------------------------ // Standard IDL to Java Mapping // ------------------------------------------------------------------ public boolean value() { return value_; } public int policy_type() { return INTERCEPTOR_POLICY_ID.value; } public org.omg.CORBA.Policy copy() { return this; } public void destroy() { } // ------------------------------------------------------------------ // Yoko internal functions // Application programs must not use these functions directly // ------------------------------------------------------------------ public InterceptorPolicy_impl(boolean value) { value_ = value; } }
6,412
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/OB/RetryPolicy_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.OB; import org.apache.yoko.orb.OB.RETRY_POLICY_ID; import org.apache.yoko.orb.OB.RetryPolicy; final public class RetryPolicy_impl extends org.omg.CORBA.LocalObject implements RetryPolicy { private short mode_; private int interval_; private int max_; private boolean remote_; // ------------------------------------------------------------------ // Standard IDL to Java Mapping // ------------------------------------------------------------------ public short retry_mode() { return mode_; } public int retry_interval() { return interval_; } public int retry_max() { return max_; } public boolean retry_remote() { return remote_; } public int policy_type() { return RETRY_POLICY_ID.value; } public org.omg.CORBA.Policy copy() { return this; } public void destroy() { } // ------------------------------------------------------------------ // Yoko internal functions // Application programs must not use these functions directly // ------------------------------------------------------------------ public RetryPolicy_impl(short mode, int interval, int max, boolean remote) { mode_ = mode; interval_ = interval; max_ = max; remote_ = remote; } }
6,413
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/OB/Unsigned.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.OB; import java.math.BigInteger; // // Unsigned operations for the signed long type. Underflow and overflow // may occur. // public class Unsigned { // ----------------------------------------------------------------- // Internal implementation // ----------------------------------------------------------------- private static final long MIN_LONG = 0x8000000000000000L; private static BigInteger longToBigInteger(long l) { BigInteger b = BigInteger.valueOf(l & ~MIN_LONG); if (l < 0) { b = b.add(BigInteger.valueOf(0x7fffffffffffffffL)); b = b.add(BigInteger.valueOf(0x0000000000000001L)); } return b; } private static long bigIntegerToLong(BigInteger b) { long l = b.and(BigInteger.valueOf(0x7fffffffffffffffL)).longValue(); if (b.compareTo(BigInteger.valueOf(0x7fffffffffffffffL)) > 0) { l |= MIN_LONG; } return l; } // ----------------------------------------------------------------- // Public methods // ----------------------------------------------------------------- public static boolean lt(long op1, long op2) { if ((op1 >= 0 && op2 >= 0) || (op1 < 0 && op2 < 0)) return op1 < op2; else if (op1 >= 0) return true; else return false; } public static boolean lteq(long op1, long op2) { return op1 == op2 || lt(op1, op2); } public static boolean gt(long op1, long op2) { if ((op1 >= 0 && op2 >= 0) || (op1 < 0 && op2 < 0)) return op1 > op2; else if (op1 >= 0) return false; else return true; } public static boolean gteq(long op1, long op2) { return op1 == op2 || gt(op1, op2); } public static boolean eq(long op1, long op2) { return op1 == op2; } public static boolean neq(long op1, long op2) { return op1 != op2; } public static long add(long op1, long op2) { BigInteger bop1 = longToBigInteger(op1); BigInteger bop2 = longToBigInteger(op2); long res = bop1.add(bop2).longValue(); return res; } public static long subtract(long op1, long op2) { BigInteger bop1 = longToBigInteger(op1); BigInteger bop2 = longToBigInteger(op2); long res = bop1.subtract(bop2).longValue(); return res; } public static long multiply(long op1, long op2) { BigInteger bop1 = longToBigInteger(op1); BigInteger bop2 = longToBigInteger(op2); long res = bop1.multiply(bop2).longValue(); return res; } public static long divide(long op1, long op2) { BigInteger bop1 = longToBigInteger(op1); BigInteger bop2 = longToBigInteger(op2); long res = bop1.divide(bop2).longValue(); return res; } public static long mod(long op1, long op2) { BigInteger bop1 = longToBigInteger(op1); BigInteger bop2 = longToBigInteger(op2); long res = bop1.mod(bop2).longValue(); return res; } }
6,414
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/OB/URLRegistryOperations.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.OB; // // IDL:orb.yoko.apache.org/OB/URLRegistry:1.0 // /** * * The URLRegistry holds all of the supported URL schemes. * * @see URLScheme * **/ public interface URLRegistryOperations { // // IDL:orb.yoko.apache.org/OB/URLRegistry/add_scheme:1.0 // /** * * Register a new URL scheme. * * @param scheme The new scheme. * * @exception org.apache.yoko.orb.OB.URLRegistryPackage.SchemeAlreadyExists Another scheme already exists with * the same name. * **/ void add_scheme(URLScheme scheme) throws org.apache.yoko.orb.OB.URLRegistryPackage.SchemeAlreadyExists; // // IDL:orb.yoko.apache.org/OB/URLRegistry/find_scheme:1.0 // /** * * Find a scheme with the given name. * * @param name The scheme name, in lower case. * * @return The URLScheme, or nil if no match was found. * **/ URLScheme find_scheme(String name); // // IDL:orb.yoko.apache.org/OB/URLRegistry/parse_url:1.0 // /** * * Convert a URL into an object reference by delegating to a * registered URLScheme object. * * @param url The complete URL, including the scheme. * * @return An object reference. * * @exception BAD_PARAM In case the URL is invalid. * **/ org.omg.CORBA.Object parse_url(String url); // // IDL:orb.yoko.apache.org/OB/URLRegistry/destroy:1.0 // /** * * Invoke <code>destroy()</code> on all registered schemes, and * release any resources held by the object. * **/ void destroy(); }
6,415
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/OB/RequestTimeoutPolicyHolder.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.OB; // // IDL:orb.yoko.apache.org/OB/RequestTimeoutPolicy:1.0 // final public class RequestTimeoutPolicyHolder implements org.omg.CORBA.portable.Streamable { public RequestTimeoutPolicy value; public RequestTimeoutPolicyHolder() { } public RequestTimeoutPolicyHolder(RequestTimeoutPolicy initial) { value = initial; } public void _read(org.omg.CORBA.portable.InputStream in) { value = RequestTimeoutPolicyHelper.read(in); } public void _write(org.omg.CORBA.portable.OutputStream out) { RequestTimeoutPolicyHelper.write(out, value); } public org.omg.CORBA.TypeCode _type() { return RequestTimeoutPolicyHelper.type(); } }
6,416
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/OB/FixedWidth2Reader.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.OB; final class FixedWidth2Reader extends CodeSetReader { public char read_char(org.apache.yoko.orb.CORBA.InputStream in) throws org.omg.CORBA.DATA_CONVERSION { // // Note: byte must be masked with 0xff to correct negative values // return (char) (in.buf_.data_[in.buf_.pos_++] & 0xff); } public char read_wchar(org.apache.yoko.orb.CORBA.InputStream in, int len) throws org.omg.CORBA.DATA_CONVERSION { if (len == 2) { return (char) ((in.buf_.data_[in.buf_.pos_++] << 8) | (in.buf_.data_[in.buf_.pos_++] & 0xff)); } else throw new org.omg.CORBA.DATA_CONVERSION(); } public int count_wchar(char value) { return 2; } public void set_flags(int flags) { } }
6,417
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/OB/RefCountPolicyList.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.OB; import org.apache.yoko.orb.OB.CONNECT_TIMEOUT_POLICY_ID; import org.apache.yoko.orb.OB.ConnectTimeoutPolicy; import org.apache.yoko.orb.OB.INTERCEPTOR_POLICY_ID; import org.apache.yoko.orb.OB.InterceptorPolicy; import org.apache.yoko.orb.OB.LOCATE_REQUEST_POLICY_ID; import org.apache.yoko.orb.OB.LOCATION_TRANSPARENCY_POLICY_ID; import org.apache.yoko.orb.OB.LOCATION_TRANSPARENCY_RELAXED; import org.apache.yoko.orb.OB.LocateRequestPolicy; import org.apache.yoko.orb.OB.LocationTransparencyPolicy; import org.apache.yoko.orb.OB.REQUEST_TIMEOUT_POLICY_ID; import org.apache.yoko.orb.OB.RETRY_POLICY_ID; import org.apache.yoko.orb.OB.RETRY_STRICT; import org.apache.yoko.orb.OB.RequestTimeoutPolicy; import org.apache.yoko.orb.OB.RetryAttributes; import org.apache.yoko.orb.OB.RetryPolicy; import org.apache.yoko.orb.OB.TIMEOUT_POLICY_ID; import org.apache.yoko.orb.OB.TimeoutPolicy; final public class RefCountPolicyList { // // The immutable PolicyList // public org.omg.CORBA.Policy[] value; // // The immutable value of the retry policy // public RetryAttributes retry; // // The immutable value of the connect timeout policy // public int connectTimeout; // // The immutable value of the request timeout policy // public int requestTimeout; // // The immutable value of the request start time policy // public org.omg.TimeBase.UtcT requestStartTime; // // The immutable value of the request end time policy // public org.omg.TimeBase.UtcT requestEndTime; // // The immutable value of the reply start time policy // public org.omg.TimeBase.UtcT replyStartTime; // // The immutable value of the reply end time policy // public org.omg.TimeBase.UtcT replyEndTime; // // The immutable value of the relative request timeout policy // public long relativeRequestTimeout; // // The immutable value of the relative round trip timeout policy // public long relativeRoundTripTimeout; // // The immutable value of the rebind mode policy // public short rebindMode; // // The immutable value of the sync scope policy // public short syncScope; // // The immutable value of the location transparency policy // public short locationTransparency; // // the immutable value of the bidir policy // public short biDirMode; // // The immutable value of the InterceptorPolicy, or true if there // is no such policy // public boolean interceptor; // // The immutable value of the LocateRequestPolicy, or false if there // is no such policy // public boolean locateRequest; // // the immutable value of the request priority policy // public org.omg.Messaging.PriorityRange requestPriority; // // the immutable value of the reply priority policy // public org.omg.Messaging.PriorityRange replyPriority; // // the immutable value of the routing policy // public org.omg.Messaging.RoutingTypeRange routingRange; // // the immutable value of the max hops policy // public short maxHops; // // the immutable value of the queue order policy // public short queueOrder; // ---------------------------------------------------------------------- // RefCountPolicyList private and protected members // ---------------------------------------------------------------------- private static RetryAttributes getRetry(org.omg.CORBA.Policy[] policies) { RetryAttributes attributes = new RetryAttributes(); for (int i = 0; i < policies.length; i++) { if (policies[i].policy_type() == RETRY_POLICY_ID.value) { RetryPolicy policy = (RetryPolicy) policies[i]; attributes.mode = policy.retry_mode(); attributes.interval = policy.retry_interval(); attributes.max = policy.retry_max(); attributes.remote = policy.retry_remote(); return attributes; } } attributes.mode = RETRY_STRICT.value; attributes.interval = 0; attributes.max = 1; attributes.remote = false; return attributes; } private static int getConnectTimeout(org.omg.CORBA.Policy[] policies) { for (int i = 0; i < policies.length; i++) { if (policies[i].policy_type() == CONNECT_TIMEOUT_POLICY_ID.value) { ConnectTimeoutPolicy policy = (ConnectTimeoutPolicy) policies[i]; return policy.value(); } } // // Fall back to TimeoutPolicy // for (int i = 0; i < policies.length; i++) { if (policies[i].policy_type() == TIMEOUT_POLICY_ID.value) { TimeoutPolicy policy = (TimeoutPolicy) policies[i]; return policy.value(); } } return -1; } // // TODO: This needs to be replaced with the new messaging timeout // policies below. // private static int getRequestTimeout(org.omg.CORBA.Policy[] policies) { for (int i = 0; i < policies.length; i++) { if (policies[i].policy_type() == REQUEST_TIMEOUT_POLICY_ID.value) { RequestTimeoutPolicy policy = (RequestTimeoutPolicy) policies[i]; return policy.value(); } } // // Fall back to TimeoutPolicy // for (int i = 0; i < policies.length; i++) { if (policies[i].policy_type() == TIMEOUT_POLICY_ID.value) { TimeoutPolicy policy = (TimeoutPolicy) policies[i]; return policy.value(); } } return -1; } private org.omg.TimeBase.UtcT getRequestStartTime( org.omg.CORBA.Policy[] policies) { for (int i = 0; i < policies.length; i++) { if (policies[i].policy_type() == org.omg.Messaging.REQUEST_START_TIME_POLICY_TYPE.value) { org.omg.Messaging.RequestStartTimePolicy policy = (org.omg.Messaging.RequestStartTimePolicy) policies[i]; return policy.start_time(); } } return org.apache.yoko.orb.OB.TimeHelper.utcMin(); } private org.omg.TimeBase.UtcT getRequestEndTime( org.omg.CORBA.Policy[] policies) { for (int i = 0; i < policies.length; i++) { if (policies[i].policy_type() == org.omg.Messaging.REQUEST_END_TIME_POLICY_TYPE.value) { org.omg.Messaging.RequestEndTimePolicy policy = (org.omg.Messaging.RequestEndTimePolicy) policies[i]; return policy.end_time(); } } return org.apache.yoko.orb.OB.TimeHelper.utcMin(); } private org.omg.TimeBase.UtcT getReplyStartTime( org.omg.CORBA.Policy[] policies) { for (int i = 0; i < policies.length; i++) { if (policies[i].policy_type() == org.omg.Messaging.REPLY_START_TIME_POLICY_TYPE.value) { org.omg.Messaging.ReplyStartTimePolicy policy = (org.omg.Messaging.ReplyStartTimePolicy) policies[i]; return policy.start_time(); } } return org.apache.yoko.orb.OB.TimeHelper.utcMin(); } private org.omg.TimeBase.UtcT getReplyEndTime( org.omg.CORBA.Policy[] policies) { for (int i = 0; i < policies.length; i++) { if (policies[i].policy_type() == org.omg.Messaging.REPLY_END_TIME_POLICY_TYPE.value) { org.omg.Messaging.ReplyEndTimePolicy policy = (org.omg.Messaging.ReplyEndTimePolicy) policies[i]; return policy.end_time(); } } return org.apache.yoko.orb.OB.TimeHelper.utcMin(); } private long getRelativeRequestTimeout(org.omg.CORBA.Policy[] policies) { for (int i = 0; i < policies.length; i++) { if (policies[i].policy_type() == org.omg.Messaging.RELATIVE_REQ_TIMEOUT_POLICY_TYPE.value) { org.omg.Messaging.RelativeRequestTimeoutPolicy policy = (org.omg.Messaging.RelativeRequestTimeoutPolicy) policies[i]; return policy.relative_expiry(); } } return 0; } private long getRelativeRoundTripTimeout(org.omg.CORBA.Policy[] policies) { for (int i = 0; i < policies.length; i++) { if (policies[i].policy_type() == org.omg.Messaging.RELATIVE_RT_TIMEOUT_POLICY_TYPE.value) { org.omg.Messaging.RelativeRoundtripTimeoutPolicy policy = (org.omg.Messaging.RelativeRoundtripTimeoutPolicy) policies[i]; return policy.relative_expiry(); } } return 0; } private static short getRebindMode(org.omg.CORBA.Policy[] policies) { for (int i = 0; i < policies.length; i++) { if (policies[i].policy_type() == org.omg.Messaging.REBIND_POLICY_TYPE.value) { org.omg.Messaging.RebindPolicy policy = (org.omg.Messaging.RebindPolicy) policies[i]; return policy.rebind_mode(); } } return org.omg.Messaging.TRANSPARENT.value; } private static short getSyncScope(org.omg.CORBA.Policy[] policies) { for (int i = 0; i < policies.length; i++) { if (policies[i].policy_type() == org.omg.Messaging.SYNC_SCOPE_POLICY_TYPE.value) { org.omg.Messaging.SyncScopePolicy policy = (org.omg.Messaging.SyncScopePolicy) policies[i]; return policy.synchronization(); } } return org.omg.Messaging.SYNC_NONE.value; } private static short getLocationTransparency(org.omg.CORBA.Policy[] policies) { for (int i = 0; i < policies.length; i++) { if (policies[i].policy_type() == LOCATION_TRANSPARENCY_POLICY_ID.value) { LocationTransparencyPolicy policy = (LocationTransparencyPolicy) policies[i]; return policy.value(); } } return LOCATION_TRANSPARENCY_RELAXED.value; } private static short getBiDirMode(org.omg.CORBA.Policy[] policies) { for (int i = 0; i < policies.length; i++) { if (policies[i].policy_type() == org.omg.BiDirPolicy.BIDIRECTIONAL_POLICY_TYPE.value) { org.omg.BiDirPolicy.BidirectionalPolicy policy = (org.omg.BiDirPolicy.BidirectionalPolicy) policies[i]; return policy.value(); } } return org.omg.BiDirPolicy.NORMAL.value; } private static boolean getInterceptor(org.omg.CORBA.Policy[] policies) { for (int i = 0; i < policies.length; i++) { if (policies[i].policy_type() == INTERCEPTOR_POLICY_ID.value) { InterceptorPolicy policy = (InterceptorPolicy) policies[i]; return policy.value(); } } return true; } private static boolean getLocateRequest(org.omg.CORBA.Policy[] policies) { for (int i = 0; i < policies.length; i++) { if (policies[i].policy_type() == LOCATE_REQUEST_POLICY_ID.value) { LocateRequestPolicy policy = (LocateRequestPolicy) policies[i]; return policy.value(); } } return false; } public static org.omg.Messaging.PriorityRange getRequestPriority( org.omg.CORBA.Policy[] policies) { for (int i = 0; i < policies.length; i++) { if (policies[i].policy_type() == org.omg.Messaging.REQUEST_PRIORITY_POLICY_TYPE.value) { org.omg.Messaging.RequestPriorityPolicy policy = (org.omg.Messaging.RequestPriorityPolicy) policies[i]; return policy.priority_range(); } } org.omg.Messaging.PriorityRange range = new org.omg.Messaging.PriorityRange(); range.min = 0; range.max = 0; return range; } public static org.omg.Messaging.PriorityRange getReplyPriority( org.omg.CORBA.Policy[] policies) { for (int i = 0; i < policies.length; i++) { if (policies[i].policy_type() == org.omg.Messaging.REPLY_PRIORITY_POLICY_TYPE.value) { org.omg.Messaging.ReplyPriorityPolicy policy = (org.omg.Messaging.ReplyPriorityPolicy) policies[i]; return policy.priority_range(); } } org.omg.Messaging.PriorityRange range = new org.omg.Messaging.PriorityRange(); range.min = 0; range.max = 0; return range; } public static org.omg.Messaging.RoutingTypeRange getRoutingRange( org.omg.CORBA.Policy[] policies) { for (int i = 0; i < policies.length; i++) { if (policies[i].policy_type() == org.omg.Messaging.ROUTING_POLICY_TYPE.value) { org.omg.Messaging.RoutingPolicy policy = (org.omg.Messaging.RoutingPolicy) policies[i]; return policy.routing_range(); } } org.omg.Messaging.RoutingTypeRange range = new org.omg.Messaging.RoutingTypeRange(); range.min = org.omg.Messaging.ROUTE_NONE.value; range.max = org.omg.Messaging.ROUTE_NONE.value; return range; } public static short getMaxHops(org.omg.CORBA.Policy[] policies) { for (int i = 0; i < policies.length; i++) { if (policies[i].policy_type() == org.omg.Messaging.MAX_HOPS_POLICY_TYPE.value) { org.omg.Messaging.MaxHopsPolicy policy = (org.omg.Messaging.MaxHopsPolicy) policies[i]; return policy.max_hops(); } } return Short.MAX_VALUE; } public static short getQueueOrder(org.omg.CORBA.Policy[] policies) { for (int i = 0; i < policies.length; i++) { if (policies[i].policy_type() == org.omg.Messaging.QUEUE_ORDER_POLICY_TYPE.value) { org.omg.Messaging.QueueOrderPolicy policy = (org.omg.Messaging.QueueOrderPolicy) policies[i]; return policy.allowed_orders(); } } return org.omg.Messaging.ORDER_TEMPORAL.value; } // ---------------------------------------------------------------------- // RefCountPolicyList public members // ---------------------------------------------------------------------- public RefCountPolicyList(org.omg.CORBA.Policy[] v) { value = v; retry = getRetry(v); connectTimeout = getConnectTimeout(v); requestTimeout = getRequestTimeout(v); requestStartTime = getRequestStartTime(v); requestEndTime = getRequestEndTime(v); replyStartTime = getReplyStartTime(v); replyEndTime = getReplyEndTime(v); relativeRequestTimeout = getRelativeRequestTimeout(v); relativeRoundTripTimeout = getRelativeRoundTripTimeout(v); rebindMode = getRebindMode(v); syncScope = getSyncScope(v); locationTransparency = getLocationTransparency(v); biDirMode = getBiDirMode(v); interceptor = getInterceptor(v); locateRequest = getLocateRequest(v); requestPriority = getRequestPriority(v); replyPriority = getReplyPriority(v); routingRange = getRoutingRange(v); maxHops = getMaxHops(v); queueOrder = getQueueOrder(v); } }
6,418
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/OB/GIOPServerStarterThreaded.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.OB; import org.apache.yoko.orb.OCI.Acceptor; import org.apache.yoko.orb.OCI.Transport; import java.util.concurrent.ExecutorService; import java.util.logging.Level; final class GIOPServerStarterThreaded extends GIOPServerStarter { // // The starter thread // protected final class Starter implements Runnable { public void run() { try { starterRun(); } catch (RuntimeException ex) { Assert._OB_assert(ex); } logger.fine("Shutting down ORB server listener thread"); // // Shutdown the acceptor so that no further connections are // accepted // logCloseAcceptor(); acceptor_.shutdown(); // // Accept all connections which might have queued up in the // listen() backlog do { try { Transport t = acceptor_.accept(false); if (t == null) { logger.fine("Null transport received from a connect"); break; } GIOPConnection connection = new GIOPConnectionThreaded(orbInstance_, t, oaInterface_); connection.setState(GIOPConnection.State.Closing); } catch (org.omg.CORBA.SystemException ex) { } } while (true); // // Close the acceptor // acceptor_.close(); orbInstance_.getServerPhaser().arriveAndDeregister(); } } // ---------------------------------------------------------------------- // GIOPServerStarterThreaded package member implementation // ---------------------------------------------------------------------- GIOPServerStarterThreaded(ORBInstance orbInstance, Acceptor acceptor, OAInterface oaInterface) { super(orbInstance, acceptor, oaInterface); logger.fine("GIOPServer thread started " + this + " using acceptor " + acceptor); try { orbInstance_.getServerPhaser().register(); // // Retrieve the thread group for the servers // ExecutorService executor = orbInstance_.getServerExecutor(); // // Start starter thread // executor.submit(new Starter()); } catch (OutOfMemoryError ex) { acceptor_.close(); state_ = StateClosed; throw new org.omg.CORBA.IMP_LIMIT(org.apache.yoko.orb.OB.MinorCodes .describeImpLimit(org.apache.yoko.orb.OB.MinorCodes.MinorThreadLimit), org.apache.yoko.orb.OB.MinorCodes.MinorThreadLimit, org.omg.CORBA.CompletionStatus.COMPLETED_NO); } } // ---------------------------------------------------------------------- // GIOPServerStarterThreaded public member implementation // ---------------------------------------------------------------------- // // Change the state of the worker // synchronized public void setState(int state) { // // Don't do anything if there is no state change // if (state_ == state) { return; } logger.fine("Setting server state to " + state); // // It is not possible to transition backwards, except if we are // in holding state // if (state_ != StateHolding && state < state_) { return; } switch (state) { case StateActive: { for (int i = 0; i < connections_.size(); i++) { GIOPConnection w = (GIOPConnection) connections_.elementAt(i); w.setState(GIOPConnection.State.Active); } break; } case StateHolding: for (int i = 0; i < connections_.size(); i++) { GIOPConnection w = (GIOPConnection) connections_.elementAt(i); w.setState(GIOPConnection.State.Holding); } break; case StateClosed: { for (int i = 0; i < connections_.size(); i++) { GIOPConnection w = (GIOPConnection) connections_.elementAt(i); w.setState(GIOPConnection.State.Closing); } connections_.removeAllElements(); // // Connect to this starter's acceptor, to unblock the call // to accept() in the starter thread // try { org.apache.yoko.orb.OCI.Transport tr = acceptor_.connect_self(); tr.close(); } catch (org.omg.CORBA.SystemException ex) { // // Ignore all system exceptions // } break; } } // // Update the state and notify about the state change // state_ = state; notifyAll(); } // // Run method for starter thread // private void starterRun() { while (true) { // // Get new transport, blocking // org.apache.yoko.orb.OCI.Transport transport = null; try { transport = acceptor_.accept(true); Assert._OB_assert(transport != null); } catch (org.omg.CORBA.NO_PERMISSION ex) { // // Ignore NO_PERMISSION exceptions // } catch (org.omg.CORBA.SystemException ex) { // // Ignore exception. This probably means that the server // exceeded the number of available file descriptors. // } synchronized (this) { // // Reap the existing set of workers // reapWorkers(); // // Check whether we are on hold // while (state_ == StateHolding) { try { logger.fine("Waiting on an inbound connection because the state is holding. acceptor=" + acceptor_); wait(); } catch (InterruptedException ex) { } } logger.fine("Processing an inbound connection with state=" + state_); if (transport != null) { try { if (state_ == StateActive) { // // If we're active, we create and add a new // worker to the worker list // GIOPConnection connection = new GIOPConnectionThreaded( orbInstance_, transport, oaInterface_); connections_.addElement(connection); connection.setState(GIOPConnection.State.Active); } else { logger.fine("Processing an inbound connection because state is closed"); // // If we're closed, we create a new dummy // worker, only in order to set it to // StateClosing for proper connection shutdown // Assert._OB_assert(state_ == StateClosed); logger.fine("Processing an inbound connection because state is closed"); GIOPConnection connection = new GIOPConnectionThreaded( orbInstance_, transport, oaInterface_); logger.fine("Created connection " + connection); connection.setState(GIOPConnection.State.Closing); logger.fine("set connection state to closing"); } } catch (org.omg.CORBA.SystemException ex) { String msg = "can't accept connection\n" + ex.getMessage(); logger.log(java.util.logging.Level.WARNING, msg, ex); } } if (state_ == StateClosed) { logger.fine("Shutting down server thread"); break; } } } } }
6,419
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/OB/CodeConverterTo.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.OB; final class CodeConverterTo extends CodeConverterBase { // // Unicode character mapping table // private CharMapInfo toMap_; // ------------------------------------------------------------------ // Constructor // ------------------------------------------------------------------ CodeConverterTo(CodeSetInfo fromSet, CodeSetInfo toSet, CharMapInfo toMap) { super(fromSet, toSet); toMap_ = toMap; } // ------------------------------------------------------------------ // Public member implementations // ------------------------------------------------------------------ public boolean conversionRequired() { return true; } public char convert(char v) { for (int i = 0; i <= toMap_.upper_bound; i++) { if (toMap_.map_values[i] == v) return (char) i; } return v; } }
6,420
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/OB/URLSchemeHolder.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.OB; // // IDL:orb.yoko.apache.org/OB/URLScheme:1.0 // final public class URLSchemeHolder implements org.omg.CORBA.portable.Streamable { public URLScheme value; public URLSchemeHolder() { } public URLSchemeHolder(URLScheme initial) { value = initial; } public void _read(org.omg.CORBA.portable.InputStream in) { value = URLSchemeHelper.read(in); } public void _write(org.omg.CORBA.portable.OutputStream out) { URLSchemeHelper.write(out, value); } public org.omg.CORBA.TypeCode _type() { return URLSchemeHelper.type(); } }
6,421
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/OB/ObjectKeyData.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.OB; // // The data contained in an object key // final public class ObjectKeyData { public String serverId; // The Server Id public String[] poaId; // The POA to which this key refers public byte[] oid; // The object-id to which this key refers public boolean persistent; // Is the POA that created this key persistent? public int createTime; // If transient, what time was the POA created? public ObjectKeyData() { } public ObjectKeyData(String _serverId, String[] _poaId, byte[] _oid, boolean _persistent, int _createTime) { serverId = _serverId; poaId = _poaId; oid = _oid; persistent = _persistent; createTime = _createTime; } public String toString() { StringBuilder buf = new StringBuilder(); buf.append(serverId); buf.append(':'); if (poaId != null) { for (int i = 0; i < poaId.length; i++) { buf.append('/'); buf.append(poaId[i]); } } buf.append(':'); if (oid != null) { IORUtil.format_octets(oid, buf); } return buf.toString(); } }
6,422
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/OB/UTF8Writer.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.OB; final class UTF8Writer extends CodeSetWriter { public void write_char(org.apache.yoko.orb.CORBA.OutputStream out, char v) throws org.omg.CORBA.DATA_CONVERSION { unicodeToUtf8(out, v); } public void write_wchar(org.apache.yoko.orb.CORBA.OutputStream out, char v) throws org.omg.CORBA.DATA_CONVERSION { unicodeToUtf8(out, v); } public int count_wchar(char value) { if (value < 0x80) return 1; else if (value < 0x7ff) return 2; else return 3; } private void unicodeToUtf8(org.apache.yoko.orb.CORBA.OutputStream out, char value) throws org.omg.CORBA.DATA_CONVERSION { if (OB_Extras.COMPAT_WIDE_MARSHAL == true) { if ((int) value < 0x80) { // Direct mapping (7 bits) for characters < 0x80 out.buf_.data_[out.buf_.pos_++] = (byte) value; } else if ((int) value < 0x7ff) { // 5 free bits (%110xxxxx | %vvvvv) out.buf_.data_[out.buf_.pos_++] = (byte) ((value >>> 6) | 0xc0); out.buf_.data_[out.buf_.pos_++] = (byte) (value & 0x3f); } else if ((int) value < 0xffff) { // 4 free bits (%1110xxxx | %vvvv) out.buf_.data_[out.buf_.pos_++] = (byte) ((value >>> 12) | 0xe0); out.buf_.data_[out.buf_.pos_++] = (byte) (((value >>> 6) & 0x3f) | 0x80); out.buf_.data_[out.buf_.pos_++] = (byte) ((value & 0x3f) | 0x80); } else throw new org.omg.CORBA.DATA_CONVERSION(); } else { if ((int) value < 0x80) { // Direct mapping (7 bits) for characters < 0x80 out.buf_.data_[out.buf_.pos_++] = (byte) value; } else if ((int) value <= 0x7ff) { // 5 free bits (%110xxxxx | %vvvvv) out.buf_.data_[out.buf_.pos_++] = (byte) ((value >>> 6) | 0xc0); out.buf_.data_[out.buf_.pos_++] = (byte) ((value & 0x3f) | 0x80); } else if ((int) value <= 0xffff) { // 4 free bits (%1110xxxx | %vvvv) out.buf_.data_[out.buf_.pos_++] = (byte) ((value >>> 12) | 0xe0); out.buf_.data_[out.buf_.pos_++] = (byte) (((value >>> 6) & 0x3f) | 0x80); out.buf_.data_[out.buf_.pos_++] = (byte) ((value & 0x3f) | 0x80); } else throw new org.omg.CORBA.DATA_CONVERSION(); } } public void set_flags(int flags) { } }
6,423
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/OB/LOCATION_TRANSPARENCY_STRICT.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.OB; // // IDL:orb.yoko.apache.org/OB/LOCATION_TRANSPARENCY_STRICT:1.0 // /** * * The <code>LOCATION_TRANSPARENCY_STRICT</code> * LocationTransparencyPolicy value. * **/ public interface LOCATION_TRANSPARENCY_STRICT { short value = (short)(0L); }
6,424
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/OB/MessageRoutingIORInterceptor_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.OB; final public class MessageRoutingIORInterceptor_impl extends org.omg.CORBA.LocalObject implements org.omg.PortableInterceptor.IORInterceptor_3_0 { // // The list of AMI routers // private org.omg.MessageRouting.Router[] routerList_; public MessageRoutingIORInterceptor_impl( org.omg.MessageRouting.Router[] routers) { routerList_ = routers; } // // IDL to Java Mapping // public String name() { return ""; } public void destroy() { } public void establish_components(org.omg.PortableInterceptor.IORInfo info) { // // Make sure we have routers in our list. If not, there is no // reason to add this component to the IOR. // if (routerList_.length == 0) return; // // Create a tagged component for the router list // org.omg.IOP.TaggedComponent routerComponent = new org.omg.IOP.TaggedComponent(); routerComponent.tag = org.omg.IOP.TAG_MESSAGE_ROUTERS.value; // // Create an OutputStream and write all of the router IORs // org.apache.yoko.orb.OCI.Buffer routerBuf = new org.apache.yoko.orb.OCI.Buffer(); org.apache.yoko.orb.CORBA.OutputStream routerOut = new org.apache.yoko.orb.CORBA.OutputStream( routerBuf); routerOut._OB_writeEndian(); // // This list actually needs to be written in reverse order // int len = routerList_.length; org.omg.MessageRouting.Router[] reorderedList = new org.omg.MessageRouting.Router[len]; for (int i = len; i > 0; --i) reorderedList[i - 1] = routerList_[len - i]; org.omg.MessageRouting.RouterListHelper.write(routerOut, reorderedList); // // Write the routerlist data into the tagged component // routerComponent.component_data = new byte[routerOut._OB_pos()]; System.arraycopy(routerBuf.data(), 0, routerComponent.component_data, 0, routerBuf.length()); try { info.add_ior_component(routerComponent); } catch (org.omg.CORBA.BAD_PARAM ex) { // Ignore - profile may not be supported } // // Now add a tagged component to describe any applicable policies // for AMI routing // // // Retrieve the four effective policies that can be propgated in an // IOR from the IORInfo object // org.omg.Messaging.PolicyValueSeqHolder policiesHolder = new org.omg.Messaging.PolicyValueSeqHolder(); policiesHolder.value = new org.omg.Messaging.PolicyValue[0]; org.apache.yoko.orb.OB.MessageRoutingUtil.getComponentPolicyValues( info, policiesHolder); // // Don't write the tagged component unless we have some policies // set: // if (policiesHolder.value.length == 0) return; // // Create a tagged component for the policy value sequence // org.omg.IOP.TaggedComponent policyComponent = new org.omg.IOP.TaggedComponent(); policyComponent.tag = org.omg.IOP.TAG_POLICIES.value; // // Create an OutputStream and write all of the policies // org.apache.yoko.orb.OCI.Buffer policyBuf = new org.apache.yoko.orb.OCI.Buffer(); org.apache.yoko.orb.CORBA.OutputStream policyOut = new org.apache.yoko.orb.CORBA.OutputStream( policyBuf); policyOut._OB_writeEndian(); org.omg.Messaging.PolicyValueSeqHelper.write(policyOut, policiesHolder.value); // // Write the routerlist data into the tagged component // policyComponent.component_data = new byte[policyOut._OB_pos()]; System.arraycopy(policyBuf.data(), 0, policyComponent.component_data, 0, policyBuf.length()); try { info.add_ior_component(policyComponent); } catch (org.omg.CORBA.BAD_PARAM ex) { // Ignore - profile may not be supported } } public void components_established(org.omg.PortableInterceptor.IORInfo info) { } public void adapter_manager_state_changed(String id, short state) { } public void adapter_state_changed( org.omg.PortableInterceptor.ObjectReferenceTemplate[] templates, short state) { } }
6,425
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/OB/Version.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.OB; import java.io.IOException; import java.io.InputStream; import java.util.Properties; /** * Holds Yoko version information. */ public final class Version { private static final String VERSION = readVersionFromMavenPom( "org.apache.yoko", "yoko-core"); private static final String UNKNOWN = "[version unknown]"; public static String getVersion() { return VERSION; } /** * Reads the version from the pom.properties that Maven2 puts in the * META-INF of the generated jar. * * @param groupId * the Maven groupId of yoko * @param artifactId * the Maven artifact id * @return the version string from the POM, or * <code>"[version unknown]"</code> if the pom.properties cannot * be loaded by the current thread's classloader */ private static String readVersionFromMavenPom(String groupId, String artifactId) { ClassLoader cl = Thread.currentThread().getContextClassLoader(); Properties props = new Properties(); String propFileName = "META-INF/maven/" + groupId + "/" + artifactId + "/pom.properties"; InputStream a = cl.getResourceAsStream(propFileName); if (a == null) return UNKNOWN; try { props.load(a); } catch (IOException e) { return UNKNOWN; } final String version = props.getProperty("version"); if (version == null) { return UNKNOWN; } return version; } public static void main(String[] args) { System.out.println("Yoko " + getVersion()); } }
6,426
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/OB/INTERCEPTOR_POLICY_ID.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.OB; // // IDL:orb.yoko.apache.org/OB/INTERCEPTOR_POLICY_ID:1.0 // /** * * This policy type identifies the interceptor policy. * **/ public interface INTERCEPTOR_POLICY_ID { int value = (int)(1330577415L); }
6,427
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/OB/TIMEOUT_POLICY_ID.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.OB; // // IDL:orb.yoko.apache.org/OB/TIMEOUT_POLICY_ID:1.0 // /** * * This policy type identifies the timeout policy. * **/ public interface TIMEOUT_POLICY_ID { int value = (int)(1330577413L); }
6,428
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/OB/OptionFilter.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.OB; import org.apache.yoko.orb.OB.Logger; // // This class maintains a list of options starting with a particular prefix. // public final class OptionFilter { // // Prefix for error messages // private String errorPrefix_; // // Prefix for the options handled by this filter // private String optionPrefix_; // // List with options and their number of arguments // private java.util.Hashtable argTable_ = new java.util.Hashtable(); // // An option // public class Option { public String name; public String[] value; public Option(String n, String[] v) { name = n; value = v; } } // // Constructor // public OptionFilter(String errorPrefix, String optionPrefix) { errorPrefix_ = errorPrefix; optionPrefix_ = optionPrefix; } // // Add option string and the number of arguments for this option // public void add(String option, int nrOfArgs) { argTable_.put(option, new Integer(nrOfArgs)); } // // Parse option list by extracting known options. // Check if the number of arguments is sufficient for each option. // public Option[] parse(Logger logger, String[] args) { java.util.Vector options = new java.util.Vector(); for (int i = 0; i < args.length; i++) { if (args[i].startsWith(optionPrefix_)) { String option = args[i].substring(optionPrefix_.length()); Integer nrOfArgs = (Integer) argTable_.get(option); if (nrOfArgs != null) { int n = nrOfArgs.intValue(); String[] value = new String[n]; if (i + n >= args.length) { String err = errorPrefix_ + ": argument expected for `" + optionPrefix_ + option + "'"; logger.error(err); throw new org.omg.CORBA.INITIALIZE(err); } for (int j = 0; j < n; j++) value[j] = args[++i]; options.addElement(new Option(option, value)); continue; } else logger.warning(errorPrefix_ + ": unknown option: `" + optionPrefix_ + option + "'"); } } Option[] result = new Option[options.size()]; options.copyInto(result); return result; } // // Filter known options and their arguments // public String[] filter(String[] args) { java.util.Vector unknown = new java.util.Vector(args.length); for (int i = 0; i < args.length; i++) { if (args[i].startsWith(optionPrefix_)) { Integer nrOfArgs = (Integer) argTable_.get(args[i] .substring(optionPrefix_.length())); if (nrOfArgs != null) i += nrOfArgs.intValue(); continue; } unknown.addElement(args[i]); } String[] rem = new String[unknown.size()]; unknown.copyInto(rem); return rem; } }
6,429
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/OB/InvalidThreadPool.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.OB; // // IDL:orb.yoko.apache.org/OB/InvalidThreadPool:1.0 // /***/ final public class InvalidThreadPool extends org.omg.CORBA.UserException { private static final String _ob_id = "IDL:orb.yoko.apache.org/OB/InvalidThreadPool:1.0"; public InvalidThreadPool() { super(_ob_id); } public InvalidThreadPool(String _reason) { super(_ob_id + " " + _reason); } }
6,430
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/OB/BootLocatorOperations.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.OB; // // IDL:orb.yoko.apache.org/OB/BootLocator:1.0 // /** * * Interface used by BootManager to assist in locating objects. * * @see BootManager * **/ public interface BootLocatorOperations { // // IDL:orb.yoko.apache.org/OB/BootLocator/locate:1.0 // /** * * Locate the object coresponding to the given object id. * * @param oid The object id. * * @param obj The object reference to associate with the id. * * @param add Whether the binding should be added to the internal * table. * * @exception NotFound Raised if no binding found. * **/ void locate(byte[] oid, org.omg.CORBA.ObjectHolder obj, org.omg.CORBA.BooleanHolder add) throws org.apache.yoko.orb.OB.BootManagerPackage.NotFound; }
6,431
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/OB/URLSchemeHelper.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.OB; // // IDL:orb.yoko.apache.org/OB/URLScheme:1.0 // final public class URLSchemeHelper { public static void insert(org.omg.CORBA.Any any, URLScheme val) { any.insert_Object(val, type()); } public static URLScheme 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(), "URLScheme"); } return typeCode_; } public static String id() { return "IDL:orb.yoko.apache.org/OB/URLScheme:1.0"; } public static URLScheme 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, URLScheme 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 URLScheme narrow(org.omg.CORBA.Object val) { try { return (URLScheme)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,432
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/OB/CorbalocProtocolOperations.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.OB; // // IDL:orb.yoko.apache.org/OB/CorbalocProtocol:1.0 // /** * * The <code>corbaloc</code> URL scheme supports multiple protocols, * the most common of which is <code>iiop</code>. The CorbalocURLScheme * delegates the parsing of protocol address information to a * registered CorbalocProtocol object. * * @see CorbalocURLScheme * **/ public interface CorbalocProtocolOperations { // // IDL:orb.yoko.apache.org/OB/CorbalocProtocol/name:1.0 // /** * * Each protocol must have a unique name. All protocol names must * be in lower case. * **/ String name(); // // IDL:orb.yoko.apache.org/OB/CorbalocProtocol/parse_address:1.0 // /** * * Parse a protocol address and create a tagged profile for inclusion * in an IOR. * * @param addr The protocol address, not including the protocol name * or trailing object key. For example, the URL * <code>corbaloc:iiop:1.2@localhost:5000/Key</code> would result in * an address argument of <code>1.2@localhost:5000</code>. * * @param key The object key from the URL, converted into a sequence * of octets. * * @return A tagged profile. * * @exception BAD_PARAM In case the address is invalid. * **/ org.omg.IOP.TaggedProfile parse_address(String addr, byte[] key); // // IDL:orb.yoko.apache.org/OB/CorbalocProtocol/destroy:1.0 // /** * * Release any resources held by the object. * **/ void destroy(); }
6,433
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/OB/DispatchStrategyFactory.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.OB; // // IDL:orb.yoko.apache.org/OB/DispatchStrategyFactory:1.0 // /** * * This interface is a factory to create dispatch strategies, and to * manage thread pools. * * @see DispatchStrategy * **/ public interface DispatchStrategyFactory extends DispatchStrategyFactoryOperations, org.omg.CORBA.Object { }
6,434
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/OB/ZERO_PORT_POLICY_ID.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.OB; // // IDL:orb.yoko.apache.org/OB/ZERO_PORT_POLICY_ID:1.0 // /** * * This policy type identifies the zero port policy. * **/ public interface ZERO_PORT_POLICY_ID { int value = (int)(1330577419L); }
6,435
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/OB/ConnectTimeoutPolicy_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.OB; import org.apache.yoko.orb.OB.CONNECT_TIMEOUT_POLICY_ID; import org.apache.yoko.orb.OB.ConnectTimeoutPolicy; final public class ConnectTimeoutPolicy_impl extends org.omg.CORBA.LocalObject implements ConnectTimeoutPolicy { private int value_; // ------------------------------------------------------------------ // Standard IDL to Java Mapping // ------------------------------------------------------------------ public int value() { return value_; } public int policy_type() { return CONNECT_TIMEOUT_POLICY_ID.value; } public org.omg.CORBA.Policy copy() { return this; } public void destroy() { } // ------------------------------------------------------------------ // Yoko internal functions // Application programs must not use these functions directly // ------------------------------------------------------------------ public ConnectTimeoutPolicy_impl(int t) { if (t < 0) throw new org.omg.CORBA.IMP_LIMIT("Invalid value for " + "ConnectTimeoutPolicy"); value_ = t; } }
6,436
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/OB/LOCATE_REQUEST_POLICY_ID.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.OB; // // IDL:orb.yoko.apache.org/OB/LOCATE_REQUEST_POLICY_ID:1.0 // /** * * This policy type identifies the locate request policy. * **/ public interface LOCATE_REQUEST_POLICY_ID { int value = (int)(1330577418L); }
6,437
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/OB/InitialServiceManager.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.OB; import java.util.logging.Level; import java.util.logging.Logger; import org.omg.CORBA.LocalObject; public final class InitialServiceManager { static final Logger logger = Logger.getLogger(InitialServiceManager.class.getName()); // // Set of available initial services // private class Service { String ref; org.omg.CORBA.Object obj; } private java.util.Hashtable services_ = new java.util.Hashtable(37); private String defaultInitRef_; private boolean destroy_ = false; // True if destroy() was called private ORBInstance orbInstance_; // The ORBInstance object // ---------------------------------------------------------------------- // InitialServiceManager private and protected member implementations // ---------------------------------------------------------------------- protected void finalize() throws Throwable { Assert._OB_assert(destroy_); super.finalize(); } // ---------------------------------------------------------------------- // InitialServiceManager package member implementations // ---------------------------------------------------------------------- synchronized void destroy() { Assert._OB_assert(!destroy_); // May only be destroyed once destroy_ = true; services_ = null; orbInstance_ = null; } // ---------------------------------------------------------------------- // InitialServiceManager public member implementations // ---------------------------------------------------------------------- public InitialServiceManager() { } // // Set the ORBInstance object. Note that the initial service map // isn't populated until this method is called. // public void setORBInstance(ORBInstance instance) { orbInstance_ = instance; // // Populate the services map // java.util.Properties properties = orbInstance_.getProperties(); // // Obtain the INS default initial reference URL // String value = properties.getProperty("yoko.orb.default_init_ref"); if (value == null) defaultInitRef_ = ""; else defaultInitRef_ = value; // // Add those services configured in the "yoko.orb.service" property // String propRoot = "yoko.orb.service."; java.util.Enumeration keys = properties.keys(); while (keys.hasMoreElements()) { String key = (String) keys.nextElement(); if (!key.startsWith(propRoot)) continue; value = properties.getProperty(key); Assert._OB_assert(value != null); key = key.substring(propRoot.length()); try { addInitialReference(key, value, true); } catch (org.omg.CORBA.ORBPackage.InvalidName ex) { Assert._OB_assert(ex); } } } public synchronized String[] listInitialServices() { // // The ORB destroys this object, so it's an initialization error // if this operation is called after ORB destruction // if (destroy_) throw new org.omg.CORBA.INITIALIZE(org.apache.yoko.orb.OB.MinorCodes .describeInitialize(org.apache.yoko.orb.OB.MinorCodes.MinorORBDestroyed), org.apache.yoko.orb.OB.MinorCodes.MinorORBDestroyed, org.omg.CORBA.CompletionStatus.COMPLETED_NO); String[] list = new String[services_.size()]; int i = 0; java.util.Enumeration e = services_.keys(); while (e.hasMoreElements()) list[i++] = (String) e.nextElement(); return list; } public synchronized org.omg.CORBA.Object resolveInitialReferences( String identifier) throws org.omg.CORBA.ORBPackage.InvalidName { // // The ORB destroys this object, so it's an initialization error // if this operation is called after ORB destruction // if (destroy_) { throw new org.omg.CORBA.INITIALIZE(org.apache.yoko.orb.OB.MinorCodes .describeInitialize(org.apache.yoko.orb.OB.MinorCodes.MinorORBDestroyed), org.apache.yoko.orb.OB.MinorCodes.MinorORBDestroyed, org.omg.CORBA.CompletionStatus.COMPLETED_NO); } Assert._OB_assert(identifier != null); logger.fine("Resolving initial ORB reference for " + identifier); ObjectFactory objectFactory = orbInstance_.getObjectFactory(); org.omg.CORBA.Object obj = null; // // Search the list of initial references // Service svc = (Service) services_.get(identifier); if (svc != null) { if (svc.obj != null) { obj = svc.obj; } else if (svc.ref.length() > 0) { obj = objectFactory.stringToObject(svc.ref); svc.obj = obj; services_.put(identifier, svc); } } logger.fine("No match found for ORB intial reference " + identifier); // // If no match was found, and there's a default initial // reference "template", then try to compose a URL using // the identifier as the object-key. However, we only do // this if the service really doesn't exist in our table, // since there could be a service with a nil value. // if (obj == null && defaultInitRef_.length() > 0 && !services_.containsKey(identifier)) { String url = defaultInitRef_ + '/' + identifier; obj = objectFactory.stringToObject(url); } if (obj == null) { logger.fine("No default initializer found for ORB intial reference " + identifier); throw new org.omg.CORBA.ORBPackage.InvalidName(); } // // If the object is a l-c object, return the object now // if (obj instanceof org.omg.CORBA.LocalObject) { return obj; } // // If the object is remote, return a new reference with the // current set of policies applied, but only set ORB policies // if they are not already set on the object // org.omg.CORBA.Policy[] orbPolicies = objectFactory.policies(); java.util.Vector vec = new java.util.Vector(); for (int i = 0; i < orbPolicies.length; i++) { org.omg.CORBA.Policy policy = null; try { policy = obj._get_policy(orbPolicies[i].policy_type()); } catch (org.omg.CORBA.INV_POLICY ex) { } if (policy == null) { policy = orbPolicies[i]; } vec.addElement(policy); } org.omg.CORBA.Policy[] p = new org.omg.CORBA.Policy[vec.size()]; vec.copyInto(p); return obj._set_policy_override(p, org.omg.CORBA.SetOverrideType.SET_OVERRIDE); } public void addInitialReference(String name, org.omg.CORBA.Object obj) throws org.omg.CORBA.ORBPackage.InvalidName { addInitialReference(name, obj, false); } public synchronized void addInitialReference(String name, String iorString, boolean override) throws org.omg.CORBA.ORBPackage.InvalidName { logger.fine("Adding initial reference name=" + name + ", ior=" + iorString); // // The ORB destroys this object, so it's an initialization error // if this operation is called after ORB destruction // if (destroy_) { throw new org.omg.CORBA.INITIALIZE(org.apache.yoko.orb.OB.MinorCodes .describeInitialize(org.apache.yoko.orb.OB.MinorCodes.MinorORBDestroyed), org.apache.yoko.orb.OB.MinorCodes.MinorORBDestroyed, org.omg.CORBA.CompletionStatus.COMPLETED_NO); } Assert._OB_assert(name != null && iorString != null); if (services_.containsKey(name) && !override) { logger.fine("Initial reference name=" + name + "already exists"); throw new org.omg.CORBA.ORBPackage.InvalidName(); } Service svc = new Service(); svc.ref = iorString; services_.put(name, svc); } public synchronized void addInitialReference(String name, org.omg.CORBA.Object p, boolean override) throws org.omg.CORBA.ORBPackage.InvalidName { if (p != null) { logger.fine("Adding initial reference name=" + name + " of type " + p.getClass().getName()); } else { logger.fine("Adding initial reference name=" + name + " with null implementation"); } // // The ORB destroys this object, so it's an initialization error // if this operation is called after ORB destruction // if (destroy_) { throw new org.omg.CORBA.INITIALIZE(org.apache.yoko.orb.OB.MinorCodes .describeInitialize(org.apache.yoko.orb.OB.MinorCodes.MinorORBDestroyed), org.apache.yoko.orb.OB.MinorCodes.MinorORBDestroyed, org.omg.CORBA.CompletionStatus.COMPLETED_NO); } Assert._OB_assert(name != null); if (services_.containsKey(name) && !override) { throw new org.omg.CORBA.ORBPackage.InvalidName(); } Service svc = new Service(); svc.ref = ""; svc.obj = p; services_.put(name, svc); } }
6,438
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/OB/RequestTimeoutPolicyHelper.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.OB; // // IDL:orb.yoko.apache.org/OB/RequestTimeoutPolicy:1.0 // final public class RequestTimeoutPolicyHelper { public static void insert(org.omg.CORBA.Any any, RequestTimeoutPolicy val) { any.insert_Object(val, type()); } public static RequestTimeoutPolicy 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(), "RequestTimeoutPolicy"); } return typeCode_; } public static String id() { return "IDL:orb.yoko.apache.org/OB/RequestTimeoutPolicy:1.0"; } public static RequestTimeoutPolicy 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, RequestTimeoutPolicy 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 RequestTimeoutPolicy narrow(org.omg.CORBA.Object val) { try { return (RequestTimeoutPolicy)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,439
0
Create_ds/geronimo-yoko/yoko-core/src/main/java/org/apache/yoko/orb/OB
Create_ds/geronimo-yoko/yoko-core/src/main/java/org/apache/yoko/orb/OB/CorbalocURLSchemePackage/ProtocolAlreadyExistsHelper.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.OB.CorbalocURLSchemePackage; // // IDL:orb.yoko.apache.org/OB/CorbalocURLScheme/ProtocolAlreadyExists:1.0 // final public class ProtocolAlreadyExistsHelper { public static void insert(org.omg.CORBA.Any any, ProtocolAlreadyExists val) { org.omg.CORBA.portable.OutputStream out = any.create_output_stream(); write(out, val); any.read_value(out.create_input_stream(), type()); } public static ProtocolAlreadyExists 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(), "ProtocolAlreadyExists", members); } return typeCode_; } public static String id() { return "IDL:orb.yoko.apache.org/OB/CorbalocURLScheme/ProtocolAlreadyExists:1.0"; } public static ProtocolAlreadyExists 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); } ProtocolAlreadyExists _ob_v = new ProtocolAlreadyExists(); return _ob_v; } public static void write(org.omg.CORBA.portable.OutputStream out, ProtocolAlreadyExists val) { out.write_string(id()); } }
6,440
0
Create_ds/geronimo-yoko/yoko-core/src/main/java/org/apache/yoko/orb/OB
Create_ds/geronimo-yoko/yoko-core/src/main/java/org/apache/yoko/orb/OB/CorbalocURLSchemePackage/ProtocolAlreadyExists.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.OB.CorbalocURLSchemePackage; // // IDL:orb.yoko.apache.org/OB/CorbalocURLScheme/ProtocolAlreadyExists:1.0 // /** Another protocol already exists with the same name. */ final public class ProtocolAlreadyExists extends org.omg.CORBA.UserException { private static final String _ob_id = "IDL:orb.yoko.apache.org/OB/CorbalocURLScheme/ProtocolAlreadyExists:1.0"; public ProtocolAlreadyExists() { super(_ob_id); } public ProtocolAlreadyExists(String _reason) { super(_ob_id + " " + _reason); } }
6,441
0
Create_ds/geronimo-yoko/yoko-core/src/main/java/org/apache/yoko/orb/OB
Create_ds/geronimo-yoko/yoko-core/src/main/java/org/apache/yoko/orb/OB/CorbalocURLSchemePackage/ProtocolAlreadyExistsHolder.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.OB.CorbalocURLSchemePackage; // // IDL:orb.yoko.apache.org/OB/CorbalocURLScheme/ProtocolAlreadyExists:1.0 // final public class ProtocolAlreadyExistsHolder implements org.omg.CORBA.portable.Streamable { public ProtocolAlreadyExists value; public ProtocolAlreadyExistsHolder() { } public ProtocolAlreadyExistsHolder(ProtocolAlreadyExists initial) { value = initial; } public void _read(org.omg.CORBA.portable.InputStream in) { value = ProtocolAlreadyExistsHelper.read(in); } public void _write(org.omg.CORBA.portable.OutputStream out) { ProtocolAlreadyExistsHelper.write(out, value); } public org.omg.CORBA.TypeCode _type() { return ProtocolAlreadyExistsHelper.type(); } }
6,442
0
Create_ds/geronimo-yoko/yoko-core/src/main/java/org/apache/yoko/orb/OB
Create_ds/geronimo-yoko/yoko-core/src/main/java/org/apache/yoko/orb/OB/BootManagerPackage/NotFoundHelper.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.OB.BootManagerPackage; // // IDL:orb.yoko.apache.org/OB/BootManager/NotFound:1.0 // final public class NotFoundHelper { public static void insert(org.omg.CORBA.Any any, NotFound val) { org.omg.CORBA.portable.OutputStream out = any.create_output_stream(); write(out, val); any.read_value(out.create_input_stream(), type()); } public static NotFound 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(), "NotFound", members); } return typeCode_; } public static String id() { return "IDL:orb.yoko.apache.org/OB/BootManager/NotFound:1.0"; } public static NotFound 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); } NotFound _ob_v = new NotFound(); return _ob_v; } public static void write(org.omg.CORBA.portable.OutputStream out, NotFound val) { out.write_string(id()); } }
6,443
0
Create_ds/geronimo-yoko/yoko-core/src/main/java/org/apache/yoko/orb/OB
Create_ds/geronimo-yoko/yoko-core/src/main/java/org/apache/yoko/orb/OB/BootManagerPackage/NotFoundHolder.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.OB.BootManagerPackage; // // IDL:orb.yoko.apache.org/OB/BootManager/NotFound:1.0 // final public class NotFoundHolder implements org.omg.CORBA.portable.Streamable { public NotFound value; public NotFoundHolder() { } public NotFoundHolder(NotFound initial) { value = initial; } public void _read(org.omg.CORBA.portable.InputStream in) { value = NotFoundHelper.read(in); } public void _write(org.omg.CORBA.portable.OutputStream out) { NotFoundHelper.write(out, value); } public org.omg.CORBA.TypeCode _type() { return NotFoundHelper.type(); } }
6,444
0
Create_ds/geronimo-yoko/yoko-core/src/main/java/org/apache/yoko/orb/OB
Create_ds/geronimo-yoko/yoko-core/src/main/java/org/apache/yoko/orb/OB/BootManagerPackage/NotFound.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.OB.BootManagerPackage; // // IDL:orb.yoko.apache.org/OB/BootManager/NotFound:1.0 // /** * * This exception indicates that a binding has not been found. * **/ final public class NotFound extends org.omg.CORBA.UserException { private static final String _ob_id = "IDL:orb.yoko.apache.org/OB/BootManager/NotFound:1.0"; public NotFound() { super(_ob_id); } public NotFound(String _reason) { super(_ob_id + " " + _reason); } }
6,445
0
Create_ds/geronimo-yoko/yoko-core/src/main/java/org/apache/yoko/orb/OB
Create_ds/geronimo-yoko/yoko-core/src/main/java/org/apache/yoko/orb/OB/BootManagerPackage/AlreadyExistsHelper.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.OB.BootManagerPackage; // // IDL:orb.yoko.apache.org/OB/BootManager/AlreadyExists:1.0 // final public class AlreadyExistsHelper { public static void insert(org.omg.CORBA.Any any, AlreadyExists val) { org.omg.CORBA.portable.OutputStream out = any.create_output_stream(); write(out, val); any.read_value(out.create_input_stream(), type()); } public static AlreadyExists 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(), "AlreadyExists", members); } return typeCode_; } public static String id() { return "IDL:orb.yoko.apache.org/OB/BootManager/AlreadyExists:1.0"; } public static AlreadyExists 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); } AlreadyExists _ob_v = new AlreadyExists(); return _ob_v; } public static void write(org.omg.CORBA.portable.OutputStream out, AlreadyExists val) { out.write_string(id()); } }
6,446
0
Create_ds/geronimo-yoko/yoko-core/src/main/java/org/apache/yoko/orb/OB
Create_ds/geronimo-yoko/yoko-core/src/main/java/org/apache/yoko/orb/OB/BootManagerPackage/AlreadyExistsHolder.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.OB.BootManagerPackage; // // IDL:orb.yoko.apache.org/OB/BootManager/AlreadyExists:1.0 // final public class AlreadyExistsHolder implements org.omg.CORBA.portable.Streamable { public AlreadyExists value; public AlreadyExistsHolder() { } public AlreadyExistsHolder(AlreadyExists initial) { value = initial; } public void _read(org.omg.CORBA.portable.InputStream in) { value = AlreadyExistsHelper.read(in); } public void _write(org.omg.CORBA.portable.OutputStream out) { AlreadyExistsHelper.write(out, value); } public org.omg.CORBA.TypeCode _type() { return AlreadyExistsHelper.type(); } }
6,447
0
Create_ds/geronimo-yoko/yoko-core/src/main/java/org/apache/yoko/orb/OB
Create_ds/geronimo-yoko/yoko-core/src/main/java/org/apache/yoko/orb/OB/BootManagerPackage/AlreadyExists.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.OB.BootManagerPackage; // // IDL:orb.yoko.apache.org/OB/BootManager/AlreadyExists:1.0 // /** * * This exception indicates that a binding already exists. * **/ final public class AlreadyExists extends org.omg.CORBA.UserException { private static final String _ob_id = "IDL:orb.yoko.apache.org/OB/BootManager/AlreadyExists:1.0"; public AlreadyExists() { super(_ob_id); } public AlreadyExists(String _reason) { super(_ob_id + " " + _reason); } }
6,448
0
Create_ds/geronimo-yoko/yoko-core/src/main/java/org/apache/yoko/orb/OB
Create_ds/geronimo-yoko/yoko-core/src/main/java/org/apache/yoko/orb/OB/URLRegistryPackage/SchemeAlreadyExists.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.OB.URLRegistryPackage; // // IDL:orb.yoko.apache.org/OB/URLRegistry/SchemeAlreadyExists:1.0 // /** Another scheme already exists with the same name. */ final public class SchemeAlreadyExists extends org.omg.CORBA.UserException { private static final String _ob_id = "IDL:orb.yoko.apache.org/OB/URLRegistry/SchemeAlreadyExists:1.0"; public SchemeAlreadyExists() { super(_ob_id); } public SchemeAlreadyExists(String _reason) { super(_ob_id + " " + _reason); } }
6,449
0
Create_ds/geronimo-yoko/yoko-core/src/main/java/org/apache/yoko/orb/OB
Create_ds/geronimo-yoko/yoko-core/src/main/java/org/apache/yoko/orb/OB/URLRegistryPackage/SchemeAlreadyExistsHelper.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.OB.URLRegistryPackage; // // IDL:orb.yoko.apache.org/OB/URLRegistry/SchemeAlreadyExists:1.0 // final public class SchemeAlreadyExistsHelper { public static void insert(org.omg.CORBA.Any any, SchemeAlreadyExists val) { org.omg.CORBA.portable.OutputStream out = any.create_output_stream(); write(out, val); any.read_value(out.create_input_stream(), type()); } public static SchemeAlreadyExists 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(), "SchemeAlreadyExists", members); } return typeCode_; } public static String id() { return "IDL:orb.yoko.apache.org/OB/URLRegistry/SchemeAlreadyExists:1.0"; } public static SchemeAlreadyExists 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); } SchemeAlreadyExists _ob_v = new SchemeAlreadyExists(); return _ob_v; } public static void write(org.omg.CORBA.portable.OutputStream out, SchemeAlreadyExists val) { out.write_string(id()); } }
6,450
0
Create_ds/geronimo-yoko/yoko-core/src/main/java/org/apache/yoko/orb/OB
Create_ds/geronimo-yoko/yoko-core/src/main/java/org/apache/yoko/orb/OB/URLRegistryPackage/SchemeAlreadyExistsHolder.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.OB.URLRegistryPackage; // // IDL:orb.yoko.apache.org/OB/URLRegistry/SchemeAlreadyExists:1.0 // final public class SchemeAlreadyExistsHolder implements org.omg.CORBA.portable.Streamable { public SchemeAlreadyExists value; public SchemeAlreadyExistsHolder() { } public SchemeAlreadyExistsHolder(SchemeAlreadyExists initial) { value = initial; } public void _read(org.omg.CORBA.portable.InputStream in) { value = SchemeAlreadyExistsHelper.read(in); } public void _write(org.omg.CORBA.portable.OutputStream out) { SchemeAlreadyExistsHelper.write(out, value); } public org.omg.CORBA.TypeCode _type() { return SchemeAlreadyExistsHelper.type(); } }
6,451
0
Create_ds/geronimo-yoko/yoko-core/src/main/java/org/apache/yoko/orb/OB
Create_ds/geronimo-yoko/yoko-core/src/main/java/org/apache/yoko/orb/OB/CorbalocProtocolPackage/ObjectKeyHolder.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.OB.CorbalocProtocolPackage; // // IDL:orb.yoko.apache.org/OB/CorbalocProtocol/ObjectKey:1.0 // final public class ObjectKeyHolder implements org.omg.CORBA.portable.Streamable { public byte[] value; public ObjectKeyHolder() { } public ObjectKeyHolder(byte[] initial) { value = initial; } public void _read(org.omg.CORBA.portable.InputStream in) { value = ObjectKeyHelper.read(in); } public void _write(org.omg.CORBA.portable.OutputStream out) { ObjectKeyHelper.write(out, value); } public org.omg.CORBA.TypeCode _type() { return ObjectKeyHelper.type(); } }
6,452
0
Create_ds/geronimo-yoko/yoko-core/src/main/java/org/apache/yoko/orb/OB
Create_ds/geronimo-yoko/yoko-core/src/main/java/org/apache/yoko/orb/OB/CorbalocProtocolPackage/ObjectKeyHelper.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.OB.CorbalocProtocolPackage; // // IDL:orb.yoko.apache.org/OB/CorbalocProtocol/ObjectKey:1.0 // final public class ObjectKeyHelper { public static void insert(org.omg.CORBA.Any any, byte[] val) { org.omg.CORBA.portable.OutputStream out = any.create_output_stream(); write(out, val); any.read_value(out.create_input_stream(), type()); } public static byte[] 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(); typeCode_ = orb.create_alias_tc(id(), "ObjectKey", orb.create_sequence_tc(0, orb.get_primitive_tc(org.omg.CORBA.TCKind.tk_octet))); } return typeCode_; } public static String id() { return "IDL:orb.yoko.apache.org/OB/CorbalocProtocol/ObjectKey:1.0"; } public static byte[] read(org.omg.CORBA.portable.InputStream in) { byte[] _ob_v; int len0 = in.read_ulong(); _ob_v = new byte[len0]; in.read_octet_array(_ob_v, 0, len0); return _ob_v; } public static void write(org.omg.CORBA.portable.OutputStream out, byte[] val) { int len0 = val.length; out.write_ulong(len0); out.write_octet_array(val, 0, len0); } }
6,453
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/OCI/AcceptorOperations.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.OCI; // // IDL:orb.yoko.apache.org/OCI/Acceptor:1.0 // /** * * An interface for an Acceptor object, which is used by CORBA * servers to accept client connection requests. It also provides * operations for the management of IOR profiles. * * @see AccRegistry * @see AccFactory * @see Transport * **/ public interface AcceptorOperations { // // IDL:orb.yoko.apache.org/OCI/Acceptor/id:1.0 // /** The plugin id. */ String id(); // // IDL:orb.yoko.apache.org/OCI/Acceptor/tag:1.0 // /** The profile id tag. */ int tag(); // // IDL:orb.yoko.apache.org/OCI/Acceptor/handle:1.0 // /** * * The "handle" for this Acceptor. Like with the handle for * Transports, the handle may <em>only</em> be used with * operations like <code>select()</code>. A handle value of -1 * indicates that the protocol plug-in does not support * "selectable" Transports. * **/ int handle(); // // IDL:orb.yoko.apache.org/OCI/Acceptor/close:1.0 // /** * * Closes the Acceptor. <code>accept</code> or <code>listen</code> * may not be called after <code>close</code> has been called. * * @exception COMM_FAILURE In case of an error. * **/ void close(); // // IDL:orb.yoko.apache.org/OCI/Acceptor/shutdown:1.0 // /** * * Shutdown the Acceptor. After shutdown, the socket will not * listen to further connection requests. * * @exception COMM_FAILURE In case of an error. * **/ void shutdown(); // // IDL:orb.yoko.apache.org/OCI/Acceptor/listen:1.0 // /** * * Sets the acceptor up to listen for incoming connections. Until * this method is called on the acceptor, new connection requests * should result in a connection request failure. * * @exception COMM_FAILURE In case of an error. * **/ void listen(); // // IDL:orb.yoko.apache.org/OCI/Acceptor/accept:1.0 // /** * * Used by CORBA servers to accept client connection requests. It * returns a Transport object, which can be used for sending and * receiving octet streams to and from the client. * * @param block If set to <code>TRUE</code>, the operation blocks * until a new connection has been accepted. If set to * <code>FALSE</code>, the operation returns a nil object * reference if there is no new connection ready to be accepted. * * @return The new Transport object. * * @exception COMM_FAILURE In case of an error. * **/ Transport accept(boolean block); // // IDL:orb.yoko.apache.org/OCI/Acceptor/connect_self:1.0 // /** * * Connect to this acceptor. This operation can be used to unblock * threads that are blocking in <code>accept</code>. * * @return The new Transport object. * * @exception TRANSIENT If the server cannot be contacted. * @exception COMM_FAILURE In case of other errors. * **/ Transport connect_self(); // // IDL:orb.yoko.apache.org/OCI/Acceptor/add_profiles:1.0 // /** * * Add new profiles that match this Acceptor to an IOR. * * @param profile_info The basic profile information to use for * the new profiles. * * @param ref The IOR. * **/ void add_profiles(ProfileInfo profile_info, org.apache.yoko.orb.OBPortableServer.POAPolicies policies, org.omg.IOP.IORHolder ref); // // IDL:orb.yoko.apache.org/OCI/Acceptor/get_local_profiles:1.0 // /** * * From the given IOR, get basic information about all profiles * for which are local to this Acceptor. * * @param ref The IOR from which the profiles are taken. * * @return The sequence of basic information about profiles. If * this sequence is empty, there is no profile in the IOR that * is local to the Acceptor. * **/ ProfileInfo[] get_local_profiles(org.omg.IOP.IOR ref); // // IDL:orb.yoko.apache.org/OCI/Acceptor/get_info:1.0 // /** * * Returns the information object associated with * the Acceptor. * * @return The Acceptor information object. * **/ AcceptorInfo get_info(); }
6,454
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/OCI/NoSuchFactoryHelper.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.OCI; // // IDL:orb.yoko.apache.org/OCI/NoSuchFactory:1.0 // final public class NoSuchFactoryHelper { public static void insert(org.omg.CORBA.Any any, NoSuchFactory val) { org.omg.CORBA.portable.OutputStream out = any.create_output_stream(); write(out, val); any.read_value(out.create_input_stream(), type()); } public static NoSuchFactory 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[1]; members[0] = new org.omg.CORBA.StructMember(); members[0].name = "id"; members[0].type = PluginIdHelper.type(); typeCode_ = orb.create_exception_tc(id(), "NoSuchFactory", members); } return typeCode_; } public static String id() { return "IDL:orb.yoko.apache.org/OCI/NoSuchFactory:1.0"; } public static NoSuchFactory 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); } NoSuchFactory _ob_v = new NoSuchFactory(); _ob_v.id = PluginIdHelper.read(in); return _ob_v; } public static void write(org.omg.CORBA.portable.OutputStream out, NoSuchFactory val) { out.write_string(id()); PluginIdHelper.write(out, val.id); } }
6,455
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/OCI/FactoryAlreadyExists.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.OCI; // // IDL:orb.yoko.apache.org/OCI/FactoryAlreadyExists:1.0 // /** * * A factory with the given plugin id already exists. * * @member id The plugin id. * **/ final public class FactoryAlreadyExists extends org.omg.CORBA.UserException { private static final String _ob_id = "IDL:orb.yoko.apache.org/OCI/FactoryAlreadyExists:1.0"; public FactoryAlreadyExists() { super(_ob_id); } public FactoryAlreadyExists(String id) { super(_ob_id); this.id = id; } public FactoryAlreadyExists(String _reason, String id) { super(_ob_id + " " + _reason); this.id = id; } public String id; }
6,456
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/OCI/ConnectorInfoOperations.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.OCI; // // IDL:orb.yoko.apache.org/OCI/ConnectorInfo:1.0 // /** * * Information on a OCI Connector object. Objects of this type must be * narrowed to a Connector information object for a concrete protocol * implementation, for example to <code>OCI::IIOP::ConnectorInfo</code> * in case the plug-in implements IIOP. * * @see Connector * **/ public interface ConnectorInfoOperations { // // IDL:orb.yoko.apache.org/OCI/ConnectorInfo/id:1.0 // /** The plugin id. */ String id(); // // IDL:orb.yoko.apache.org/OCI/ConnectorInfo/tag:1.0 // /** The profile id tag. */ int tag(); // // IDL:orb.yoko.apache.org/OCI/ConnectorInfo/describe:1.0 // /** * * Returns a human readable description of the transport. * * @return The description. * **/ String describe(); }
6,457
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/OCI/Current_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.OCI; import org.apache.yoko.orb.OCI.TransportInfo; final class CurrentStateHolder { java.util.Stack transportStack = new java.util.Stack(); } final public class Current_impl extends org.omg.CORBA.LocalObject implements org.apache.yoko.orb.OCI.Current { private java.util.Hashtable stateKey_ = new java.util.Hashtable(); // ------------------------------------------------------------------ // Private and protected member implementations // ------------------------------------------------------------------ private void destroyCurrentTSD() { Thread t = Thread.currentThread(); stateKey_.remove(t); } private CurrentStateHolder getStateHolder() { Thread t = Thread.currentThread(); CurrentStateHolder holder_ = (CurrentStateHolder) stateKey_.get(t); // // If the data isn't already allocated then allocate a new one // if (holder_ == null) { holder_ = new CurrentStateHolder(); stateKey_.put(t, holder_); } return holder_; } // ------------------------------------------------------------------ // Standard IDL to Java Mapping // ------------------------------------------------------------------ public org.apache.yoko.orb.OCI.TransportInfo get_oci_transport_info() { CurrentStateHolder holder = getStateHolder(); // // TODO: Exception? // if (holder.transportStack.isEmpty()) return null; return (org.apache.yoko.orb.OCI.TransportInfo) holder.transportStack .firstElement(); } // ------------------------------------------------------------------ // Yoko internal functions // Application programs must not use these functions directly // ------------------------------------------------------------------ public void _OB_preinvoke(TransportInfo info) { CurrentStateHolder holder = getStateHolder(); holder.transportStack.push(info); } public void _OB_postinvoke() { CurrentStateHolder holder = getStateHolder(); holder.transportStack.pop(); if (holder.transportStack.empty()) destroyCurrentTSD(); } }
6,458
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/OCI/AcceptorInfoOperations.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.OCI; // // IDL:orb.yoko.apache.org/OCI/AcceptorInfo:1.0 // /** * * Information on an OCI Acceptor object. Objects of this type must be * narrowed to an Acceptor information object for a concrete protocol * implementation, for example to <code>OCI::IIOP::AcceptorInfo</code> * in case the plug-in implements IIOP. * * @see Acceptor * **/ public interface AcceptorInfoOperations { // // IDL:orb.yoko.apache.org/OCI/AcceptorInfo/id:1.0 // /** The plugin id. */ String id(); // // IDL:orb.yoko.apache.org/OCI/AcceptorInfo/tag:1.0 // /** The profile id tag. */ int tag(); // // IDL:orb.yoko.apache.org/OCI/AcceptorInfo/describe:1.0 // /** * * Returns a human readable description of the transport. * * @return The description. * **/ String describe(); // // IDL:orb.yoko.apache.org/OCI/AcceptorInfo/add_accept_cb:1.0 // // // IDL:orb.yoko.apache.org/OCI/AcceptorInfo/remove_accept_cb:1.0 // }
6,459
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/OCI/TransportOperations.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.OCI; import org.apache.yoko.orb.OCI.Buffer; // // IDL:orb.yoko.apache.org/OCI/Transport:1.0 // /** * * The interface for a Transport object, which provides operations * for sending and receiving octet streams. In addition, it is * possible to register callbacks with the Transport object, which * are invoked whenever data can be sent or received without * blocking. * * @see Connector * @see Acceptor * **/ public interface TransportOperations { // // IDL:orb.yoko.apache.org/OCI/Transport/id:1.0 // /** The plugin id. */ String id(); // // IDL:orb.yoko.apache.org/OCI/Transport/tag:1.0 // /** The profile id tag. */ int tag(); // // IDL:orb.yoko.apache.org/OCI/Transport/mode:1.0 // /** The send/receive capabilities of this Transport. */ SendReceiveMode mode(); // // IDL:orb.yoko.apache.org/OCI/Transport/handle:1.0 // /** * * The "handle" for this Transport. The handle may <em>only</em> * be used to determine whether the Transport object is ready to * send or to receive data, e.g., with <code>select()</code> on * Unix-based operating systems. All other uses (e.g., calls to * <code>read()</code>, <code>write()</code>, * <code>close()</code>) are strictly non-compliant. A handle * value of -1 indicates that the protocol plug-in does not * support "selectable" Transports. * **/ int handle(); // // IDL:orb.yoko.apache.org/OCI/Transport/close:1.0 // /** * * Closes the Transport. After calling <code>close</code>, no * operations on this Transport object and its associated * TransportInfo object may be called. To ensure that no messages * get lost when <code>close</code> is called, * <code>shutdown</code> should be called first. Then dummy data * should be read from the Transport, using one of the * <code>receive</code> operations, until either an exception is * raised, or until connection closure is detected. After that its * save to call <code>close</code>, i.e., no messages can get * lost. * * @exception COMM_FAILURE In case of an error. * **/ void close(); // // IDL:orb.yoko.apache.org/OCI/Transport/shutdown:1.0 // /** * * Shutdown the Transport. Upon a successful shutdown, threads * blocking in the <code>receive</code> operations will return or * throw an exception. After calling <code>shutdown</code>, no * operations on associated TransportInfo object may be called. To * fully close the Transport, <code>close</code> must be called. * * @exception COMM_FAILURE In case of an error. * **/ void shutdown(); // // IDL:orb.yoko.apache.org/OCI/Transport/receive:1.0 // /** * * Receives a buffer's contents. * * @param buf The buffer to fill. * * @param block If set to <code>TRUE</code>, the operation blocks * until the buffer is full. If set to <code>FALSE</code>, the * operation fills as much of the buffer as possible without * blocking. * * @exception COMM_FAILURE In case of an error. * **/ void receive(Buffer buf, boolean block); // // IDL:orb.yoko.apache.org/OCI/Transport/receive_detect:1.0 // /** * * Similar to <code>receive</code>, but it signals a connection * loss by returning <code>FALSE</code> instead of raising * <code>COMM_FAILURE</code>. * * @param buf The buffer to fill. * * @param block If set to <code>TRUE</code>, the operation blocks * until the buffer is full. If set to <code>FALSE</code>, the * operation fills as much of the buffer as possible without * blocking. * * @return <code>FALSE</code> if a connection loss is * detected, <code>TRUE</code> otherwise. * * @exception COMM_FAILURE In case of an error. * **/ boolean receive_detect(Buffer buf, boolean block); // // IDL:orb.yoko.apache.org/OCI/Transport/receive_timeout:1.0 // /** * * Similar to <code>receive</code>, but it is * possible to specify a timeout. On return the caller can test * whether there was a timeout by checking if the buffer has * been filled completely. * * @param buf The buffer to fill. * * @param timeout The timeout value in milliseconds. A zero * timeout is equivalent to calling <code>receive(buf, FALSE)</code>. * * @exception COMM_FAILURE In case of an error. * **/ void receive_timeout(Buffer buf, int timeout); // // IDL:orb.yoko.apache.org/OCI/Transport/receive_timeout_detect:1.0 // /** * * Similar to <code>receive_timeout</code>, but it signals a * connection loss by returning <code>FALSE</code> instead of * raising <code>COMM_FAILURE</code>. * * @param buf The buffer to fill. * * @param timeout The timeout value in milliseconds. A zero * timeout is equivalent to calling <code>receive(buf, FALSE)</code>. * * @return <code>FALSE</code> if a connection loss is * detected, <code>TRUE</code> otherwise. * * @exception COMM_FAILURE In case of an error. * **/ boolean receive_timeout_detect(Buffer buf, int timeout); // // IDL:orb.yoko.apache.org/OCI/Transport/send:1.0 // /** * * Sends a buffer's contents. * * @param buf The buffer to send. * * @param block If set to <code>TRUE</code>, the operation blocks * until the buffer has completely been sent. If set to * <code>FALSE</code>, the operation sends as much of the buffer's * data as possible without blocking. * * @exception COMM_FAILURE In case of an error. * **/ void send(Buffer buf, boolean block); // // IDL:orb.yoko.apache.org/OCI/Transport/send_detect:1.0 // /** * * Similar to <code>send</code>, but it signals a connection loss * by returning <code>FALSE</code> instead of raising * <code>COMM_FAILURE</code>. * * @param buf The buffer to fill. * * @param block If set to <code>TRUE</code>, the operation blocks * until the entire buffer has been sent. If set to * <code>FALSE</code>, the operation sends as much of the buffer's * data as possible without blocking. * * @return <code>FALSE</code> if a connection loss is * detected, <code>TRUE</code> otherwise. * * @exception COMM_FAILURE In case of an error. * **/ boolean send_detect(Buffer buf, boolean block); // // IDL:orb.yoko.apache.org/OCI/Transport/send_timeout:1.0 // /** * * Similar to <code>send</code>, but it is possible * to specify a timeout. On return the caller can test whether * there was a timeout by checking if the buffer has * been sent completely. * * @param buf The buffer to send. * * @param timeout The timeout value in milliseconds. A zero * timeout is equivalent to calling <code>send(buf, FALSE)</code>. * * @exception COMM_FAILURE In case of an error. * **/ void send_timeout(Buffer buf, int timeout); // // IDL:orb.yoko.apache.org/OCI/Transport/send_timeout_detect:1.0 // /** * * Similar to <code>send_timeout</code>, but it signals a * connection loss by returning <code>FALSE</code> instead of * raising <code>COMM_FAILURE</code>. * * @param buf The buffer to fill. * * @param timeout The timeout value in milliseconds. A zero * timeout is equivalent to calling <code>send(buf, FALSE)</code>. * * @return <code>FALSE</code> if a connection loss is * detected, <code>TRUE</code> otherwise. * * @exception COMM_FAILURE In case of an error. * **/ boolean send_timeout_detect(Buffer buf, int timeout); // // IDL:orb.yoko.apache.org/OCI/Transport/get_info:1.0 // /** * * Returns the information object associated with * the Transport. * * @return The Transport information object. * **/ TransportInfo get_info(); }
6,460
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/OCI/ConFactoryRegistry_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.OCI; import org.apache.yoko.orb.OCI.ConFactory; import org.apache.yoko.orb.OCI.FactoryAlreadyExists; import org.apache.yoko.orb.OCI.NoSuchFactory; public final class ConFactoryRegistry_impl extends org.omg.CORBA.LocalObject implements org.apache.yoko.orb.OCI.ConFactoryRegistry { // // All connector factories // java.util.Vector factories_ = new java.util.Vector(); // ------------------------------------------------------------------ // Standard IDL to Java Mapping // ------------------------------------------------------------------ public synchronized void add_factory(ConFactory factory) throws FactoryAlreadyExists { String id = factory.id(); for (int i = 0; i < factories_.size(); i++) if (id.equals(((ConFactory) factories_.elementAt(i)).id())) throw new FactoryAlreadyExists(id); factories_.addElement(factory); } public synchronized ConFactory get_factory(String id) throws NoSuchFactory { for (int i = 0; i < factories_.size(); i++) { ConFactory factory = (ConFactory) factories_.elementAt(i); if (id.equals(factory.id())) return factory; } throw new NoSuchFactory(id); } public synchronized ConFactory[] get_factories() { ConFactory[] result = new ConFactory[factories_.size()]; factories_.copyInto(result); return result; } // ------------------------------------------------------------------ // Yoko internal functions // Application programs must not use these functions directly // ------------------------------------------------------------------ public ConFactoryRegistry_impl() { } }
6,461
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/OCI/BufferHelper.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.OCI; public final class BufferHelper { static public void read(org.omg.CORBA.portable.InputStream in) { throw new RuntimeException(); } static public void write(org.omg.CORBA.portable.OutputStream out, Buffer val) { throw new RuntimeException(); } }
6,462
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/OCI/AcceptCBOperations.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.OCI; // // IDL:orb.yoko.apache.org/OCI/AcceptCB:1.0 // /** * * An interface for an accept callback object. * * @see AcceptorInfo * **/ public interface AcceptCBOperations { // // IDL:orb.yoko.apache.org/OCI/AcceptCB/accept_cb:1.0 // /** * * Called after a new connection has been accepted. If the * application wishes to reject the connection * <code>CORBA::NO_PERMISSION</code> may be raised. * * @param transport_info The TransportInfo for the new connection. * **/ void accept_cb(TransportInfo transport_info); }
6,463
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/OCI/ProfileInfo.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.OCI; // // IDL:orb.yoko.apache.org/OCI/ProfileInfo:1.0 // /** * * Basic information about an IOR profile. Profiles for specific * protocols contain additional data. (For example, an IIOP profile * also contains a hostname and a port number.) * * @member key The object key. * * @member major The major version number of the ORB's protocol. (For * example, the major GIOP version, if the underlying ORB uses GIOP.) * * @member minor The minor version number of the ORB's protocol. (For * example, the minor GIOP version, if the underlying ORB uses GIOP.) * * @member id The id of the profile that contains this information. * * @member index The position index of this profile in an IOR. * * @member components A sequence of tagged components. * **/ final public class ProfileInfo implements org.omg.CORBA.portable.IDLEntity { private static final String _ob_id = "IDL:orb.yoko.apache.org/OCI/ProfileInfo:1.0"; public ProfileInfo() { } public ProfileInfo(byte[] key, byte major, byte minor, int id, int index, org.omg.IOP.TaggedComponent[] components) { this.key = key; this.major = major; this.minor = minor; this.id = id; this.index = index; this.components = components; } public byte[] key; public byte major; public byte minor; public int id; public int index; public org.omg.IOP.TaggedComponent[] components; }
6,464
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/OCI/NoSuchFactoryHolder.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.OCI; // // IDL:orb.yoko.apache.org/OCI/NoSuchFactory:1.0 // final public class NoSuchFactoryHolder implements org.omg.CORBA.portable.Streamable { public NoSuchFactory value; public NoSuchFactoryHolder() { } public NoSuchFactoryHolder(NoSuchFactory initial) { value = initial; } public void _read(org.omg.CORBA.portable.InputStream in) { value = NoSuchFactoryHelper.read(in); } public void _write(org.omg.CORBA.portable.OutputStream out) { NoSuchFactoryHelper.write(out, value); } public org.omg.CORBA.TypeCode _type() { return NoSuchFactoryHelper.type(); } }
6,465
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/OCI/AccFactoryRegistryHolder.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.OCI; // // IDL:orb.yoko.apache.org/OCI/AccFactoryRegistry:1.0 // final public class AccFactoryRegistryHolder implements org.omg.CORBA.portable.Streamable { public AccFactoryRegistry value; public AccFactoryRegistryHolder() { } public AccFactoryRegistryHolder(AccFactoryRegistry initial) { value = initial; } public void _read(org.omg.CORBA.portable.InputStream in) { value = AccFactoryRegistryHelper.read(in); } public void _write(org.omg.CORBA.portable.OutputStream out) { AccFactoryRegistryHelper.write(out, value); } public org.omg.CORBA.TypeCode _type() { return AccFactoryRegistryHelper.type(); } }
6,466
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/OCI/AccFactoryRegistry_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.OCI; import org.apache.yoko.orb.OCI.AccFactory; import org.apache.yoko.orb.OCI.FactoryAlreadyExists; import org.apache.yoko.orb.OCI.NoSuchFactory; public final class AccFactoryRegistry_impl extends org.omg.CORBA.LocalObject implements org.apache.yoko.orb.OCI.AccFactoryRegistry { // // All acceptor factories // java.util.Vector factories_ = new java.util.Vector(); // ------------------------------------------------------------------ // Standard IDL to Java Mapping // ------------------------------------------------------------------ public synchronized void add_factory(AccFactory factory) throws FactoryAlreadyExists { String id = factory.id(); for (int i = 0; i < factories_.size(); i++) if (id.equals(((AccFactory) factories_.elementAt(i)).id())) throw new FactoryAlreadyExists(id); factories_.addElement(factory); } public synchronized AccFactory get_factory(String id) throws NoSuchFactory { for (int i = 0; i < factories_.size(); i++) { AccFactory factory = (AccFactory) factories_.elementAt(i); if (id.equals(factory.id())) return factory; } throw new NoSuchFactory(id); } public synchronized AccFactory[] get_factories() { AccFactory[] result = new AccFactory[factories_.size()]; factories_.copyInto(result); return result; } // ------------------------------------------------------------------ // Yoko internal functions // Application programs must not use these functions directly // ------------------------------------------------------------------ public AccFactoryRegistry_impl() { } }
6,467
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/OCI/SendReceiveModeHolder.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.OCI; // // IDL:orb.yoko.apache.org/OCI/SendReceiveMode:1.0 // final public class SendReceiveModeHolder implements org.omg.CORBA.portable.Streamable { public SendReceiveMode value; public SendReceiveModeHolder() { } public SendReceiveModeHolder(SendReceiveMode initial) { value = initial; } public void _read(org.omg.CORBA.portable.InputStream in) { value = SendReceiveModeHelper.read(in); } public void _write(org.omg.CORBA.portable.OutputStream out) { SendReceiveModeHelper.write(out, value); } public org.omg.CORBA.TypeCode _type() { return SendReceiveModeHelper.type(); } }
6,468
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/OCI/ConFactoryInfoHolder.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.OCI; // // IDL:orb.yoko.apache.org/OCI/ConFactoryInfo:1.0 // final public class ConFactoryInfoHolder implements org.omg.CORBA.portable.Streamable { public ConFactoryInfo value; public ConFactoryInfoHolder() { } public ConFactoryInfoHolder(ConFactoryInfo initial) { value = initial; } public void _read(org.omg.CORBA.portable.InputStream in) { value = ConFactoryInfoHelper.read(in); } public void _write(org.omg.CORBA.portable.OutputStream out) { ConFactoryInfoHelper.write(out, value); } public org.omg.CORBA.TypeCode _type() { return ConFactoryInfoHelper.type(); } }
6,469
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/OCI/PluginHolder.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.OCI; // // IDL:orb.yoko.apache.org/OCI/Plugin:1.0 // final public class PluginHolder implements org.omg.CORBA.portable.Streamable { public Plugin value; public PluginHolder() { } public PluginHolder(Plugin initial) { value = initial; } public void _read(org.omg.CORBA.portable.InputStream in) { value = PluginHelper.read(in); } public void _write(org.omg.CORBA.portable.OutputStream out) { PluginHelper.write(out, value); } public org.omg.CORBA.TypeCode _type() { return PluginHelper.type(); } }
6,470
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/OCI/AcceptorHelper.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.OCI; // // IDL:orb.yoko.apache.org/OCI/Acceptor:1.0 // final public class AcceptorHelper { public static void insert(org.omg.CORBA.Any any, Acceptor val) { any.insert_Object(val, type()); } public static Acceptor 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(), "Acceptor"); } return typeCode_; } public static String id() { return "IDL:orb.yoko.apache.org/OCI/Acceptor:1.0"; } public static Acceptor 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, Acceptor 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 Acceptor narrow(org.omg.CORBA.Object val) { try { return (Acceptor)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,471
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/OCI/OriginatorHelper.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.OCI; // // IDL:orb.yoko.apache.org/OCI/Originator:1.0 // final public class OriginatorHelper { public static void insert(org.omg.CORBA.Any any, short val) { org.omg.CORBA.portable.OutputStream out = any.create_output_stream(); write(out, val); any.read_value(out.create_input_stream(), type()); } public static short 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(); typeCode_ = orb.create_alias_tc(id(), "Originator", orb.get_primitive_tc(org.omg.CORBA.TCKind.tk_ushort)); } return typeCode_; } public static String id() { return "IDL:orb.yoko.apache.org/OCI/Originator:1.0"; } public static short read(org.omg.CORBA.portable.InputStream in) { short _ob_v; _ob_v = in.read_ushort(); return _ob_v; } public static void write(org.omg.CORBA.portable.OutputStream out, short val) { out.write_ushort(val); } }
6,472
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/OCI/PluginIdSeqHolder.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.OCI; // // IDL:orb.yoko.apache.org/OCI/PluginIdSeq:1.0 // final public class PluginIdSeqHolder implements org.omg.CORBA.portable.Streamable { public String[] value; public PluginIdSeqHolder() { } public PluginIdSeqHolder(String[] initial) { value = initial; } public void _read(org.omg.CORBA.portable.InputStream in) { value = PluginIdSeqHelper.read(in); } public void _write(org.omg.CORBA.portable.OutputStream out) { PluginIdSeqHelper.write(out, value); } public org.omg.CORBA.TypeCode _type() { return PluginIdSeqHelper.type(); } }
6,473
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/OCI/ProfileInfoHelper.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.OCI; // // IDL:orb.yoko.apache.org/OCI/ProfileInfo:1.0 // final public class ProfileInfoHelper { public static void insert(org.omg.CORBA.Any any, ProfileInfo val) { org.omg.CORBA.portable.OutputStream out = any.create_output_stream(); write(out, val); any.read_value(out.create_input_stream(), type()); } public static ProfileInfo 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[6]; members[0] = new org.omg.CORBA.StructMember(); members[0].name = "key"; members[0].type = ObjectKeyHelper.type(); members[1] = new org.omg.CORBA.StructMember(); members[1].name = "major"; members[1].type = orb.get_primitive_tc(org.omg.CORBA.TCKind.tk_octet); members[2] = new org.omg.CORBA.StructMember(); members[2].name = "minor"; members[2].type = orb.get_primitive_tc(org.omg.CORBA.TCKind.tk_octet); members[3] = new org.omg.CORBA.StructMember(); members[3].name = "id"; members[3].type = ProfileIdHelper.type(); members[4] = new org.omg.CORBA.StructMember(); members[4].name = "index"; members[4].type = orb.get_primitive_tc(org.omg.CORBA.TCKind.tk_ulong); members[5] = new org.omg.CORBA.StructMember(); members[5].name = "components"; members[5].type = TaggedComponentSeqHelper.type(); typeCode_ = orb.create_struct_tc(id(), "ProfileInfo", members); } return typeCode_; } public static String id() { return "IDL:orb.yoko.apache.org/OCI/ProfileInfo:1.0"; } public static ProfileInfo read(org.omg.CORBA.portable.InputStream in) { ProfileInfo _ob_v = new ProfileInfo(); _ob_v.key = ObjectKeyHelper.read(in); _ob_v.major = in.read_octet(); _ob_v.minor = in.read_octet(); _ob_v.id = ProfileIdHelper.read(in); _ob_v.index = in.read_ulong(); _ob_v.components = TaggedComponentSeqHelper.read(in); return _ob_v; } public static void write(org.omg.CORBA.portable.OutputStream out, ProfileInfo val) { ObjectKeyHelper.write(out, val.key); out.write_octet(val.major); out.write_octet(val.minor); ProfileIdHelper.write(out, val.id); out.write_ulong(val.index); TaggedComponentSeqHelper.write(out, val.components); } }
6,474
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/OCI/CloseCBOperations.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.OCI; // // IDL:orb.yoko.apache.org/OCI/CloseCB:1.0 // /** * * An interface for a close callback object. * * @see TransportInfo * **/ public interface CloseCBOperations { // // IDL:orb.yoko.apache.org/OCI/CloseCB/close_cb:1.0 // /** * * Called before a connection is closed. * * @param transport_info The TransportInfo for the new closeion. * **/ void close_cb(TransportInfo transport_info); }
6,475
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/OCI/ProfileInfoHolder.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.OCI; // // IDL:orb.yoko.apache.org/OCI/ProfileInfo:1.0 // final public class ProfileInfoHolder implements org.omg.CORBA.portable.Streamable { public ProfileInfo value; public ProfileInfoHolder() { } public ProfileInfoHolder(ProfileInfo initial) { value = initial; } public void _read(org.omg.CORBA.portable.InputStream in) { value = ProfileInfoHelper.read(in); } public void _write(org.omg.CORBA.portable.OutputStream out) { ProfileInfoHelper.write(out, value); } public org.omg.CORBA.TypeCode _type() { return ProfileInfoHelper.type(); } }
6,476
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/OCI/SERVER_SIDE.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.OCI; // // IDL:orb.yoko.apache.org/OCI/SERVER_SIDE:1.0 // /** * * This transport was created as a server side connection. * * @see Originator * @see TransportInfo * **/ public interface SERVER_SIDE { short value = (short)(1L); }
6,477
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/OCI/PluginIdSeqHelper.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.OCI; // // IDL:orb.yoko.apache.org/OCI/PluginIdSeq:1.0 // final public class PluginIdSeqHelper { 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( 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_alias_tc(id(), "PluginIdSeq", orb.create_sequence_tc(0, PluginIdHelper.type())); } return typeCode_; } public static String id() { return "IDL:orb.yoko.apache.org/OCI/PluginIdSeq: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] = in.read_string(); return _ob_v; } public static void write(org.omg.CORBA.portable.OutputStream out, String[] val) { int len0 = val.length; out.write_ulong(len0); for(int i0 = 0; i0 < len0; i0++) out.write_string(val[i0]); } }
6,478
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/OCI/PluginHelper.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.OCI; // // IDL:orb.yoko.apache.org/OCI/Plugin:1.0 // final public class PluginHelper { public static void insert(org.omg.CORBA.Any any, Plugin val) { any.insert_Object(val, type()); } public static Plugin 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(), "Plugin"); } return typeCode_; } public static String id() { return "IDL:orb.yoko.apache.org/OCI/Plugin:1.0"; } public static Plugin 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, Plugin 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 Plugin narrow(org.omg.CORBA.Object val) { try { return (Plugin)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,479
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/OCI/AcceptorHolder.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.OCI; // // IDL:orb.yoko.apache.org/OCI/Acceptor:1.0 // final public class AcceptorHolder implements org.omg.CORBA.portable.Streamable { public Acceptor value; public AcceptorHolder() { } public AcceptorHolder(Acceptor initial) { value = initial; } public void _read(org.omg.CORBA.portable.InputStream in) { value = AcceptorHelper.read(in); } public void _write(org.omg.CORBA.portable.OutputStream out) { AcceptorHelper.write(out, value); } public org.omg.CORBA.TypeCode _type() { return AcceptorHelper.type(); } }
6,480
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/OCI/TaggedComponentSeqHelper.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.OCI; // // IDL:orb.yoko.apache.org/OCI/TaggedComponentSeq:1.0 // final public class TaggedComponentSeqHelper { public static void insert(org.omg.CORBA.Any any, org.omg.IOP.TaggedComponent[] val) { org.omg.CORBA.portable.OutputStream out = any.create_output_stream(); write(out, val); any.read_value(out.create_input_stream(), type()); } public static org.omg.IOP.TaggedComponent[] 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(); typeCode_ = orb.create_alias_tc(id(), "TaggedComponentSeq", org.omg.IOP.TaggedComponentSeqHelper.type()); } return typeCode_; } public static String id() { return "IDL:orb.yoko.apache.org/OCI/TaggedComponentSeq:1.0"; } public static org.omg.IOP.TaggedComponent[] read(org.omg.CORBA.portable.InputStream in) { org.omg.IOP.TaggedComponent[] _ob_v; _ob_v = org.omg.IOP.TaggedComponentSeqHelper.read(in); return _ob_v; } public static void write(org.omg.CORBA.portable.OutputStream out, org.omg.IOP.TaggedComponent[] val) { org.omg.IOP.TaggedComponentSeqHelper.write(out, val); } }
6,481
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/OCI/ProfileIdHelper.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.OCI; // // IDL:orb.yoko.apache.org/OCI/ProfileId:1.0 // final public class ProfileIdHelper { public static void insert(org.omg.CORBA.Any any, int val) { org.omg.CORBA.portable.OutputStream out = any.create_output_stream(); write(out, val); any.read_value(out.create_input_stream(), type()); } public static int 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(); typeCode_ = orb.create_alias_tc(id(), "ProfileId", org.omg.IOP.ProfileIdHelper.type()); } return typeCode_; } public static String id() { return "IDL:orb.yoko.apache.org/OCI/ProfileId:1.0"; } public static int read(org.omg.CORBA.portable.InputStream in) { int _ob_v; _ob_v = org.omg.IOP.ProfileIdHelper.read(in); return _ob_v; } public static void write(org.omg.CORBA.portable.OutputStream out, int val) { org.omg.IOP.ProfileIdHelper.write(out, val); } }
6,482
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/OCI/AccFactoryRegistryHelper.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.OCI; // // IDL:orb.yoko.apache.org/OCI/AccFactoryRegistry:1.0 // final public class AccFactoryRegistryHelper { public static void insert(org.omg.CORBA.Any any, AccFactoryRegistry val) { any.insert_Object(val, type()); } public static AccFactoryRegistry 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(), "AccFactoryRegistry"); } return typeCode_; } public static String id() { return "IDL:orb.yoko.apache.org/OCI/AccFactoryRegistry:1.0"; } public static AccFactoryRegistry 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, AccFactoryRegistry 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 AccFactoryRegistry narrow(org.omg.CORBA.Object val) { try { return (AccFactoryRegistry)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,483
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/OCI/AcceptorInfo.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.OCI; // // IDL:orb.yoko.apache.org/OCI/AcceptorInfo:1.0 // /** * * Information on an OCI Acceptor object. Objects of this type must be * narrowed to an Acceptor information object for a concrete protocol * implementation, for example to <code>OCI::IIOP::AcceptorInfo</code> * in case the plug-in implements IIOP. * * @see Acceptor * **/ public interface AcceptorInfo extends AcceptorInfoOperations, org.omg.CORBA.Object { }
6,484
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/OCI/SendReceiveModeHelper.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.OCI; // // IDL:orb.yoko.apache.org/OCI/SendReceiveMode:1.0 // final public class SendReceiveModeHelper { public static void insert(org.omg.CORBA.Any any, SendReceiveMode val) { org.omg.CORBA.portable.OutputStream out = any.create_output_stream(); write(out, val); any.read_value(out.create_input_stream(), type()); } public static SendReceiveMode 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(); String[] members = new String[3]; members[0] = "SendOnly"; members[1] = "ReceiveOnly"; members[2] = "SendReceive"; typeCode_ = orb.create_enum_tc(id(), "SendReceiveMode", members); } return typeCode_; } public static String id() { return "IDL:orb.yoko.apache.org/OCI/SendReceiveMode:1.0"; } public static SendReceiveMode read(org.omg.CORBA.portable.InputStream in) { SendReceiveMode _ob_v; _ob_v = SendReceiveMode.from_int(in.read_ulong()); return _ob_v; } public static void write(org.omg.CORBA.portable.OutputStream out, SendReceiveMode val) { out.write_ulong(val.value()); } }
6,485
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/OCI/ConFactoryInfoHelper.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.OCI; // // IDL:orb.yoko.apache.org/OCI/ConFactoryInfo:1.0 // final public class ConFactoryInfoHelper { public static void insert(org.omg.CORBA.Any any, ConFactoryInfo val) { any.insert_Object(val, type()); } public static ConFactoryInfo 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(), "ConFactoryInfo"); } return typeCode_; } public static String id() { return "IDL:orb.yoko.apache.org/OCI/ConFactoryInfo:1.0"; } public static ConFactoryInfo 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, ConFactoryInfo 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 ConFactoryInfo narrow(org.omg.CORBA.Object val) { try { return (ConFactoryInfo)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,486
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/OCI/ConnectCBHelper.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.OCI; // // IDL:orb.yoko.apache.org/OCI/ConnectCB:1.0 // final public class ConnectCBHelper { public static void insert(org.omg.CORBA.Any any, ConnectCB val) { any.insert_Object(val, type()); } public static ConnectCB 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(), "ConnectCB"); } return typeCode_; } public static String id() { return "IDL:orb.yoko.apache.org/OCI/ConnectCB:1.0"; } public static ConnectCB 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, ConnectCB 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 ConnectCB narrow(org.omg.CORBA.Object val) { try { return (ConnectCB)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,487
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/OCI/AccFactoryInfoOperations.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.OCI; // // IDL:orb.yoko.apache.org/OCI/AccFactoryInfo:1.0 // /** * * Information on an OCI AccFactory object. * * @see AccFactory * **/ public interface AccFactoryInfoOperations { // // IDL:orb.yoko.apache.org/OCI/AccFactoryInfo/id:1.0 // /** The plugin id. */ String id(); // // IDL:orb.yoko.apache.org/OCI/AccFactoryInfo/tag:1.0 // /** The profile id tag. */ int tag(); // // IDL:orb.yoko.apache.org/OCI/AccFactoryInfo/describe:1.0 // /** * * Returns a human readable description of the transport. * * @return The description. * **/ String describe(); }
6,488
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/OCI/InvalidParam.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.OCI; // // IDL:orb.yoko.apache.org/OCI/InvalidParam:1.0 // /** * * A parameter is invalid. * * @member reason A description of the error. * **/ final public class InvalidParam extends org.omg.CORBA.UserException { private static final String _ob_id = "IDL:orb.yoko.apache.org/OCI/InvalidParam:1.0"; public InvalidParam() { super(_ob_id); } public InvalidParam(String reason) { super(_ob_id); this.reason = reason; } public InvalidParam(String _reason, String reason) { super(_ob_id + " " + _reason); this.reason = reason; } public String reason; }
6,489
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/OCI/AccFactorySeqHelper.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.OCI; // // IDL:orb.yoko.apache.org/OCI/AccFactorySeq:1.0 // final public class AccFactorySeqHelper { public static void insert(org.omg.CORBA.Any any, AccFactory[] val) { org.omg.CORBA.portable.OutputStream out = any.create_output_stream(); write(out, val); any.read_value(out.create_input_stream(), type()); } public static AccFactory[] 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(); typeCode_ = orb.create_alias_tc(id(), "AccFactorySeq", orb.create_sequence_tc(0, AccFactoryHelper.type())); } return typeCode_; } public static String id() { return "IDL:orb.yoko.apache.org/OCI/AccFactorySeq:1.0"; } public static AccFactory[] 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, AccFactory[] 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); } }
6,490
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/OCI/ConFactoryHolder.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.OCI; // // IDL:orb.yoko.apache.org/OCI/ConFactory:1.0 // final public class ConFactoryHolder implements org.omg.CORBA.portable.Streamable { public ConFactory value; public ConFactoryHolder() { } public ConFactoryHolder(ConFactory initial) { value = initial; } public void _read(org.omg.CORBA.portable.InputStream in) { value = ConFactoryHelper.read(in); } public void _write(org.omg.CORBA.portable.OutputStream out) { ConFactoryHelper.write(out, value); } public org.omg.CORBA.TypeCode _type() { return ConFactoryHelper.type(); } }
6,491
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/OCI/AccFactoryInfoHelper.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.OCI; // // IDL:orb.yoko.apache.org/OCI/AccFactoryInfo:1.0 // final public class AccFactoryInfoHelper { public static void insert(org.omg.CORBA.Any any, AccFactoryInfo val) { any.insert_Object(val, type()); } public static AccFactoryInfo 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(), "AccFactoryInfo"); } return typeCode_; } public static String id() { return "IDL:orb.yoko.apache.org/OCI/AccFactoryInfo:1.0"; } public static AccFactoryInfo 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, AccFactoryInfo 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 AccFactoryInfo narrow(org.omg.CORBA.Object val) { try { return (AccFactoryInfo)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,492
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/OCI/ConnectorSeqHelper.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.OCI; // // IDL:orb.yoko.apache.org/OCI/ConnectorSeq:1.0 // final public class ConnectorSeqHelper { public static void insert(org.omg.CORBA.Any any, Connector[] val) { org.omg.CORBA.portable.OutputStream out = any.create_output_stream(); write(out, val); any.read_value(out.create_input_stream(), type()); } public static Connector[] 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(); typeCode_ = orb.create_alias_tc(id(), "ConnectorSeq", orb.create_sequence_tc(0, ConnectorHelper.type())); } return typeCode_; } public static String id() { return "IDL:orb.yoko.apache.org/OCI/ConnectorSeq:1.0"; } public static Connector[] 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, Connector[] 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); } }
6,493
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/OCI/TransportHolder.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.OCI; // // IDL:orb.yoko.apache.org/OCI/Transport:1.0 // final public class TransportHolder implements org.omg.CORBA.portable.Streamable { public Transport value; public TransportHolder() { } public TransportHolder(Transport initial) { value = initial; } public void _read(org.omg.CORBA.portable.InputStream in) { value = TransportHelper.read(in); } public void _write(org.omg.CORBA.portable.OutputStream out) { TransportHelper.write(out, value); } public org.omg.CORBA.TypeCode _type() { return TransportHelper.type(); } }
6,494
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/OCI/Current.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.OCI; // // IDL:orb.yoko.apache.org/OCI/Current:1.0 // /** * * Interface to access Transport and Acceptor information objects * related to the current request. * **/ public interface Current extends CurrentOperations, org.omg.CORBA.Current { }
6,495
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/OCI/TransportHelper.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.OCI; // // IDL:orb.yoko.apache.org/OCI/Transport:1.0 // final public class TransportHelper { public static void insert(org.omg.CORBA.Any any, Transport val) { any.insert_Object(val, type()); } public static Transport 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(), "Transport"); } return typeCode_; } public static String id() { return "IDL:orb.yoko.apache.org/OCI/Transport:1.0"; } public static Transport 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, Transport 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 Transport narrow(org.omg.CORBA.Object val) { try { return (Transport)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,496
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/OCI/ConFactoryHelper.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.OCI; // // IDL:orb.yoko.apache.org/OCI/ConFactory:1.0 // final public class ConFactoryHelper { public static void insert(org.omg.CORBA.Any any, ConFactory val) { any.insert_Object(val, type()); } public static ConFactory 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(), "ConFactory"); } return typeCode_; } public static String id() { return "IDL:orb.yoko.apache.org/OCI/ConFactory:1.0"; } public static ConFactory 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, ConFactory 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 ConFactory narrow(org.omg.CORBA.Object val) { try { return (ConFactory)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,497
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/OCI/AccFactoryInfoHolder.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.OCI; // // IDL:orb.yoko.apache.org/OCI/AccFactoryInfo:1.0 // final public class AccFactoryInfoHolder implements org.omg.CORBA.portable.Streamable { public AccFactoryInfo value; public AccFactoryInfoHolder() { } public AccFactoryInfoHolder(AccFactoryInfo initial) { value = initial; } public void _read(org.omg.CORBA.portable.InputStream in) { value = AccFactoryInfoHelper.read(in); } public void _write(org.omg.CORBA.portable.OutputStream out) { AccFactoryInfoHelper.write(out, value); } public org.omg.CORBA.TypeCode _type() { return AccFactoryInfoHelper.type(); } }
6,498
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/OCI/ObjectKeyHelper.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.OCI; // // IDL:orb.yoko.apache.org/OCI/ObjectKey:1.0 // final public class ObjectKeyHelper { public static void insert(org.omg.CORBA.Any any, byte[] val) { org.omg.CORBA.portable.OutputStream out = any.create_output_stream(); write(out, val); any.read_value(out.create_input_stream(), type()); } public static byte[] 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(); typeCode_ = orb.create_alias_tc(id(), "ObjectKey", org.omg.CORBA.OctetSeqHelper.type()); } return typeCode_; } public static String id() { return "IDL:orb.yoko.apache.org/OCI/ObjectKey:1.0"; } public static byte[] read(org.omg.CORBA.portable.InputStream in) { byte[] _ob_v; _ob_v = org.omg.CORBA.OctetSeqHelper.read(in); return _ob_v; } public static void write(org.omg.CORBA.portable.OutputStream out, byte[] val) { org.omg.CORBA.OctetSeqHelper.write(out, val); } }
6,499