public static org.omg.CORBA.TypeCode type() { if (_type == null) { _type = org.omg .CORBA .ORB .init() .create_struct_tc( erabilgarriak.FileDataHelper.id(), "FileData", new org.omg.CORBA.StructMember[] { new org.omg.CORBA.StructMember( "name", org.omg.CORBA.ORB.init().create_string_tc(0), null), new org.omg.CORBA.StructMember( "size", org.omg .CORBA .ORB .init() .get_primitive_tc(org.omg.CORBA.TCKind.from_int(23)), null), new org.omg.CORBA.StructMember( "hash", org.omg.CORBA.ORB.init().create_string_tc(0), null) }); } return _type; }
/** * Return the i_Trace TypeCode * * @return a TypeCode */ public static org.omg.CORBA.TypeCode type() { if (_tc == null) { org.omg.CORBA.ORB orb = org.omg.CORBA.ORB.init(); _tc = orb.create_interface_tc(id(), "i_Trace"); } return _tc; }
public static synchronized org.omg.CORBA.TypeCode type() { if (__typeCode == null) { synchronized (org.omg.CORBA.TypeCode.class) { if (__typeCode == null) { if (__active) { return org.omg.CORBA.ORB.init().create_recursive_tc(_id); } __active = true; org.omg.CORBA.StructMember[] _members0 = new org.omg.CORBA.StructMember[1]; org.omg.CORBA.TypeCode _tcOf_members0 = null; _tcOf_members0 = org.omg.CORBA.ORB.init().create_string_tc(0); _members0[0] = new org.omg.CORBA.StructMember("s", _tcOf_members0, null); __typeCode = org.omg .CORBA .ORB .init() .create_exception_tc( lagern.LagerPackage.EAlreadyExistsHelper.id(), "EAlreadyExists", _members0); __active = false; } } } return __typeCode; }
public static synchronized org.omg.CORBA.TypeCode type() { if (__typeCode == null) { synchronized (org.omg.CORBA.TypeCode.class) { if (__typeCode == null) { if (__active) { return org.omg.CORBA.ORB.init().create_recursive_tc(_id); } __active = true; org.omg.CORBA.StructMember[] _members0 = new org.omg.CORBA.StructMember[2]; org.omg.CORBA.TypeCode _tcOf_members0 = null; _tcOf_members0 = org.omg.CosNaming.NameComponentHelper.type(); _tcOf_members0 = org.omg.CORBA.ORB.init().create_sequence_tc(0, _tcOf_members0); _tcOf_members0 = org.omg .CORBA .ORB .init() .create_alias_tc(org.omg.CosNaming.NameHelper.id(), "Name", _tcOf_members0); _members0[0] = new org.omg.CORBA.StructMember("binding_name", _tcOf_members0, null); _tcOf_members0 = org.omg.CosNaming.BindingTypeHelper.type(); _members0[1] = new org.omg.CORBA.StructMember("binding_type", _tcOf_members0, null); __typeCode = org.omg .CORBA .ORB .init() .create_struct_tc(org.omg.CosNaming.BindingHelper.id(), "Binding", _members0); __active = false; } } } return __typeCode; }
public static org.omg.CORBA.TypeCode type() { if (_type == null) { _type = org.omg .CORBA .ORB .init() .create_struct_tc( org.omg.CORBA.ExceptionDescriptionHelper.id(), "ExceptionDescription", new org.omg.CORBA.StructMember[] { new org.omg.CORBA.StructMember( "name", org.omg.CORBA.IdentifierHelper.type(), null), new org.omg.CORBA.StructMember( "id", org.omg.CORBA.RepositoryIdHelper.type(), null), new org.omg.CORBA.StructMember( "defined_in", org.omg.CORBA.RepositoryIdHelper.type(), null), new org.omg.CORBA.StructMember( "version", org.omg.CORBA.VersionSpecHelper.type(), null), new org.omg.CORBA.StructMember( "type", org.omg.CORBA.ORB.init().get_primitive_tc(org.omg.CORBA.TCKind.tk_TypeCode), null) }); } return _type; }
public static synchronized org.omg.CORBA.TypeCode type() { if (__typeCode == null) { synchronized (org.omg.CORBA.TypeCode.class) { if (__typeCode == null) { if (__active) { return org.omg.CORBA.ORB.init().create_recursive_tc(_id); } __active = true; org.omg.CORBA.StructMember[] _members0 = new org.omg.CORBA.StructMember[0]; org.omg.CORBA.TypeCode _tcOf_members0 = null; __typeCode = org.omg .CORBA .ORB .init() .create_exception_tc( org.omg.PortableServer.POAPackage.WrongAdapterHelper.id(), "WrongAdapter", _members0); __active = false; } } } return __typeCode; }
public static synchronized org.omg.CORBA.TypeCode type() { if (__typeCode == null) { synchronized (org.omg.CORBA.TypeCode.class) { if (__typeCode == null) { if (__active) { return org.omg.CORBA.ORB.init().create_recursive_tc(_id); } __active = true; org.omg.CORBA.StructMember[] _members0 = new org.omg.CORBA.StructMember[1]; org.omg.CORBA.TypeCode _tcOf_members0 = null; _tcOf_members0 = org.omg.CORBA.ORB.init().get_primitive_tc(org.omg.CORBA.TCKind.tk_short); _tcOf_members0 = org.omg .CORBA .ORB .init() .create_alias_tc( org.omg.CORBA.PolicyErrorCodeHelper.id(), "PolicyErrorCode", _tcOf_members0); _members0[0] = new org.omg.CORBA.StructMember("reason", _tcOf_members0, null); __typeCode = org.omg .CORBA .ORB .init() .create_exception_tc( org.omg.CORBA.PolicyErrorHelper.id(), "PolicyError", _members0); __active = false; } } } return __typeCode; }
public static synchronized org.omg.CORBA.TypeCode type() { if (__typeCode == null) { synchronized (org.omg.CORBA.TypeCode.class) { if (__typeCode == null) { if (__active) { return org.omg.CORBA.ORB.init().create_recursive_tc(_id); } __active = true; org.omg.CORBA.StructMember[] _members0 = new org.omg.CORBA.StructMember[1]; org.omg.CORBA.TypeCode _tcOf_members0 = null; _tcOf_members0 = org.omg.CORBA.ORB.init().create_string_tc(0); _tcOf_members0 = org.omg .CORBA .ORB .init() .create_alias_tc( org.omg.PortableInterceptor.ServerIdHelper.id(), "ServerId", _tcOf_members0); _members0[0] = new org.omg.CORBA.StructMember("serverId", _tcOf_members0, null); __typeCode = org.omg .CORBA .ORB .init() .create_exception_tc( com.sun.corba.se.PortableActivationIDL.ServerAlreadyRegisteredHelper.id(), "ServerAlreadyRegistered", _members0); __active = false; } } } return __typeCode; }
public static synchronized org.omg.CORBA.TypeCode type() { if (__typeCode == null) { synchronized (org.omg.CORBA.TypeCode.class) { if (__typeCode == null) { if (__active) { return org.omg.CORBA.ORB.init().create_recursive_tc(_id); } __active = true; org.omg.CORBA.StructMember[] _members0 = new org.omg.CORBA.StructMember[1]; org.omg.CORBA.TypeCode _tcOf_members0 = null; _tcOf_members0 = org.omg.CORBA.ORB.init().create_string_tc(0); _members0[0] = new org.omg.CORBA.StructMember("name", _tcOf_members0, null); __typeCode = org.omg .CORBA .ORB .init() .create_exception_tc( org.omg.PortableInterceptor.ORBInitInfoPackage.DuplicateNameHelper.id(), "DuplicateName", _members0); __active = false; } } } return __typeCode; }
public static synchronized org.omg.CORBA.TypeCode type() { if (__typeCode == null) { synchronized (org.omg.CORBA.TypeCode.class) { if (__typeCode == null) { if (__active) { return org.omg.CORBA.ORB.init().create_recursive_tc(_id); } __active = true; org.omg.CORBA.StructMember[] _members0 = new org.omg.CORBA.StructMember[0]; org.omg.CORBA.TypeCode _tcOf_members0 = null; __typeCode = org.omg .CORBA .ORB .init() .create_exception_tc( org.omg.IOP.CodecFactoryPackage.UnknownEncodingHelper.id(), "UnknownEncoding", _members0); __active = false; } } } return __typeCode; }
public static org.omg.CORBA.TypeCode type() { if (_type == null) { _type = org.omg .CORBA .ORB .init() .create_struct_tc( org.omg.GIOP.LocateRequestHeader_1_0Helper.id(), "LocateRequestHeader_1_0", new org.omg.CORBA.StructMember[] { new org.omg.CORBA.StructMember( "request_id", org.omg.CORBA.ORB.init().get_primitive_tc(org.omg.CORBA.TCKind.from_int(5)), null), new org.omg.CORBA.StructMember( "object_key", org.omg .CORBA .ORB .init() .create_sequence_tc( 0, org.omg .CORBA .ORB .init() .get_primitive_tc(org.omg.CORBA.TCKind.from_int(10))), null) }); } return _type; }
public static void main(String[] args) { try { // Create and initialize the ORB org.omg.CORBA.ORB orb = org.omg.CORBA.ORB.init(args, null); // Get the root naming context // org.omg.CORBA.Object objRef = orb.resolve_initial_references("NameService"); // use NamingContextExt instead of NamingContext: this is part of the Interoperable Naming // Service. // NamingContextExt ncRef = NamingContextExtHelper.narrow(objRef); // resolve the object reference in Naming // String name = "Stock"; // stockImpl = StockHelper.narrow(ncRef.resolve_str(name)); // Write stringified object reference to a file BufferedReader in = new BufferedReader(new FileReader(args[0])); String objName = in.readLine(); in.close(); org.omg.CORBA.Object obj = orb.string_to_object(objName); stockImpl = StockHelper.narrow(obj); // System.out.println("Obtained a handle on server object: " + stockImpl); System.out.println("Obtained stock object for company: " + stockImpl.description()); } catch (Exception e) { System.out.println("Stock client error: " + e); e.printStackTrace(System.out); } }
/** * Writes any java.lang.Object as a CORBA any. * * @param out the stream in which to write the any. * @param obj the object to write as an any. */ public void writeAny(org.omg.CORBA.portable.OutputStream out, java.lang.Object obj) { org.omg.CORBA.ORB orb = out.orb(); // Create Any Any any = orb.create_any(); // Make sure we have a connected object... java.lang.Object newObj = Utility.autoConnect(obj, orb, false); if (newObj instanceof org.omg.CORBA.Object) { any.insert_Object((org.omg.CORBA.Object) newObj); } else { if (newObj == null) { // Handle the null case, including backwards // compatibility issues any.insert_Value(null, createTypeCodeForNull(orb)); } else { if (newObj instanceof Serializable) { // If they're our Any and ORB implementations, // we may want to do type code related versioning. TypeCode tc = createTypeCode((Serializable) newObj, any, orb); if (tc == null) any.insert_Value((Serializable) newObj); else any.insert_Value((Serializable) newObj, tc); } else if (newObj instanceof Remote) { ORBUtility.throwNotSerializableForCorba(newObj.getClass().getName()); } else { ORBUtility.throwNotSerializableForCorba(newObj.getClass().getName()); } } } out.write_any(any); }
public static synchronized org.omg.CORBA.TypeCode type() { if (__typeCode == null) { synchronized (org.omg.CORBA.TypeCode.class) { if (__typeCode == null) { if (__active) { return org.omg.CORBA.ORB.init().create_recursive_tc(_id); } __active = true; org.omg.CORBA.StructMember[] _members0 = new org.omg.CORBA.StructMember[0]; org.omg.CORBA.TypeCode _tcOf_members0 = null; __typeCode = org.omg .CORBA .ORB .init() .create_exception_tc( com.sun.corba.se.spi.activation.InitialNameServicePackage .NameAlreadyBoundHelper.id(), "NameAlreadyBound", _members0); __active = false; } } } return __typeCode; }
public static synchronized org.omg.CORBA.TypeCode type() { if (__typeCode == null) { synchronized (org.omg.CORBA.TypeCode.class) { if (__typeCode == null) { if (__active) { return org.omg.CORBA.ORB.init().create_recursive_tc(_id); } __active = true; org.omg.CORBA.StructMember[] _members0 = new org.omg.CORBA.StructMember[2]; org.omg.CORBA.TypeCode _tcOf_members0 = null; _tcOf_members0 = org.omg.CORBA.ORB.init().get_primitive_tc(org.omg.CORBA.TCKind.tk_longlong); _members0[0] = new org.omg.CORBA.StructMember("time", _tcOf_members0, null); _tcOf_members0 = org.omg.CORBA.ORB.init().get_primitive_tc(org.omg.CORBA.TCKind.tk_longlong); _members0[1] = new org.omg.CORBA.StructMember("clockSeqAndNode", _tcOf_members0, null); __typeCode = org.omg .CORBA .ORB .init() .create_struct_tc(com.eaio.uuid.UUIDHelper.id(), "UUID", _members0); __active = false; } } } return __typeCode; }
public static synchronized org.omg.CORBA.TypeCode type() { if (__typeCode == null) { synchronized (org.omg.CORBA.TypeCode.class) { if (__typeCode == null) { if (__active) { return org.omg.CORBA.ORB.init().create_recursive_tc(_id); } __active = true; org.omg.CORBA.StructMember[] _members0 = new org.omg.CORBA.StructMember[0]; org.omg.CORBA.TypeCode _tcOf_members0 = null; __typeCode = org.omg .CORBA .ORB .init() .create_exception_tc( org.omg.CosNaming.NamingContextPackage.AlreadyBoundHelper.id(), "AlreadyBound", _members0); __active = false; } } } return __typeCode; }
public static synchronized org.omg.CORBA.TypeCode type() { if (__typeCode == null) { synchronized (org.omg.CORBA.TypeCode.class) { if (__typeCode == null) { if (__active) { return org.omg.CORBA.ORB.init().create_recursive_tc(_id); } __active = true; org.omg.CORBA.StructMember[] _members0 = new org.omg.CORBA.StructMember[0]; org.omg.CORBA.TypeCode _tcOf_members0 = null; __typeCode = org.omg .CORBA .ORB .init() .create_exception_tc( com.sun.corba.se.PortableActivationIDL.InvalidORBidHelper.id(), "InvalidORBid", _members0); __active = false; } } } return __typeCode; }
public static synchronized org.omg.CORBA.TypeCode type() { if (__typeCode == null) { synchronized (org.omg.CORBA.TypeCode.class) { if (__typeCode == null) { if (__active) { return org.omg.CORBA.ORB.init().create_recursive_tc(_id); } __active = true; org.omg.CORBA.StructMember[] _members0 = new org.omg.CORBA.StructMember[2]; org.omg.CORBA.TypeCode _tcOf_members0 = null; _tcOf_members0 = org.omg.CORBA.ORB.init().create_string_tc(0); _members0[0] = new org.omg.CORBA.StructMember("host_name", _tcOf_members0, null); _tcOf_members0 = org.omg.CORBA.ORB.init().get_primitive_tc(org.omg.CORBA.TCKind.tk_ushort); _members0[1] = new org.omg.CORBA.StructMember("port", _tcOf_members0, null); __typeCode = org.omg .CORBA .ORB .init() .create_struct_tc( org.omg.CSIIOP.TransportAddressHelper.id(), "TransportAddress", _members0); __active = false; } } } return __typeCode; }
public static synchronized org.omg.CORBA.TypeCode type() { if (__typeCode == null) { synchronized (org.omg.CORBA.TypeCode.class) { if (__typeCode == null) { if (__active) { return org.omg.CORBA.ORB.init().create_recursive_tc(_id); } __active = true; org.omg.CORBA.StructMember[] _members0 = new org.omg.CORBA.StructMember[2]; org.omg.CORBA.TypeCode _tcOf_members0 = null; _tcOf_members0 = org.omg.CORBA.ORB.init().create_string_tc(0); _tcOf_members0 = org.omg .CORBA .ORB .init() .create_alias_tc( org.omg.DynamicAny.FieldNameHelper.id(), "FieldName", _tcOf_members0); _members0[0] = new org.omg.CORBA.StructMember("id", _tcOf_members0, null); _tcOf_members0 = org.omg.CORBA.ORB.init().get_primitive_tc(org.omg.CORBA.TCKind.tk_any); _members0[1] = new org.omg.CORBA.StructMember("value", _tcOf_members0, null); __typeCode = org.omg .CORBA .ORB .init() .create_struct_tc( org.omg.DynamicAny.NameValuePairHelper.id(), "NameValuePair", _members0); __active = false; } } } return __typeCode; }
public static synchronized org.omg.CORBA.TypeCode type() { if (__typeCode == null) { synchronized (org.omg.CORBA.TypeCode.class) { if (__typeCode == null) { if (__active) { return org.omg.CORBA.ORB.init().create_recursive_tc(_id); } __active = true; org.omg.CORBA.StructMember[] _members0 = new org.omg.CORBA.StructMember[2]; org.omg.CORBA.TypeCode _tcOf_members0 = null; _tcOf_members0 = org.omg.CORBA.ORB.init().create_string_tc(0); _members0[0] = new org.omg.CORBA.StructMember("ID", _tcOf_members0, null); _tcOf_members0 = org.omg.CORBA.ORB.init().create_string_tc(0); _members0[1] = new org.omg.CORBA.StructMember("devType", _tcOf_members0, null); __typeCode = org.omg .CORBA .ORB .init() .create_struct_tc(Laboratory.DevSHelper.id(), "DevS", _members0); __active = false; } } } return __typeCode; }
public static synchronized org.omg.CORBA.TypeCode type() { if (__typeCode == null) { synchronized (org.omg.CORBA.TypeCode.class) { if (__typeCode == null) { if (__active) { return org.omg.CORBA.ORB.init().create_recursive_tc(_id); } __active = true; org.omg.CORBA.StructMember[] _members0 = new org.omg.CORBA.StructMember[2]; org.omg.CORBA.TypeCode _tcOf_members0 = null; _tcOf_members0 = org.omg.CORBA.ORB.init().create_string_tc(0); _members0[0] = new org.omg.CORBA.StructMember("name", _tcOf_members0, null); _tcOf_members0 = org.omg.CORBA.ORB.init().create_string_tc(0); _members0[1] = new org.omg.CORBA.StructMember("value", _tcOf_members0, null); __typeCode = org.omg .CORBA .ORB .init() .create_struct_tc(corbaObjects.scs.PropertyHelper.id(), "Property", _members0); __active = false; } } } return __typeCode; }
public static synchronized org.omg.CORBA.TypeCode type() { if (__typeCode == null) { synchronized (org.omg.CORBA.TypeCode.class) { if (__typeCode == null) { if (__active) { return org.omg.CORBA.ORB.init().create_recursive_tc(_id); } __active = true; org.omg.CORBA.ValueMember[] _members0 = new org.omg.CORBA.ValueMember[0]; org.omg.CORBA.TypeCode _tcOf_members0 = null; __typeCode = org.omg .CORBA .ORB .init() .create_value_tc( _id, "ObjectReferenceTemplate", org.omg.CORBA.VM_ABSTRACT.value, null, _members0); __active = false; } } } return __typeCode; }
public static synchronized org.omg.CORBA.TypeCode type() { if (__typeCode == null) { synchronized (org.omg.CORBA.TypeCode.class) { if (__typeCode == null) { if (__active) { return org.omg.CORBA.ORB.init().create_recursive_tc(_id); } __active = true; org.omg.CORBA.StructMember[] _members0 = new org.omg.CORBA.StructMember[0]; org.omg.CORBA.TypeCode _tcOf_members0 = null; __typeCode = org.omg .CORBA .ORB .init() .create_exception_tc( org.omg.DynamicAny.DynAnyPackage.TypeMismatchHelper.id(), "TypeMismatch", _members0); __active = false; } } } return __typeCode; }
public static synchronized org.omg.CORBA.TypeCode type() { int _memberCount = 2; org.omg.CORBA.StructMember[] _members = null; if (_tc == null) { _members = new org.omg.CORBA.StructMember[2]; _members[0] = new org.omg.CORBA.StructMember( "service_options", org.omg .CORBA .ORB .init() .create_sequence_tc( 0, org.omg.CORBA.ORB.init().get_primitive_tc(org.omg.CORBA.TCKind.tk_ulong)), null); _members[1] = new org.omg.CORBA.StructMember( "service_details", org.omg .CORBA .ORB .init() .create_sequence_tc(0, org.omg.CORBA.ServiceDetailHelper.type()), null); _tc = org.omg.CORBA.ORB.init().create_struct_tc(id(), "ServiceInformation", _members); } return _tc; }
public static org.omg.CORBA.TypeCode type() { if (typeCode_ == null) { org.omg.CORBA.ORB orb = org.omg.CORBA.ORB.init(); typeCode_ = orb.create_interface_tc(id(), "Retry"); } return 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(), "RouterList", orb.create_sequence_tc(0, RouterHelper.type())); } return typeCode_; }
public static void main(String[] args) { Properties props = System.getProperties(); props.setProperty("org.omg.CORBA.ORBClass", "com.sun.corba.se.internal.POA.POAORB"); props.setProperty( "org.omg.CORBA.ORBSingletonClass", "com.sun.corba.se.internal.corba.ORBSingleton"); try { // Initialize the ORB. org.omg.CORBA.ORB orb = org.omg.CORBA.ORB.init(args, props); // get a reference to the root POA org.omg.CORBA.Object obj = orb.resolve_initial_references("RootPOA"); POA poaRoot = POAHelper.narrow(obj); // Create policies for our persistent POA org.omg.CORBA.Policy[] policies = { // poaRoot.create_lifespan_policy(LifespanPolicyValue.PERSISTENT), poaRoot.create_id_assignment_policy(IdAssignmentPolicyValue.USER_ID), poaRoot.create_thread_policy(ThreadPolicyValue.ORB_CTRL_MODEL) }; // Create myPOA with the right policies POA poa = poaRoot.create_POA("DRSCommonServiceServerImpl_poa", poaRoot.the_POAManager(), policies); // Create the servant servant = new DRSCommonServiceServerImpl(SvrInfo.SVR3_NAME_VANCOUVER); // Activate the servant with the ID on myPOA byte[] objectId = servant.svrName.getBytes(); poa.activate_object_with_id(objectId, servant); // Activate the POA manager poaRoot.the_POAManager().activate(); // Get a reference to the servant and write it down. obj = poa.servant_to_reference(servant); // ---- Uncomment below to enable Naming Service access. ---- // org.omg.CORBA.Object ncobj = orb // .resolve_initial_references("NameService"); // NamingContextExt nc = NamingContextExtHelper.narrow(ncobj); // nc.bind(nc.to_name(servant.svrName), obj); PrintWriter ps = new PrintWriter(new FileOutputStream(new File(servant.svrName))); ps.println(orb.object_to_string(obj)); ps.close(); System.out.println("RM3: " + servant.svrName + " is ready..."); // Wait for incoming requests orb.run(); } catch (Exception ex) { ex.printStackTrace(); } }
private void writeObject(java.io.ObjectOutputStream s) throws java.io.IOException { String[] args = null; java.util.Properties props = null; org.omg.CORBA.ORB orb = org.omg.CORBA.ORB.init(args, props); try { String str = orb.object_to_string(this); s.writeUTF(str); } finally { orb.destroy(); } }
public static synchronized org.omg.CORBA.TypeCode type() { if (__typeCode == null) { __typeCode = org.omg.CORBA.ORB.init().create_string_tc(0); __typeCode = org.omg .CORBA .ORB .init() .create_alias_tc(org.omg.CosNaming.IstringHelper.id(), "Istring", __typeCode); } return __typeCode; }
public static synchronized org.omg.CORBA.TypeCode type() { if (__typeCode == null) { __typeCode = org.omg.CORBA.ORB.init().create_string_tc(0); __typeCode = org.omg .CORBA .ORB .init() .create_alias_tc(org.omg.PortableInterceptor.ORBIdHelper.id(), "ORBId", __typeCode); } return __typeCode; }