Previous Table of Contents Next


4.2 The ORB Operations

   The ORB interface contains the operations that are available to both clients and servers. These operations do not depend on any specific object adapter or any specific object reference.

   module CORBA {

   interface NVList; // forward declaration interface OperationDef; // forward declaration interface TypeCode; // forward declaration

   typedef short PolicyErrorCode;

    // for the definition of consts see “PolicyErrorCode? on page 4-40

   typedef unsigned long PolicyType;

   interface Request; // forward declaration

   typedef sequence <Request> RequestSeq;

   native AbstractBase;

   exception PolicyError {PolicyErrorCode reason;};

   typedef string RepositoryId;

   typedef string Identifier;

   // StructMemberSeq defined in Chapter 10 // UnionMemberSeq defined in Chapter 10 // EnumMemberSeq defined in Chapter 10

   typedef unsigned short ServiceType; typedef unsigned long ServiceOption; typedef unsigned long ServiceDetailType; typedef CORBA::OctetSeq ServiceDetailData; typedef sequence<ServiceOption> ServiceOptionSeq; const ServiceType Security = 1;

   struct ServiceDetail { ServiceDetailType service_detail_type; sequence <octet> service_detail; ServiceDetailData service_detail;

   };

   typedef sequence<ServiceDetail> ServiceDetailSeq;

   struct ServiceInformation { sequence <ServiceOption> service_options; ServiceOptionSeq service_options; sequence <ServiceDetail> service_details; ServiceDetailSeq service_details;

   };

   native ValueFactory;

   typedef string ORBid;

   interface ORB {

   typedef string ObjectId;typedef sequence <ObjectId> ObjectIdList;

   exception InvalidName {};

   ORBid id();

   string object_to_string (in Object obj);

   Object string_to_object (in string str);

   // Dynamic Invocation related operations

   void create_list (in long count,out NVList new_list

   );

   void create_operation_list (in OperationDef oper,out NVList new_list

   );

   void get_default_context (

   out Context ctx );

   void send_multiple_requests_oneway( in RequestSeq req );

   void send_multiple_requests_deferred( in RequestSeq req );

   boolean poll_next_response();

   void get_next_response( out Request req ) raises (WrongTransaction);

   // Service information operations

   boolean get_service_information ( in ServiceType service_type, out ServiceInformation service_information

   );

   ObjectIdList list_initial_services ();

   // Initial reference operation

   Object resolve_initial_references ( in ObjectId identifier ) raises (InvalidName);

   // Type code creation operations

   TypeCode create_struct_tc ( in RepositoryId id, in Identifier name, in StructMemberSeq members

   );

   TypeCode create_union_tc ( in RepositoryId id, in Identifier name, in TypeCode discriminator_type, in UnionMemberSeq members

   );

   TypeCode create_enum_tc ( in RepositoryId id, in Identifier name, in EnumMemberSeq members );

   TypeCode create_alias_tc ( in RepositoryId id, in Identifier name, in TypeCode original_type

   );

   TypeCode create_exception_tc ( in RepositoryId id, in Identifier name, in StructMemberSeq members

   );

   TypeCode create_interface_tc ( in RepositoryId id, in Identifier name

   );

   TypeCode create_string_tc ( in unsigned long bound );

   TypeCode create_wstring_tc ( in unsigned long bound );

   TypeCode create_fixed_tc ( in unsigned short digits, in short scale

   );

   TypeCode create_sequence_tc ( in unsigned long bound, in TypeCode element_type

   );

   TypeCode create_recursive_sequence_tc (// deprecated in unsigned long bound, in unsigned long offset

   );

   TypeCode create_array_tc ( in unsigned long length, in TypeCode element_type

   );

   TypeCode create_value_tc ( in RepositoryId id, in Identifier name, in ValueModifier type_modifier,

   in TypeCode concrete_base, in ValueMemberSeq members );

   TypeCode create_value_box_tc ( in RepositoryId id, in Identifier name, in TypeCode boxed_type

   );

   TypeCode create_native_tc ( in RepositoryId id, in Identifier name

   );

   TypeCode create_recursive_tc( in RepositoryId id );

   TypeCode create_abstract_interface_tc( in RepositoryId id, in Identifier name

   );

   TypeCode create_local_interface_tc( in RepositoryId id, in Identifier name

   );

   TypeCode create_component_tc ( in RepositoryId id, in Identifier name

   );

   TypeCode create_home_tc ( in RepositoryId id, in Identifier name

   );

   TypeCode create_event_tc ( in RepositoryId id, in Identifier name, in ValueModifier type_modifier, in TypeCode concrete_base, in ValueMemberSeq members

   );

   // Thread related operations

   boolean work_pending( ); void perform_work();

   void run();

   void shutdown(in boolean wait_for_completion);

   void destroy();

   // Policy related operations

   Policy create_policy(in PolicyType type, in any val

   ) raises (PolicyError);

   // Dynamic Any related operations deprecated and removed // from primary list of ORB operations

   // Value factory operations

   ValueFactory register_value_factory(in RepositoryId id,in ValueFactory_factory

   );

   void unregister_value_factory(in RepositoryId id);

   ValueFactory lookup_value_factory(in RepositoryId id);

   void register_initial_reference(in ObjectId id,in Object obj

   ) raises (InvalidName); }; };

   All types defined in this chapter are part of the CORBA module. When referenced in OMG IDL, the type names must be prefixed by “CORBA::?.

   The operations object_to_string and string_to_object are described in “Converting Object References to Strings? on page 4-8.

   For a description of the create_list and create_operation_list operations, see Section 7.4, “Polling? on page 7-12. The get_default_context operation is described in Section 4.2.4.1, “get_default_context? on page 4-9. The send_multiple_requests_oneway and send_multiple_requests_deferred operations are described in Section 7.3.1, “send_multiple_requests? on page 7-11. The poll_next_response and get_next_response operations are described in Section 7.3.2, “get_next_response and poll_next_response? on page 7-11.

   The list_intial_services and resolve_initial_references operations are described in Section 4.5.2, “Obtaining Initial Object References? on page 4-28.

   The Type code creation operations with names of the form create_<type>_tc are described in Section 4.11.3, “Creating TypeCodes? on page 4-59.

   The work_pending, perform_work, shutdown, destroy and run operations are described in Section 4.2.5, “Thread-Related Operations? on page 4-10.

   The create_policy operations is described in Section 4.8.2.3, “Create_policy? on page 4-40.

   The register_value_factory, unregister_value_factory and lookup_value_factory operations are described in Section 5.4.3, “Language Specific Value Factory Requirements? on page 5-9.

   The register_initial_reference operation is described in Section 21.8.1, “register_initial_reference? on page 21-57