ORB.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00003 //=============================================================================
00004 /**
00005  *  @file    ORB.h
00006  *
00007  *  ORB.h,v 1.262 2006/06/20 06:32:35 jwillemsen Exp
00008  *
00009  *  Header file for CORBA's ORB type.
00010  *
00011  *  @author DOC Center - Washington University at St. Louis
00012  *  @author DOC Group - Vanderbilt University
00013  *  @author DOC Laboratory - University of California at Irvine
00014  */
00015 //=============================================================================
00016 
00017 #ifndef TAO_ORB_H
00018 #define TAO_ORB_H
00019 
00020 #include /**/ "ace/pre.h"
00021 
00022 #include "tao/UserException.h"
00023 
00024 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00025 # pragma once
00026 #endif /* ACE_LACKS_PRAGMA_ONCE */
00027 
00028 #include "tao/orb_typesC.h"
00029 #include "tao/objectid.h"
00030 #include "tao/CORBA_methods.h"
00031 #include "tao/VarOut_T.h"
00032 #include "tao/Seq_Var_T.h"
00033 #include "tao/Seq_Out_T.h"
00034 #include "tao/Sequence_T.h"
00035 #include "tao/Policy_ForwardC.h"
00036 #include "tao/ServicesC.h"
00037 
00038 #include "ace/Thread_Mutex.h"
00039 #include "ace/Guard_T.h"
00040 
00041 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00042 
00043 typedef enum
00044 {
00045   TAO_SERVICEID_NAMESERVICE,
00046   TAO_SERVICEID_TRADINGSERVICE,
00047   TAO_SERVICEID_IMPLREPOSERVICE,
00048   TAO_SERVICEID_INTERFACEREPOSERVICE,
00049   TAO_SERVICEID_MCASTSERVER
00050 } TAO_Service_ID;
00051 
00052 /// Forward declarations.
00053 class TAO_MProfile;
00054 class TAO_Client_Strategy_Factory;
00055 class TAO_Server_Strategy_Factory;
00056 class TAO_InputCDR;
00057 class TAO_OutputCDR;
00058 class TAO_Stub;
00059 class TAO_Valuetype_Adapter;
00060 class TAO_Acceptor_Filter;
00061 
00062 // ****************************************************************
00063 
00064 namespace CORBA
00065 {
00066   class EnumMemberSeq;
00067   class StructMemberSeq;
00068   class UnionMemberSeq;
00069   class ValueMemberSeq;
00070   class ORB_ObjectIdList;
00071 
00072   class ExceptionList;
00073   typedef ExceptionList * ExceptionList_ptr;
00074 
00075   class ContextList;
00076   typedef ContextList * ContextList_ptr;
00077 
00078   class Context;
00079   typedef Context * Context_ptr;
00080 
00081   class NVList;
00082   typedef NVList *NVList_ptr;
00083 
00084   class NamedValue;
00085   typedef NamedValue *NamedValue_ptr;
00086 
00087   class Policy;
00088   typedef Policy *Policy_ptr;
00089 
00090   typedef CORBA::ULong PolicyType;
00091 
00092   // TODO - implement OMG's 'ORBid CORBA::ORB::id (void)'.
00093 
00094   typedef
00095     TAO_VarSeq_Var_T<
00096         ORB_ObjectIdList
00097       >
00098     ORB_ObjectIdList_var;
00099 
00100   typedef
00101     TAO_Seq_Out_T<
00102         ORB_ObjectIdList
00103       >
00104     ORB_ObjectIdList_out;
00105 
00106   class ValueFactoryBase;
00107   typedef ValueFactoryBase *ValueFactory;
00108 
00109   typedef UShort ServiceType;
00110 
00111   class Request;
00112   typedef Request * Request_ptr;
00113   typedef TAO_Pseudo_Var_T<Request> Request_var;
00114   typedef TAO_Pseudo_Out_T<Request> Request_out;
00115 
00116   class ORB;
00117   typedef ORB * ORB_ptr;
00118   typedef TAO_Pseudo_Var_T<ORB> ORB_var;
00119   typedef TAO_Pseudo_Out_T<ORB> ORB_out;
00120 
00121   typedef CORBA::Short ValueModifier;
00122 
00123 #if (TAO_HAS_MINIMUM_CORBA == 0)
00124 
00125     // Typedefs for CORBA::RequestSeq, which is an argument of
00126     // send_multiple_requests_*().
00127 
00128     typedef
00129       TAO::unbounded_object_reference_sequence<
00130           CORBA::Request, CORBA::Request_var
00131         >
00132       RequestSeq;
00133 
00134     typedef
00135       TAO_VarSeq_Var_T<
00136           RequestSeq
00137         >
00138       RequestSeq_var;
00139 
00140     typedef
00141       TAO_Seq_Out_T<
00142           RequestSeq
00143         >
00144       RequestSeq_out;
00145 #endif
00146 
00147   /**
00148    * @class ORB
00149    *
00150    * @brief ORB pseudo-object.
00151    *
00152    * The "ORB" pseudo-object is used in bootstrapping, such as to
00153    * create object references from strings.  This class is intended
00154    * to be inherited by others, which will provide some more of the
00155    * CORBA support.  Implementations of this "CORBA::ORB" class must
00156    * know how to create stringify/destringify their objrefs, as well
00157    * as how to marshal and unmarshal them.
00158    */
00159   class TAO_Export ORB
00160   {
00161   public:
00162 
00163     class TAO_Export InvalidName : public CORBA::UserException
00164     {
00165     public:
00166       InvalidName (void);
00167       InvalidName (const InvalidName &);
00168       ~InvalidName (void);
00169 
00170       InvalidName &operator= (const InvalidName &);
00171 
00172       static InvalidName *_downcast (CORBA::Exception *);
00173       static CORBA::Exception *_alloc (void);
00174 
00175       virtual CORBA::Exception *_tao_duplicate (void) const;
00176 
00177       virtual void _raise (void) const;
00178 
00179       virtual void _tao_encode (TAO_OutputCDR &
00180                                 ACE_ENV_ARG_DECL) const;
00181 
00182       virtual void _tao_decode (TAO_InputCDR &
00183                                 ACE_ENV_ARG_DECL);
00184     };
00185 
00186     typedef char *ObjectId;
00187     typedef CORBA::String_var ObjectId_var;
00188     typedef CORBA::String_out ObjectId_out;
00189     static CORBA::TypeCode_ptr const _tc_ObjectId;
00190 
00191     typedef CORBA::ORB_ObjectIdList ObjectIdList;
00192     typedef CORBA::ORB_ObjectIdList_var ObjectIdList_var;
00193     typedef CORBA::ORB_ObjectIdList_out ObjectIdList_out;
00194     typedef CORBA::ORB_ObjectIdList *ObjectIdList_ptr;
00195     static CORBA::TypeCode_ptr const _tc_ObjectIdList;
00196 
00197     /// Return a duplicate of @c orb.
00198     /**
00199      * When work with this duplicate is complete, it should be freed
00200      * up using CORBA::release().
00201      */
00202     static CORBA::ORB_ptr _duplicate (CORBA::ORB_ptr orb);
00203 
00204     /// Returns a pointer to a nil ORB, i.e., an non-existent ORB.  This
00205     /// can be used for initialization or in comparisons.
00206     static CORBA::ORB_ptr _nil (void);
00207 
00208     /// Return this ORB's ORBid.
00209     char * id (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS);
00210 
00211     /**
00212      * Turn a string-ified object reference back into an object
00213      * pointer.  Typically these strings are created using
00214      * object_to_string(), but not necessarily locally.
00215      */
00216     CORBA::Object_ptr string_to_object (const char *str
00217                                         ACE_ENV_ARG_DECL_WITH_DEFAULTS);
00218 
00219     /**
00220      * Turn an object reference into a string.  Each type of ORB,
00221      * e.g. an IIOP ORB, must implement this.  This can be used by
00222      * servers to publish their whereabouts to clients.  The output of
00223      * this is typically eventually given to @c string_to_object() as
00224      * an argument.
00225      */
00226     char * object_to_string (CORBA::Object_ptr obj
00227                              ACE_ENV_ARG_DECL_WITH_DEFAULTS);
00228 
00229 #if !defined(CORBA_E_MICRO)
00230     // Value factory operations  (CORBA 2.3 ptc/98-10-05 Ch. 4.2 p.4-7)
00231     CORBA::ValueFactory register_value_factory (
00232         const char *repository_id,
00233         CORBA::ValueFactory factory
00234         ACE_ENV_ARG_DECL_WITH_DEFAULTS);
00235 #endif
00236 
00237 #if !defined(CORBA_E_MICRO)
00238     void unregister_value_factory (const char * repository_id
00239                                    ACE_ENV_ARG_DECL_WITH_DEFAULTS);
00240 #endif
00241 
00242 #if !defined(CORBA_E_MICRO)
00243     CORBA::ValueFactory lookup_value_factory (
00244         const char *repository_id
00245         ACE_ENV_ARG_DECL_WITH_DEFAULTS);
00246 #endif
00247 
00248 #if (TAO_HAS_MINIMUM_CORBA == 0)
00249 
00250     void create_list (CORBA::Long count,
00251                       CORBA::NVList_ptr &new_list
00252                       ACE_ENV_ARG_DECL_WITH_DEFAULTS);
00253 
00254     void create_operation_list(CORBA::OperationDef_ptr opDef,
00255                                CORBA::NVList_ptr& result
00256                                ACE_ENV_ARG_DECL_WITH_DEFAULTS);
00257 
00258     void create_named_value (CORBA::NamedValue_ptr &nmval
00259                              ACE_ENV_ARG_DECL_WITH_DEFAULTS);
00260 
00261     void create_exception_list (CORBA::ExceptionList_ptr &exclist
00262                                 ACE_ENV_ARG_DECL_WITH_DEFAULTS);
00263 
00264     void create_environment (CORBA::Environment_ptr &new_env
00265                              ACE_ENV_ARG_DECL_WITH_DEFAULTS);
00266 
00267     // The following are not implemented and just throw
00268     // CORBA::NO_IMPLEMENT.
00269 
00270     void create_context_list (CORBA::ContextList_ptr &ctxtlist
00271                               ACE_ENV_ARG_DECL_WITH_DEFAULTS);
00272 
00273     void get_default_context (CORBA::Context_ptr &ctx
00274                               ACE_ENV_ARG_DECL_WITH_DEFAULTS);
00275 
00276     CORBA::Boolean get_service_information (
00277       CORBA::ServiceType service_type,
00278       CORBA::ServiceInformation_out service_information
00279       ACE_ENV_ARG_DECL_WITH_DEFAULTS);
00280 
00281     void send_multiple_requests_oneway (const CORBA::RequestSeq &req
00282                                         ACE_ENV_ARG_DECL_WITH_DEFAULTS);
00283 
00284     void send_multiple_requests_deferred (const CORBA::RequestSeq &req
00285                                           ACE_ENV_ARG_DECL_WITH_DEFAULTS);
00286 
00287     void get_next_response (CORBA::Request_ptr &req
00288                             ACE_ENV_ARG_DECL_WITH_DEFAULTS);
00289 
00290     CORBA::Boolean poll_next_response (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS);
00291 
00292     /// The ORB TypeCode creation functions.
00293 
00294     CORBA::TypeCode_ptr create_struct_tc (
00295         const char *id,
00296         const char *name,
00297         const CORBA::StructMemberSeq &members
00298         ACE_ENV_ARG_DECL_WITH_DEFAULTS);
00299 
00300     CORBA::TypeCode_ptr create_union_tc (
00301         const char *id,
00302         const char *name,
00303         CORBA::TypeCode_ptr discriminator_type,
00304         const CORBA::UnionMemberSeq &members
00305         ACE_ENV_ARG_DECL_WITH_DEFAULTS);
00306 
00307     CORBA::TypeCode_ptr create_enum_tc (
00308         const char *id,
00309         const char *name,
00310         const CORBA::EnumMemberSeq &members
00311         ACE_ENV_ARG_DECL_WITH_DEFAULTS);
00312 
00313     CORBA::TypeCode_ptr create_alias_tc (
00314         const char *id,
00315         const char *name,
00316         CORBA::TypeCode_ptr original_type
00317         ACE_ENV_ARG_DECL_WITH_DEFAULTS);
00318 
00319     CORBA::TypeCode_ptr create_exception_tc (
00320         const char *id,
00321         const char *name,
00322         const CORBA::StructMemberSeq &members
00323         ACE_ENV_ARG_DECL_WITH_DEFAULTS);
00324 
00325     CORBA::TypeCode_ptr create_interface_tc (
00326         const char *id,
00327         const char *name
00328         ACE_ENV_ARG_DECL_WITH_DEFAULTS);
00329 
00330     CORBA::TypeCode_ptr create_string_tc (
00331         CORBA::ULong bound
00332         ACE_ENV_ARG_DECL_WITH_DEFAULTS);
00333 
00334     CORBA::TypeCode_ptr create_wstring_tc (
00335         CORBA::ULong bound
00336         ACE_ENV_ARG_DECL_WITH_DEFAULTS);
00337 
00338     CORBA::TypeCode_ptr create_fixed_tc (
00339         CORBA::UShort digits,
00340         CORBA::UShort scale
00341         ACE_ENV_ARG_DECL_WITH_DEFAULTS);
00342 
00343     CORBA::TypeCode_ptr create_sequence_tc (
00344         CORBA::ULong bound,
00345         CORBA::TypeCode_ptr element_type
00346         ACE_ENV_ARG_DECL_WITH_DEFAULTS);
00347 
00348     CORBA::TypeCode_ptr create_array_tc (
00349         CORBA::ULong length,
00350         CORBA::TypeCode_ptr element_type
00351         ACE_ENV_ARG_DECL_WITH_DEFAULTS);
00352 
00353     CORBA::TypeCode_ptr create_value_tc (
00354         const char *id,
00355         const char *name,
00356         CORBA::ValueModifier type_modifier,
00357         CORBA::TypeCode_ptr concrete_base,
00358         const CORBA::ValueMemberSeq &members
00359         ACE_ENV_ARG_DECL_WITH_DEFAULTS);
00360 
00361     CORBA::TypeCode_ptr create_value_box_tc (
00362         const char *id,
00363         const char *name,
00364         CORBA::TypeCode_ptr boxed_type
00365         ACE_ENV_ARG_DECL_WITH_DEFAULTS);
00366 
00367     CORBA::TypeCode_ptr create_native_tc (
00368         const char *id,
00369         const char *name
00370         ACE_ENV_ARG_DECL_WITH_DEFAULTS);
00371 
00372     CORBA::TypeCode_ptr create_recursive_tc (
00373         const char *id
00374         ACE_ENV_ARG_DECL_WITH_DEFAULTS);
00375 
00376     CORBA::TypeCode_ptr create_abstract_interface_tc (
00377         const char *id,
00378         const char *name
00379         ACE_ENV_ARG_DECL_WITH_DEFAULTS);
00380 
00381     CORBA::TypeCode_ptr create_local_interface_tc (
00382         const char *id,
00383         const char *name
00384         ACE_ENV_ARG_DECL_WITH_DEFAULTS);
00385 
00386     CORBA::TypeCode_ptr create_component_tc (
00387         const char *id,
00388         const char *name
00389         ACE_ENV_ARG_DECL_WITH_DEFAULTS);
00390 
00391     CORBA::TypeCode_ptr create_home_tc (
00392         const char *id,
00393         const char *name
00394         ACE_ENV_ARG_DECL_WITH_DEFAULTS
00395         );
00396 
00397     CORBA::TypeCode_ptr create_event_tc (
00398         const char *id,
00399         const char *name,
00400         CORBA::ValueModifier type_modifier,
00401         CORBA::TypeCode_ptr concrete_base,
00402         const CORBA::ValueMemberSeq &members
00403         ACE_ENV_ARG_DECL_WITH_DEFAULTS);
00404 
00405 #endif /* TAO_HAS_MINIMUM_CORBA */
00406 
00407     // = ORB event loop methods.
00408 
00409     /**
00410      * Instructs the ORB to initialize itself and run its event loop in
00411      * the current thread, not returning until the ORB has shut down.
00412      * If an error occurs during initialization or at runtime, a CORBA
00413      * system exception will be thrown.
00414      */
00415     void run (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS);
00416 
00417     /**
00418      * Instructs the ORB to initialize itself and run its event loop in
00419      * the current thread, not returning until the ORB has shut down or
00420      * the time value specified through @a tv has expired.  If an
00421      * error occurs during initialization or at runtime, a CORBA
00422      * system exception will be thrown.  @a tv is reduced by the
00423      * amount of time spent in this call.
00424      *
00425      * If this function is called with a @ tv value, client threads
00426      * making invocations will continue their operations. When the
00427      * operation timesout and returns, any invocations showing up on
00428      * the server will be buffered by TCP.
00429      **/
00430     void run (ACE_Time_Value &tv
00431               ACE_ENV_ARG_DECL_WITH_DEFAULTS);
00432 
00433     /**
00434      * Instructs the ORB to initialize itself and run its event loop in
00435      * the current thread, not returning until the ORB has shut down or
00436      * the time value specified through @a tv has expired.  If an error
00437      * occurs during initialization or at runtime, a CORBA system
00438      * exception will be thrown.  @a tv is reduced by the amount of time
00439      * spent in this call.  If @a tv is 0, it means that the timeout
00440      * is infinite.  If @a tv is @c ACE_Time_Value::zero, it specifies
00441      * to poll and does not block.
00442      *
00443      * If this function is called with @a tv value, client threads
00444      * making invocations will continue their operations. When the
00445      * operation timesout and returns, any invocations showing up on
00446      * the server will be buffered by TCP.
00447      **/
00448     void run (ACE_Time_Value *tv
00449               ACE_ENV_ARG_DECL_WITH_DEFAULTS);
00450 
00451     /// Returns an indication of whether the ORB needs to perform some
00452     /// work.
00453     CORBA::Boolean work_pending (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS);
00454 
00455     /// Returns an indication of whether the ORB needs to perform some
00456     /// work but will look for work pending for no more than the
00457     /// specified time.
00458     /**
00459      * @note This is useful for implementing an event loop with an
00460      *       idle timeout.
00461      */
00462     CORBA::Boolean work_pending (ACE_Time_Value &tv
00463                                  ACE_ENV_ARG_DECL_WITH_DEFAULTS);
00464 
00465     /**
00466      * This operation performs an implementation-defined unit of work.
00467      * Note that the default behavior is to block if the unit of work
00468      * is not present; this behavior can be modified by passing an
00469      * appropriate @c ACE_Time_Value as described in run().
00470      **/
00471     void perform_work (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS);
00472     void perform_work (ACE_Time_Value &tv
00473                        ACE_ENV_ARG_DECL_WITH_DEFAULTS);
00474     void perform_work (ACE_Time_Value *tv
00475                        ACE_ENV_ARG_DECL_WITH_DEFAULTS);
00476 
00477     /**
00478      * This operation instructs the ORB to shut down. Shutting down the
00479      * ORB causes all Object Adapters to be shut down. If
00480      * @c wait_for_completion parameter is TRUE, this operation blocks
00481      * until all ORB processing (including request processing and object
00482      * deactivation or other operations associated with object adapters)
00483      * has completed.
00484      */
00485     void shutdown (CORBA::Boolean wait_for_completion = false
00486                    ACE_ENV_ARG_DECL_WITH_DEFAULTS);
00487 
00488     /**
00489      * Explicitly destroy the ORB, releasing any resources.  Note that
00490      * TAO *cannot* implicitly release the resources even if you have
00491      * destroyed all the references to a particular ORB since
00492      * CORBA::ORB_init() is required to return the same pointer if
00493      * called with the same ORBid, only after ORB::destroy() is called
00494      * it may return a new one.
00495      *
00496      * The results of multi-threaded applications, trying to destroy ()
00497      * the ORB in one thread and trying to service a request in another
00498      * thread are not well defined. TAO does not support such cases.
00499      */
00500     void destroy (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS);
00501 
00502     CORBA::Object_ptr resolve_initial_references (
00503         const char *name
00504         ACE_ENV_ARG_DECL_WITH_DEFAULTS
00505       );
00506 
00507     /**
00508      * This method acts as a mini-bootstrapping Naming Service, which is
00509      * provided by the ORB for certain well-known object references.  TAO
00510      * supports the "NameService", "TradingService", "RootPOA",
00511      * "ImplRepo", and "POACurrent" via this method.  The @c timeout
00512      * value bounds the amount of time the ORB blocks waiting to
00513      * resolve the service.  This is most useful for bootstrapping
00514      * remote services, such as the "NameService" or "TradingService",
00515      * that are commonly resolved via multicast.  By default, the
00516      * value is 0, which means "use the @c
00517      * TAO_DEFAULT_SERVICE_RESOLUTION_TIMEOUT timeout period".
00518      *
00519      * @note By using a default value for the @c timeout parameter,
00520      *       TAO will remains compliant with the CORBA
00521      *       resolve_initial_references() specification.
00522      */
00523     CORBA::Object_ptr resolve_initial_references (
00524       const char *name,
00525       ACE_Time_Value *timeout
00526       ACE_ENV_ARG_DECL_WITH_DEFAULTS);
00527 
00528 #if !defined(CORBA_E_MICRO)
00529     /// Register an object reference with the ORB.
00530     void register_initial_reference (const char * id,
00531                                      CORBA::Object_ptr obj
00532                                      ACE_ENV_ARG_DECL_WITH_DEFAULTS);
00533 #endif
00534 
00535     /// Returns a sequence of ObjectIds that lists which objects have
00536     /// references available via the initial references mechanism.
00537     CORBA::ORB::ObjectIdList_ptr list_initial_services (
00538       ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS);
00539 
00540 #if !defined(CORBA_E_MICRO)
00541     CORBA::Policy_ptr create_policy (CORBA::PolicyType type,
00542                                      const CORBA::Any& val
00543                                      ACE_ENV_ARG_DECL_WITH_DEFAULTS);
00544 #endif
00545 
00546     // ----------------------------------------------------------------
00547     // = TAO-specific extensions to the CORBA specification.
00548     // ----------------------------------------------------------------
00549 
00550 #if !defined(CORBA_E_MICRO)
00551     /// Create an empty policy, usually to be filled in later by
00552     /// demarshaling.
00553     CORBA::Policy_ptr _create_policy (CORBA::PolicyType type
00554                                       ACE_ENV_ARG_DECL);
00555 #endif
00556 
00557     // Reference counting...
00558     CORBA::ULong _incr_refcnt (void);
00559     CORBA::ULong _decr_refcnt (void);
00560 
00561     /// Set the IOR flag.
00562     void _use_omg_ior_format (CORBA::Boolean ior);
00563 
00564     /// Get the IOR flag.
00565     CORBA::Boolean _use_omg_ior_format (void);
00566 
00567     /// Get the ORB core.
00568     TAO_ORB_Core *orb_core (void) const;
00569 
00570     /**
00571      * TAO specific extension to get and set the client ID. The client
00572      * id can be set by the application which would be used by the FT
00573      * service. As there are no specific interfaces defined in the
00574      * spec, we have this proprietary extension.
00575      */
00576     const ACE_CString &_tao_ft_client_id (void);
00577     void _tao_ft_client_id (const char *id);
00578 
00579     /// Factory method that creates an ORB.
00580     static CORBA::ORB_ptr _tao_make_ORB (TAO_ORB_Core * orb_core);
00581 
00582     // Useful for template programming.
00583     typedef ORB_ptr _ptr_type;
00584     typedef ORB_var _var_type;
00585     typedef ORB_out _out_type;
00586 
00587     /// Get the Timeout value
00588     ACE_Time_Value *get_timeout (void);
00589 
00590   protected:
00591 
00592     // We must be created via the @c CORBA::ORB_init() function.
00593     ORB (TAO_ORB_Core *orb_core);
00594 
00595     /// Destructor
00596     /**
00597      * Protected destructor to enforce proper memory management
00598      * through the reference counting mechanism.
00599      */
00600     ~ORB (void);
00601 
00602     /// Resolve the Policy Manager for this ORB.
00603     CORBA::Object_ptr resolve_policy_manager (void);
00604 
00605     /// Resolve the Policy Current for this thread.
00606     CORBA::Object_ptr resolve_policy_current (void);
00607 
00608   private:
00609 
00610     /// Resolve the given service based on the service ID.
00611     /**
00612      * "@c resolve_service" is a legacy name.  This method now simply
00613      * sets up a default initial reference that will be subsequently
00614      * used in resolve_initial_references().
00615      */
00616     void resolve_service (TAO::MCAST_SERVICEID service_id);
00617 
00618     /// Convert an OMG IOR into an object reference.
00619     CORBA::Object_ptr ior_string_to_object (const char* ior
00620                                             ACE_ENV_ARG_DECL);
00621 
00622     /// Convert an URL style IOR into an object reference.
00623     CORBA::Object_ptr url_ior_string_to_object (const char* ior
00624                                                 ACE_ENV_ARG_DECL);
00625 
00626     /// Check if ORB has shutdown.  If it has, throw the appropriate
00627     /// exception.
00628     void check_shutdown (ACE_ENV_SINGLE_ARG_DECL);
00629 
00630     /// Set the timeout value
00631     void set_timeout (ACE_Time_Value * timeout);
00632 
00633   private:
00634 
00635     /// Lock required for mutual exclusion between multiple threads.
00636     TAO_SYNCH_MUTEX lock_;
00637 
00638     /// Maintains a reference count of number of instantiations of the
00639     /// ORB.
00640     CORBA::ULong refcount_;
00641 
00642     /// The ORB_Core that created us....
00643     TAO_ORB_Core * orb_core_;
00644 
00645     /// Decides whether to use the URL notation or to use IOR notation.
00646     CORBA::Boolean use_omg_ior_format_;
00647 
00648     // Prevent copying and assignment.
00649     ORB (const ORB &);
00650     ORB &operator= (const ORB &);
00651 
00652     /// Timeout value
00653     ACE_Time_Value * timeout_;
00654 
00655   };
00656 }  // End namespace CORBA
00657 
00658 namespace TAO
00659 {
00660   namespace ORB
00661   {
00662     /// Initialize the ORB globals correctly, i.e., only when they
00663     /// haven't been initialized yet.
00664     void init_orb_globals (ACE_ENV_SINGLE_ARG_DECL);
00665   }
00666 }
00667 
00668 TAO_END_VERSIONED_NAMESPACE_DECL
00669 
00670 #if defined (__ACE_INLINE__)
00671 # include "tao/ORB.i"
00672 #endif /* __ACE_INLINE__ */
00673 
00674 #include /**/ "ace/post.h"
00675 
00676 #endif /* TAO_ORB_H */

Generated on Thu Nov 9 11:54:18 2006 for TAO by doxygen 1.3.6