CORBA::ORB Interface Reference

ORB pseudo-object. More...

import "InvalidName.pidl";

Collaboration diagram for CORBA::ORB:

Collaboration graph
[legend]
List of all members.

Public Types

typedef char * ObjectId
typedef CORBA::String_var ObjectId_var
typedef CORBA::String_out ObjectId_out
typedef CORBA::ORB_ObjectIdList ObjectIdList
typedef CORBA::ORB_ObjectIdList_var ObjectIdList_var
typedef CORBA::ORB_ObjectIdList_out ObjectIdList_out
typedef CORBA::ORB_ObjectIdListObjectIdList_ptr
typedef ORB_ptr _ptr_type
typedef ORB_var _var_type
typedef ORB_out _out_type

Public Member Functions

char * id (void)
 Return this ORB's ORBid.

CORBA::Object_ptr string_to_object (const char *str)
char * object_to_string (CORBA::Object_ptr obj)
CORBA::ValueFactory register_value_factory (const char *repository_id, CORBA::ValueFactory factory)
void unregister_value_factory (const char *repository_id)
CORBA::ValueFactory lookup_value_factory (const char *repository_id)
void create_list (CORBA::Long count, CORBA::NVList_ptr &new_list)
void create_operation_list (CORBA::OperationDef_ptr opDef, CORBA::NVList_ptr &result)
void create_named_value (CORBA::NamedValue_ptr &nmval)
void create_exception_list (CORBA::ExceptionList_ptr &exclist)
void create_environment (CORBA::Environment_ptr &new_env)
void create_context_list (CORBA::ContextList_ptr &ctxtlist)
void get_default_context (CORBA::Context_ptr &ctx)
CORBA::Boolean get_service_information (CORBA::ServiceType service_type, CORBA::ServiceInformation_out service_information)
void send_multiple_requests_oneway (const CORBA::RequestSeq &req)
void send_multiple_requests_deferred (const CORBA::RequestSeq &req)
void get_next_response (CORBA::Request_ptr &req)
CORBA::Boolean poll_next_response (void)
CORBA::TypeCode_ptr create_struct_tc (const char *id, const char *name, const CORBA::StructMemberSeq &members)
 The ORB TypeCode creation functions.

CORBA::TypeCode_ptr create_union_tc (const char *id, const char *name, CORBA::TypeCode_ptr discriminator_type, const CORBA::UnionMemberSeq &members)
CORBA::TypeCode_ptr create_enum_tc (const char *id, const char *name, const CORBA::EnumMemberSeq &members)
CORBA::TypeCode_ptr create_alias_tc (const char *id, const char *name, CORBA::TypeCode_ptr original_type)
CORBA::TypeCode_ptr create_exception_tc (const char *id, const char *name, const CORBA::StructMemberSeq &members)
CORBA::TypeCode_ptr create_interface_tc (const char *id, const char *name)
CORBA::TypeCode_ptr create_string_tc (CORBA::ULong bound)
CORBA::TypeCode_ptr create_wstring_tc (CORBA::ULong bound)
CORBA::TypeCode_ptr create_fixed_tc (CORBA::UShort digits, CORBA::UShort scale)
CORBA::TypeCode_ptr create_sequence_tc (CORBA::ULong bound, CORBA::TypeCode_ptr element_type)
CORBA::TypeCode_ptr create_array_tc (CORBA::ULong length, CORBA::TypeCode_ptr element_type)
CORBA::TypeCode_ptr create_value_tc (const char *id, const char *name, CORBA::ValueModifier type_modifier, CORBA::TypeCode_ptr concrete_base, const CORBA::ValueMemberSeq &members)
CORBA::TypeCode_ptr create_value_box_tc (const char *id, const char *name, CORBA::TypeCode_ptr boxed_type)
CORBA::TypeCode_ptr create_native_tc (const char *id, const char *name)
CORBA::TypeCode_ptr create_recursive_tc (const char *id)
CORBA::TypeCode_ptr create_abstract_interface_tc (const char *id, const char *name)
CORBA::TypeCode_ptr create_local_interface_tc (const char *id, const char *name)
CORBA::TypeCode_ptr create_component_tc (const char *id, const char *name)
CORBA::TypeCode_ptr create_home_tc (const char *id, const char *name)
CORBA::TypeCode_ptr create_event_tc (const char *id, const char *name, CORBA::ValueModifier type_modifier, CORBA::TypeCode_ptr concrete_base, const CORBA::ValueMemberSeq &members)
void run (void)
void run (ACE_Time_Value &tv)
void run (ACE_Time_Value *tv)
CORBA::Boolean work_pending (void)
CORBA::Boolean work_pending (ACE_Time_Value &tv)
void perform_work (void)
void perform_work (ACE_Time_Value &tv)
void perform_work (ACE_Time_Value *tv)
void shutdown (CORBA::Boolean wait_for_completion=false)
void destroy (void)
CORBA::Object_ptr resolve_initial_references (const char *name, ACE_Time_Value *timeout=0)
void register_initial_reference (const char *id, CORBA::Object_ptr obj)
 Register an object reference with the ORB.

CORBA::ORB::ObjectIdList_ptr list_initial_services (void)
CORBA::Policy_ptr create_policy (CORBA::PolicyType type, const CORBA::Any &val)
CORBA::Policy_ptr _create_policy (CORBA::PolicyType type)
unsigned long _incr_refcnt (void)
unsigned long _decr_refcnt (void)
void _use_omg_ior_format (CORBA::Boolean ior)
 Set the IOR flag.

CORBA::Boolean _use_omg_ior_format (void)
 Get the IOR flag.

TAO_ORB_Coreorb_core (void) const
 Get the ORB core.

ACE_Time_Valueget_timeout (void)
 Get the Timeout value.


Static Public Member Functions

CORBA::ORB_ptr _duplicate (CORBA::ORB_ptr orb)
 Return a duplicate of orb.

CORBA::ORB_ptr _nil (void)
CORBA::ORB_ptr _tao_make_ORB (TAO_ORB_Core *orb_core)
 Factory method that creates an ORB.


Static Public Attributes

CORBA::TypeCode_ptr const  _tc_ObjectId
CORBA::TypeCode_ptr const  _tc_ObjectIdList

Protected Member Functions

 ORB (TAO_ORB_Core *orb_core)
 ~ORB (void)
 Destructor.

CORBA::Object_ptr resolve_policy_manager (void)
 Resolve the Policy Manager for this ORB.

CORBA::Object_ptr resolve_policy_current (void)
 Resolve the Policy Current for this thread.


Private Member Functions

void resolve_service (TAO::MCAST_SERVICEID service_id)
 Resolve the given service based on the service ID.

CORBA::Object_ptr ior_string_to_object (const char *ior)
 Convert an OMG IOR into an object reference.

CORBA::Object_ptr url_ior_string_to_object (const char *ior)
 Convert an URL style IOR into an object reference.

void check_shutdown (void)
void set_timeout (ACE_Time_Value *timeout)
 Set the timeout value.

 ORB (const ORB &)
ORBoperator= (const ORB &)

Private Attributes

ACE_Atomic_Op< TAO_SYNCH_MUTEX,
unsigned long > 
refcount_
TAO_ORB_Coreorb_core_
 The ORB_Core that created us....

CORBA::Boolean use_omg_ior_format_
 Decides whether to use the URL notation or to use IOR notation.

ACE_Time_Valuetimeout_
 Timeout value.


Detailed Description

ORB pseudo-object.

The "ORB" pseudo-object is used in bootstrapping, such as to create object references from strings. This class is intended to be inherited by others, which will provide some more of the CORBA support. Implementations of this "CORBA::ORB" class must know how to create stringify/destringify their objrefs, as well as how to marshal and unmarshal them.

Definition at line 39 of file InvalidName.pidl.


Member Typedef Documentation

typedef ORB_out CORBA::ORB::_out_type
 

Definition at line 514 of file ORB.h.

typedef ORB_ptr CORBA::ORB::_ptr_type
 

Definition at line 512 of file ORB.h.

typedef ORB_var CORBA::ORB::_var_type
 

Definition at line 513 of file ORB.h.

typedef char* CORBA::ORB::ObjectId
 

Definition at line 187 of file ORB.h.

typedef CORBA::String_out CORBA::ORB::ObjectId_out
 

Definition at line 189 of file ORB.h.

typedef CORBA::String_var CORBA::ORB::ObjectId_var
 

Definition at line 188 of file ORB.h.

typedef CORBA::ORB_ObjectIdList CORBA::ORB::ObjectIdList
 

Definition at line 192 of file ORB.h.

Referenced by TAO_ORB_Core::list_initial_references().

typedef CORBA::ORB_ObjectIdList_out CORBA::ORB::ObjectIdList_out
 

Definition at line 194 of file ORB.h.

typedef CORBA::ORB_ObjectIdList* CORBA::ORB::ObjectIdList_ptr
 

Definition at line 195 of file ORB.h.

typedef CORBA::ORB_ObjectIdList_var CORBA::ORB::ObjectIdList_var
 

Definition at line 193 of file ORB.h.

Referenced by TAO_ORB_Core::list_initial_references().


Constructor & Destructor Documentation

CORBA::ORB::ORB TAO_ORB_Core orb_core  )  [protected]
 

Definition at line 131 of file ORB.cpp.

References use_omg_ior_format_.

00132   : refcount_ (1)
00133   , orb_core_ (orb_core)
00134   , use_omg_ior_format_ (1)
00135   , timeout_ (0)
00136 {
00137 }

CORBA::ORB::~ORB void   )  [protected]
 

Destructor.

Protected destructor to enforce proper memory management through the reference counting mechanism.

Definition at line 139 of file ORB.cpp.

00140 {
00141   // This destructor is only invoked when the last ORB reference (not
00142   // instance) is being destroyed.
00143 }

CORBA::ORB::ORB const ORB  )  [private]
 


Member Function Documentation

CORBA::Policy_ptr CORBA::ORB::_create_policy CORBA::PolicyType  type  ) 
 

Create an empty policy, usually to be filled in later by demarshaling.

Definition at line 1582 of file ORB.cpp.

References TAO::PolicyFactory_Registry_Adapter::_create_policy(), check_shutdown(), TAO_ORB_Core::policy_factory_registry(), and CORBA::PolicyType.

Referenced by TAO_Profile::get_policies().

01583 {
01584   this->check_shutdown ();
01585 
01586   TAO::PolicyFactory_Registry_Adapter *adapter =
01587     this->orb_core_->policy_factory_registry ();
01588 
01589   if (adapter == 0)
01590     {
01591       throw ::CORBA::INTERNAL ();
01592     }
01593 
01594   // Attempt to obtain the policy from the policy factory registry.
01595   return adapter->_create_policy (type);
01596 }

ACE_INLINE unsigned long CORBA::ORB::_decr_refcnt void   ) 
 

Definition at line 30 of file ORB.inl.

Referenced by CORBA::release().

00031 {
00032   unsigned long count = --this->refcount_;
00033 
00034   if (count != 0)
00035     {
00036       return count;
00037     }
00038 
00039   delete this;
00040   return 0;
00041 }

ACE_INLINE CORBA::ORB_ptr CORBA::ORB::_duplicate CORBA::ORB_ptr  orb  )  [static]
 

Return a duplicate of orb.

When work with this duplicate is complete, it should be freed up using CORBA::release().

Definition at line 44 of file ORB.inl.

References _incr_refcnt(), and CORBA::ORB_ptr.

Referenced by CORBA::Object::_get_orb(), CORBA::ORB_init(), TAO_Stub::servant_orb(), TAO_Stub::servant_orb_ptr(), and TAO_Stub::TAO_Stub().

00045 {
00046   if (obj)
00047     {
00048       obj->_incr_refcnt ();
00049     }
00050 
00051   return obj;
00052 }

ACE_INLINE unsigned long CORBA::ORB::_incr_refcnt void   ) 
 

Definition at line 24 of file ORB.inl.

Referenced by _duplicate().

00025 {
00026   return ++this->refcount_;
00027 }

ACE_INLINE CORBA::ORB_ptr CORBA::ORB::_nil void   )  [static]
 

Returns a pointer to a nil ORB, i.e., an non-existent ORB. This can be used for initialization or in comparisons.

Definition at line 57 of file ORB.inl.

Referenced by _tao_make_ORB(), CORBA::is_nil(), and CORBA::ORB_init().

00058 {
00059   return 0;
00060 }

CORBA::ORB_ptr CORBA::ORB::_tao_make_ORB TAO_ORB_Core orb_core  )  [static]
 

Factory method that creates an ORB.

Definition at line 1076 of file ORB.cpp.

References _nil(), ACE_NEW_RETURN, and CORBA::ORB_ptr.

Referenced by TAO_ORB_Core::init().

01077 {
01078   CORBA::ORB_ptr orb = CORBA::ORB_ptr ();
01079 
01080   ACE_NEW_RETURN (orb,
01081                   CORBA::ORB (orb_core),
01082                   CORBA::ORB::_nil ());
01083 
01084   return orb;
01085 }

ACE_INLINE CORBA::Boolean CORBA::ORB::_use_omg_ior_format void   ) 
 

Get the IOR flag.

Definition at line 69 of file ORB.inl.

References use_omg_ior_format_.

00070 {
00071   return this->use_omg_ior_format_;
00072 }

ACE_INLINE void CORBA::ORB::_use_omg_ior_format CORBA::Boolean  ior  ) 
 

Set the IOR flag.

Definition at line 63 of file ORB.inl.

References use_omg_ior_format_.

Referenced by TAO_ORB_Core::init(), and TAO_Profile::verify_orb_configuration().

00064 {
00065   this->use_omg_ior_format_ = ior;
00066 }

void CORBA::ORB::check_shutdown void   )  [private]
 

Check if ORB has shutdown. If it has, throw the appropriate exception.

Definition at line 1037 of file ORB.cpp.

References TAO_ORB_Core::check_shutdown(), and orb_core().

Referenced by _create_policy(), create_policy(), list_initial_services(), object_to_string(), perform_work(), resolve_initial_references(), run(), shutdown(), string_to_object(), and work_pending().

01038 {
01039   if (this->orb_core () != 0)
01040     {
01041       this->orb_core ()->check_shutdown ();
01042     }
01043   else
01044     {
01045       // If the ORB_Core pointer is zero, assume that the ORB_Core has
01046       // been destroyed.
01047 
01048       // As defined by the CORBA 2.3 specification, throw a
01049       // CORBA::OBJECT_NOT_EXIST exception if the ORB has been
01050       // destroyed by the time an ORB function is called.
01051 
01052       throw ::CORBA::OBJECT_NOT_EXIST (0, CORBA::COMPLETED_NO);
01053     }
01054 }

CORBA::TypeCode_ptr CORBA::ORB::create_abstract_interface_tc const char *  id,
const char *  name
 

Definition at line 680 of file ORB.cpp.

References TAO_TypeCodeFactory_Adapter::create_abstract_interface_tc(), and ACE_Dynamic_Service< TYPE >::instance().

00681 {
00682   TAO_TypeCodeFactory_Adapter *adapter =
00683     ACE_Dynamic_Service<TAO_TypeCodeFactory_Adapter>::instance (
00684         TAO_ORB_Core::typecodefactory_adapter_name ());
00685 
00686   if (adapter == 0)
00687     {
00688       throw ::CORBA::INTERNAL ();
00689     }
00690 
00691   return adapter->create_abstract_interface_tc (id, name);
00692 }

CORBA::TypeCode_ptr CORBA::ORB::create_alias_tc const char *  id,
const char *  name,
CORBA::TypeCode_ptr  original_type
 

Definition at line 473 of file ORB.cpp.

References TAO_TypeCodeFactory_Adapter::create_alias_tc(), ACE_Dynamic_Service< TYPE >::instance(), and CORBA::TypeCode_ptr.

00477 {
00478   TAO_TypeCodeFactory_Adapter *adapter =
00479     ACE_Dynamic_Service<TAO_TypeCodeFactory_Adapter>::instance (
00480         TAO_ORB_Core::typecodefactory_adapter_name ());
00481 
00482   if (adapter == 0)
00483     {
00484       throw ::CORBA::INTERNAL ();
00485     }
00486 
00487   return adapter->create_alias_tc (id, name, original_type);
00488 }

CORBA::TypeCode_ptr CORBA::ORB::create_array_tc CORBA::ULong  length,
CORBA::TypeCode_ptr  element_type
 

Definition at line 592 of file ORB.cpp.

References TAO_TypeCodeFactory_Adapter::create_array_tc(), ACE_Dynamic_Service< TYPE >::instance(), and CORBA::TypeCode_ptr.

00595 {
00596   TAO_TypeCodeFactory_Adapter *adapter =
00597     ACE_Dynamic_Service<TAO_TypeCodeFactory_Adapter>::instance (
00598         TAO_ORB_Core::typecodefactory_adapter_name ());
00599 
00600   if (adapter == 0)
00601     {
00602       throw ::CORBA::INTERNAL ();
00603     }
00604 
00605   return adapter->create_array_tc (length, element_type);
00606 }

CORBA::TypeCode_ptr CORBA::ORB::create_component_tc const char *  id,
const char *  name
 

Definition at line 710 of file ORB.cpp.

References TAO_TypeCodeFactory_Adapter::create_component_tc(), and ACE_Dynamic_Service< TYPE >::instance().

00711 {
00712   TAO_TypeCodeFactory_Adapter *adapter =
00713     ACE_Dynamic_Service<TAO_TypeCodeFactory_Adapter>::instance (
00714         TAO_ORB_Core::typecodefactory_adapter_name ());
00715 
00716   if (adapter == 0)
00717     {
00718       throw ::CORBA::INTERNAL ();
00719     }
00720 
00721   return adapter->create_component_tc (id, name);
00722 }

void CORBA::ORB::create_context_list CORBA::ContextList_ptr ctxtlist  ) 
 

Definition at line 353 of file ORB.cpp.

References CORBA::ContextList_ptr, and ENOTSUP.

00354 {
00355   throw ::CORBA::NO_IMPLEMENT (
00356                CORBA::SystemException::_tao_minor_code (
00357                  0,
00358                  ENOTSUP),
00359                CORBA::COMPLETED_NO);
00360 }

CORBA::TypeCode_ptr CORBA::ORB::create_enum_tc const char *  id,
const char *  name,
const CORBA::EnumMemberSeq &  members
 

Definition at line 455 of file ORB.cpp.

References TAO_TypeCodeFactory_Adapter::create_enum_tc(), and ACE_Dynamic_Service< TYPE >::instance().

00459 {
00460   TAO_TypeCodeFactory_Adapter *adapter =
00461     ACE_Dynamic_Service<TAO_TypeCodeFactory_Adapter>::instance (
00462         TAO_ORB_Core::typecodefactory_adapter_name ());
00463 
00464   if (adapter == 0)
00465     {
00466       throw ::CORBA::INTERNAL ();
00467     }
00468 
00469   return adapter->create_enum_tc (id, name, members);
00470 }

void CORBA::ORB::create_environment CORBA::Environment_ptr new_env  ) 
 

Definition at line 306 of file ORB.cpp.

References ACE_NEW_THROW_EX, and CORBA::Environment_ptr.

00307 {
00308   ACE_NEW_THROW_EX (environment,
00309                     CORBA::Environment (),
00310                     CORBA::NO_MEMORY (
00311                       CORBA::SystemException::_tao_minor_code (
00312                         0,
00313                         ENOMEM),
00314                       CORBA::COMPLETED_NO));
00315 }

CORBA::TypeCode_ptr CORBA::ORB::create_event_tc const char *  id,
const char *  name,
CORBA::ValueModifier  type_modifier,
CORBA::TypeCode_ptr  concrete_base,
const CORBA::ValueMemberSeq &  members
 

Definition at line 740 of file ORB.cpp.

References TAO_TypeCodeFactory_Adapter::create_event_tc(), ACE_Dynamic_Service< TYPE >::instance(), CORBA::TypeCode_ptr, and CORBA::ValueModifier.

00746 {
00747   TAO_TypeCodeFactory_Adapter *adapter =
00748     ACE_Dynamic_Service<TAO_TypeCodeFactory_Adapter>::instance (
00749         TAO_ORB_Core::typecodefactory_adapter_name ());
00750 
00751   if (adapter == 0)
00752     {
00753       throw ::CORBA::INTERNAL ();
00754     }
00755 
00756   return adapter->create_event_tc (id,
00757                                    name,
00758                                    type_modifier,
00759                                    concrete_base,
00760                                    members);
00761 }

void CORBA::ORB::create_exception_list CORBA::ExceptionList_ptr exclist  ) 
 

Definition at line 279 of file ORB.cpp.

References TAO_Dynamic_Adapter::create_exception_list(), CORBA::ExceptionList_ptr, and ACE_Dynamic_Service< TYPE >::instance().

00280 {
00281   TAO_Dynamic_Adapter *dynamic_adapter =
00282     ACE_Dynamic_Service<TAO_Dynamic_Adapter>::instance (
00283         TAO_ORB_Core::dynamic_adapter_name ());
00284 
00285   dynamic_adapter->create_exception_list (list);
00286 }

CORBA::TypeCode_ptr CORBA::ORB::create_exception_tc const char *  id,
const char *  name,
const CORBA::StructMemberSeq &  members
 

Definition at line 491 of file ORB.cpp.

References TAO_TypeCodeFactory_Adapter::create_exception_tc(), and ACE_Dynamic_Service< TYPE >::instance().

00495 {
00496   TAO_TypeCodeFactory_Adapter *adapter =
00497     ACE_Dynamic_Service<TAO_TypeCodeFactory_Adapter>::instance (
00498         TAO_ORB_Core::typecodefactory_adapter_name ());
00499 
00500   if (adapter == 0)
00501     {
00502       throw ::CORBA::INTERNAL ();
00503     }
00504 
00505   return adapter->create_exception_tc (id, name, members);
00506 }

CORBA::TypeCode_ptr CORBA::ORB::create_fixed_tc CORBA::UShort  digits,
CORBA::UShort  scale
 

Definition at line 558 of file ORB.cpp.

References TAO_TypeCodeFactory_Adapter::create_fixed_tc(), and ACE_Dynamic_Service< TYPE >::instance().

00561 {
00562   TAO_TypeCodeFactory_Adapter *adapter =
00563     ACE_Dynamic_Service<TAO_TypeCodeFactory_Adapter>::instance (
00564         TAO_ORB_Core::typecodefactory_adapter_name ());
00565 
00566   if (adapter == 0)
00567     {
00568       throw ::CORBA::INTERNAL ();
00569     }
00570 
00571   return adapter->create_fixed_tc (digits, scale);
00572 }

CORBA::TypeCode_ptr CORBA::ORB::create_home_tc const char *  id,
const char *  name
 

Definition at line 725 of file ORB.cpp.

References TAO_TypeCodeFactory_Adapter::create_home_tc(), and ACE_Dynamic_Service< TYPE >::instance().

00726 {
00727   TAO_TypeCodeFactory_Adapter *adapter =
00728     ACE_Dynamic_Service<TAO_TypeCodeFactory_Adapter>::instance (
00729         TAO_ORB_Core::typecodefactory_adapter_name ());
00730 
00731   if (adapter == 0)
00732     {
00733       throw ::CORBA::INTERNAL ();
00734     }
00735 
00736   return adapter->create_home_tc (id, name);
00737 }

CORBA::TypeCode_ptr CORBA::ORB::create_interface_tc const char *  id,
const char *  name
 

Definition at line 509 of file ORB.cpp.

References TAO_TypeCodeFactory_Adapter::create_interface_tc(), and ACE_Dynamic_Service< TYPE >::instance().

00512 {
00513   TAO_TypeCodeFactory_Adapter *adapter =
00514     ACE_Dynamic_Service<TAO_TypeCodeFactory_Adapter>::instance (
00515         TAO_ORB_Core::typecodefactory_adapter_name ());
00516 
00517   if (adapter == 0)
00518     {
00519       throw ::CORBA::INTERNAL ();
00520     }
00521 
00522   return adapter->create_interface_tc (id, name);
00523 }

void CORBA::ORB::create_list CORBA::Long  count,
CORBA::NVList_ptr new_list
 

Definition at line 261 of file ORB.cpp.

References ACE_ERROR, ACE_TEXT, TAO_NVList_Adapter::create_list(), ACE_Dynamic_Service< TYPE >::instance(), LM_ERROR, and CORBA::NVList_ptr.

00262 {
00263   TAO_NVList_Adapter *adapter =
00264     ACE_Dynamic_Service<TAO_NVList_Adapter>::instance ("TAO_NVList_Adapter");
00265 
00266   if (adapter == 0)
00267     {
00268       ACE_ERROR ((LM_ERROR,
00269                   ACE_TEXT ("(%P|%t) %p\n"),
00270                   ACE_TEXT ("ORB unable to find the ")
00271                   ACE_TEXT ("NVList Adapter instance")));
00272       throw ::CORBA::INTERNAL ();
00273     }
00274 
00275   adapter->create_list (count, new_list);
00276 }

CORBA::TypeCode_ptr CORBA::ORB::create_local_interface_tc const char *  id,
const char *  name
 

Definition at line 695 of file ORB.cpp.

References TAO_TypeCodeFactory_Adapter::create_local_interface_tc(), and ACE_Dynamic_Service< TYPE >::instance().

00696 {
00697   TAO_TypeCodeFactory_Adapter *adapter =
00698     ACE_Dynamic_Service<TAO_TypeCodeFactory_Adapter>::instance (
00699         TAO_ORB_Core::typecodefactory_adapter_name ());
00700 
00701   if (adapter == 0)
00702     {
00703       throw ::CORBA::INTERNAL ();
00704     }
00705 
00706   return adapter->create_local_interface_tc (id, name);
00707 }

void CORBA::ORB::create_named_value CORBA::NamedValue_ptr nmval  ) 
 

Definition at line 318 of file ORB.cpp.

References ACE_ERROR, ACE_TEXT, TAO_NVList_Adapter::create_named_value(), ACE_Dynamic_Service< TYPE >::instance(), LM_ERROR, and CORBA::NamedValue_ptr.

00319 {
00320   TAO_NVList_Adapter *adapter =
00321     ACE_Dynamic_Service<TAO_NVList_Adapter>::instance (
00322         "TAO_NVList_Adapter");
00323 
00324   if (adapter == 0)
00325     {
00326       ACE_ERROR ((LM_ERROR,
00327                   ACE_TEXT ("(%P|%t) %p\n"),
00328                   ACE_TEXT ("ORB unable to find the ")
00329                   ACE_TEXT ("NVList Adapter instance")));
00330 
00331       throw ::CORBA::INTERNAL ();
00332     }
00333 
00334   adapter->create_named_value (nv);
00335 }

CORBA::TypeCode_ptr CORBA::ORB::create_native_tc const char *  id,
const char *  name
 

Definition at line 650 of file ORB.cpp.

References TAO_TypeCodeFactory_Adapter::create_native_tc(), and ACE_Dynamic_Service< TYPE >::instance().

00651 {
00652   TAO_TypeCodeFactory_Adapter *adapter =
00653     ACE_Dynamic_Service<TAO_TypeCodeFactory_Adapter>::instance (
00654         TAO_ORB_Core::typecodefactory_adapter_name ());
00655 
00656   if (adapter == 0)
00657     {
00658       throw ::CORBA::INTERNAL ();
00659     }
00660 
00661   return adapter->create_native_tc (id, name);
00662 }

void CORBA::ORB::create_operation_list CORBA::OperationDef_ptr  opDef,
CORBA::NVList_ptr result
 

Definition at line 289 of file ORB.cpp.

References TAO_IFR_Client_Adapter::create_operation_list(), ACE_Dynamic_Service< TYPE >::instance(), CORBA::NVList_ptr, and CORBA::OperationDef_ptr.

00291 {
00292   TAO_IFR_Client_Adapter *adapter =
00293     ACE_Dynamic_Service<TAO_IFR_Client_Adapter>::instance (
00294         TAO_ORB_Core::ifr_client_adapter_name ());
00295 
00296   if (adapter == 0)
00297     {
00298       throw ::CORBA::INTF_REPOS ();
00299     }
00300 
00301   adapter->create_operation_list (this, opDef, result);
00302 }

CORBA::Policy_ptr CORBA::ORB::create_policy CORBA::PolicyType  type,
const CORBA::Any &  val
 

Definition at line 1563 of file ORB.cpp.

References check_shutdown(), TAO::PolicyFactory_Registry_Adapter::create_policy(), TAO_ORB_Core::policy_factory_registry(), and CORBA::PolicyType.

01564 {
01565   this->check_shutdown ();
01566 
01567   TAO::PolicyFactory_Registry_Adapter *adapter =
01568     this->orb_core_->policy_factory_registry ();
01569 
01570   if (adapter == 0)
01571     {
01572       throw ::CORBA::INTERNAL ();
01573     }
01574 
01575   // Attempt to obtain the policy from the policy factory registry.
01576   return adapter->create_policy (type, val);
01577 }

CORBA::TypeCode_ptr CORBA::ORB::create_recursive_tc const char *  id  ) 
 

Definition at line 665 of file ORB.cpp.

References TAO_TypeCodeFactory_Adapter::create_recursive_tc(), and ACE_Dynamic_Service< TYPE >::instance().

00666 {
00667   TAO_TypeCodeFactory_Adapter *adapter =
00668     ACE_Dynamic_Service<TAO_TypeCodeFactory_Adapter>::instance (
00669         TAO_ORB_Core::typecodefactory_adapter_name ());
00670 
00671   if (adapter == 0)
00672     {
00673       throw ::CORBA::INTERNAL ();
00674     }
00675 
00676   return adapter->create_recursive_tc (id);
00677 }

CORBA::TypeCode_ptr CORBA::ORB::create_sequence_tc CORBA::ULong  bound,
CORBA::TypeCode_ptr  element_type
 

Definition at line 575 of file ORB.cpp.

References TAO_TypeCodeFactory_Adapter::create_sequence_tc(), ACE_Dynamic_Service< TYPE >::instance(), and CORBA::TypeCode_ptr.

00578 {
00579   TAO_TypeCodeFactory_Adapter *adapter =
00580     ACE_Dynamic_Service<TAO_TypeCodeFactory_Adapter>::instance (
00581         TAO_ORB_Core::typecodefactory_adapter_name ());
00582 
00583   if (adapter == 0)
00584     {
00585       throw ::CORBA::INTERNAL ();
00586     }
00587 
00588   return adapter->create_sequence_tc (bound, element_type);
00589 }

CORBA::TypeCode_ptr CORBA::ORB::create_string_tc CORBA::ULong  bound  ) 
 

Definition at line 526 of file ORB.cpp.

References TAO_TypeCodeFactory_Adapter::create_string_tc(), and ACE_Dynamic_Service< TYPE >::instance().

00528 {
00529   TAO_TypeCodeFactory_Adapter *adapter =
00530     ACE_Dynamic_Service<TAO_TypeCodeFactory_Adapter>::instance (
00531         TAO_ORB_Core::typecodefactory_adapter_name ());
00532 
00533   if (adapter == 0)
00534     {
00535       throw ::CORBA::INTERNAL ();
00536     }
00537 
00538   return adapter->create_string_tc (bound);
00539 }

CORBA::TypeCode_ptr CORBA::ORB::create_struct_tc const char *  id,
const char *  name,
const CORBA::StructMemberSeq &  members
 

The ORB TypeCode creation functions.

Definition at line 415 of file ORB.cpp.

References TAO_TypeCodeFactory_Adapter::create_struct_tc(), and ACE_Dynamic_Service< TYPE >::instance().

00419 {
00420   TAO_TypeCodeFactory_Adapter *adapter =
00421     ACE_Dynamic_Service<TAO_TypeCodeFactory_Adapter>::instance (
00422         TAO_ORB_Core::typecodefactory_adapter_name ());
00423 
00424   if (adapter == 0)
00425     {
00426       throw ::CORBA::INTERNAL ();
00427     }
00428 
00429   return adapter->create_struct_tc (id, name, members);
00430 }

CORBA::TypeCode_ptr CORBA::ORB::create_union_tc const char *  id,
const char *  name,
CORBA::TypeCode_ptr  discriminator_type,
const CORBA::UnionMemberSeq &  members
 

Definition at line 433 of file ORB.cpp.

References TAO_TypeCodeFactory_Adapter::create_union_tc(), ACE_Dynamic_Service< TYPE >::instance(), and CORBA::TypeCode_ptr.

00438 {
00439   TAO_TypeCodeFactory_Adapter *adapter =
00440     ACE_Dynamic_Service<TAO_TypeCodeFactory_Adapter>::instance (
00441         TAO_ORB_Core::typecodefactory_adapter_name ());
00442 
00443   if (adapter == 0)
00444     {
00445       throw ::CORBA::INTERNAL ();
00446     }
00447 
00448   return adapter->create_union_tc (id,
00449                                    name,
00450                                    discriminator_type,
00451                                    members);
00452 }

CORBA::TypeCode_ptr CORBA::ORB::create_value_box_tc const char *  id,
const char *  name,
CORBA::TypeCode_ptr  boxed_type
 

Definition at line 632 of file ORB.cpp.

References TAO_TypeCodeFactory_Adapter::create_value_box_tc(), ACE_Dynamic_Service< TYPE >::instance(), and CORBA::TypeCode_ptr.

00636 {
00637   TAO_TypeCodeFactory_Adapter *adapter =
00638     ACE_Dynamic_Service<TAO_TypeCodeFactory_Adapter>::instance (
00639         TAO_ORB_Core::typecodefactory_adapter_name ());
00640 
00641   if (adapter == 0)
00642     {
00643       throw ::CORBA::INTERNAL ();
00644     }
00645 
00646   return adapter->create_value_box_tc (id, name, boxed_type);
00647 }

CORBA::TypeCode_ptr CORBA::ORB::create_value_tc const char *  id,
const char *  name,
CORBA::ValueModifier  type_modifier,
CORBA::TypeCode_ptr  concrete_base,
const CORBA::ValueMemberSeq &  members
 

Definition at line 609 of file ORB.cpp.

References TAO_TypeCodeFactory_Adapter::create_value_tc(), ACE_Dynamic_Service< TYPE >::instance(), CORBA::TypeCode_ptr, and CORBA::ValueModifier.

00615 {
00616   TAO_TypeCodeFactory_Adapter *adapter =
00617     ACE_Dynamic_Service<TAO_TypeCodeFactory_Adapter>::instance (
00618         TAO_ORB_Core::typecodefactory_adapter_name ());
00619 
00620   if (adapter == 0)
00621     {
00622       throw ::CORBA::INTERNAL ();
00623     }
00624 
00625   return adapter->create_value_tc (id, name,
00626                                    type_modifier,
00627                                    concrete_base,
00628                                    members);
00629 }

CORBA::TypeCode_ptr CORBA::ORB::create_wstring_tc CORBA::ULong  bound  ) 
 

Definition at line 542 of file ORB.cpp.

References TAO_TypeCodeFactory_Adapter::create_wstring_tc(), and ACE_Dynamic_Service< TYPE >::instance().

00544 {
00545   TAO_TypeCodeFactory_Adapter *adapter =
00546     ACE_Dynamic_Service<TAO_TypeCodeFactory_Adapter>::instance (
00547         TAO_ORB_Core::typecodefactory_adapter_name ());
00548 
00549   if (adapter == 0)
00550     {
00551       throw ::CORBA::INTERNAL ();
00552     }
00553 
00554   return adapter->create_wstring_tc (bound);
00555 }

void CORBA::ORB::destroy void   ) 
 

Explicitly destroy the ORB, releasing any resources. Note that TAO *cannot* implicitly release the resources even if you have destroyed all the references to a particular ORB since CORBA::ORB_init() is required to return the same pointer if called with the same ORBid, only after ORB::destroy() is called it may return a new one.

The results of multi-threaded applications, trying to destroy () the ORB in one thread and trying to service a request in another thread are not well defined. TAO does not support such cases.

Definition at line 157 of file ORB.cpp.

References ACE_DEBUG, ACE_TEXT, ACE_TEXT_CHAR_TO_TCHAR, TAO_ORB_Core::destroy(), LM_DEBUG, orb_core(), and TAO_debug_level.

00158 {
00159   if (this->orb_core () == 0)
00160     {
00161       // If the ORB_Core pointer is zero, assume that the ORB_Core has
00162       // been destroyed.
00163 
00164       // As defined by the CORBA 2.3 specification, throw a
00165       // CORBA::OBJECT_NOT_EXIST exception if the ORB has been
00166       // destroyed by the time an ORB function is called.
00167 
00168       throw ::CORBA::OBJECT_NOT_EXIST (0, CORBA::COMPLETED_NO);
00169     }
00170 
00171   if (TAO_debug_level > 2)
00172     {
00173       ACE_DEBUG ((LM_DEBUG,
00174                   ACE_TEXT ("CORBA::ORB::destroy() called on ORB <%s>.\n"),
00175                   ACE_TEXT_CHAR_TO_TCHAR (this->orb_core ()->orbid ())));
00176     }
00177 
00178   this->orb_core ()->destroy ();
00179 
00180   // Now invalidate the pointer to the ORB_Core that created this
00181   // ORB.
00182   this->orb_core_ = 0;
00183 }

void CORBA::ORB::get_default_context CORBA::Context_ptr ctx  ) 
 

Definition at line 363 of file ORB.cpp.

References CORBA::Context_ptr, and ENOTSUP.

00364 {
00365   throw ::CORBA::NO_IMPLEMENT (
00366                CORBA::SystemException::_tao_minor_code (
00367                  0,
00368                  ENOTSUP),
00369                CORBA::COMPLETED_NO);
00370 }

void CORBA::ORB::get_next_response CORBA::Request_ptr req  ) 
 

Definition at line 393 of file ORB.cpp.

References ENOTSUP, and CORBA::Request_ptr.

00394 {
00395   throw ::CORBA::NO_IMPLEMENT (
00396                CORBA::SystemException::_tao_minor_code (
00397                  0,
00398                  ENOTSUP),
00399                CORBA::COMPLETED_NO);
00400 }

CORBA::Boolean CORBA::ORB::get_service_information CORBA::ServiceType  service_type,
CORBA::ServiceInformation_out  service_information
 

Definition at line 341 of file ORB.cpp.

References ENOTSUP, and CORBA::ServiceType.

00344 {
00345   throw ::CORBA::NO_IMPLEMENT (
00346     CORBA::SystemException::_tao_minor_code (
00347       0,
00348       ENOTSUP),
00349     CORBA::COMPLETED_NO);
00350 }

TAO_BEGIN_VERSIONED_NAMESPACE_DECL ACE_INLINE ACE_Time_Value * CORBA::ORB::get_timeout void   ) 
 

Get the Timeout value.

Definition at line 12 of file ORB.inl.

Referenced by TAO_MCAST_Parser::parse_string().

00013 {
00014   return this->timeout_;
00015 }

char * CORBA::ORB::id void   ) 
 

Return this ORB's ORBid.

Definition at line 1554 of file ORB.cpp.

References CORBA::string_dup().

01555 {
01556   return CORBA::string_dup (this->orb_core_->orbid ());
01557 }

CORBA::Object_ptr CORBA::ORB::ior_string_to_object const char *  ior  )  [private]
 

Convert an OMG IOR into an object reference.

Definition at line 1605 of file ORB.cpp.

References CORBA::Object::_nil(), ACE_OS::ace_isspace(), ACE_OS::ace_isxdigit(), ACE::hex2byte(), ACE_CDR::mb_align(), CORBA::Object_ptr, ACE_Message_Block::rd_ptr(), TAO_DEF_GIOP_MAJOR, TAO_DEF_GIOP_MINOR, and ACE_Message_Block::wr_ptr().

Referenced by string_to_object().

01606 {
01607   // Unhex the bytes, and make a CDR deencapsulation stream from the
01608   // resulting data.
01609   ACE_Message_Block mb (ACE_OS::strlen (str) / 2 + 1
01610                         + ACE_CDR::MAX_ALIGNMENT + 1);
01611 
01612   ACE_CDR::mb_align (&mb);
01613 
01614   char *buffer = mb.rd_ptr ();
01615   const char *tmp = str;
01616   size_t len = 0;
01617 
01618   while (tmp [0] && tmp [1])
01619     {
01620       // Some platforms define 'byte' as a macro, solve the problem
01621       // here.
01622 #undef byte
01623       unsigned char byte;
01624 
01625       if (!(ACE_OS::ace_isxdigit (tmp [0]) && ACE_OS::ace_isxdigit (tmp [1])))
01626         break;
01627 
01628       byte = (u_char) (ACE::hex2byte (tmp [0]) << 4);
01629       byte |= ACE::hex2byte (tmp [1]);
01630 
01631       buffer [len++] = byte;
01632       tmp += 2;
01633     }
01634 
01635     if (tmp [0] && !ACE_OS::ace_isspace (tmp [0]))
01636     {
01637       throw ::CORBA::BAD_PARAM ();
01638     }
01639 
01640   // Create deencapsulation stream ... then unmarshal objref from that
01641   // stream.
01642 
01643   int byte_order = *(mb.rd_ptr ());
01644   mb.rd_ptr (1);
01645   mb.wr_ptr (len);
01646   TAO_InputCDR stream (&mb,
01647                        byte_order,
01648                        TAO_DEF_GIOP_MAJOR,
01649                        TAO_DEF_GIOP_MINOR,
01650                        this->orb_core_);
01651 
01652   CORBA::Object_ptr objref = CORBA::Object::_nil ();
01653   stream >> objref;
01654   return objref;
01655 }

CORBA::ORB::ObjectIdList_ptr CORBA::ORB::list_initial_services void   ) 
 

Returns a sequence of ObjectIds that lists which objects have references available via the initial references mechanism.

Definition at line 1028 of file ORB.cpp.

References check_shutdown(), TAO_ORB_Core::list_initial_references(), and orb_core().

01029 {
01030   this->check_shutdown ();
01031 
01032   return
01033     this->orb_core ()->list_initial_references ();
01034 }

CORBA::ValueFactory CORBA::ORB::lookup_value_factory const char *  repository_id  ) 
 

Definition at line 1749 of file ORB.cpp.

References orb_core(), TAO_ORB_Core::valuetype_adapter(), and TAO_Valuetype_Adapter::vf_map_find().

01750 {
01751   TAO_Valuetype_Adapter *vta = this->orb_core ()->valuetype_adapter ();
01752 
01753   if (vta)
01754     {
01755       return vta->vf_map_find (repository_id);
01756     }
01757 
01758   return 0;
01759 }

char * CORBA::ORB::object_to_string CORBA::Object_ptr  obj  ) 
 

Turn an object reference into a string. Each type of ORB, e.g. an IIOP ORB, must implement this. This can be used by servers to publish their whereabouts to clients. The output of this is typically eventually given to string_to_object() as an argument.

Definition at line 1382 of file ORB.cpp.

References TAO::String_var< charT >::_retn(), CORBA::Object::_stubobj(), ACE_ALLOCATOR_RETURN, ACE_ERROR, ACE_TEXT, TAO_Stub::base_profiles(), ACE_OutputCDR::begin(), CORBA::Object::can_convert_to_ior(), TAO_ORB_Parameters::cdr_memcpy_tradeoff(), check_shutdown(), ACE_Message_Block::cont(), CORBA::Object::convert_to_ior(), TAO_MProfile::get_profile(), ior_prefix, CORBA::is_nil(), ACE_Message_Block::length(), LM_ERROR, ACE_OS::memset(), ACE::nibble2hex(), CORBA::Object_ptr, TAO_ORB_Core::orb_params(), TAO_ORB_Core::output_cdr_dblock_allocator(), TAO_ORB_Core::output_cdr_msgblock_allocator(), TAO_MProfile::profile_count(), ACE_Message_Block::rd_ptr(), ACE_OS::strcpy(), CORBA::String_var, TAO_debug_level, TAO_DEF_GIOP_MAJOR, TAO_DEF_GIOP_MINOR, TAO_ENCAP_BYTE_ORDER, TAO_Profile::to_string(), ACE_OutputCDR::total_length(), use_omg_ior_format_, and ACE_OutputCDR::write_octet().

01383 {
01384   // This method should not be called if the ORB has been shutdown.
01385   this->check_shutdown ();
01386 
01387   if (!CORBA::is_nil (obj))
01388     {
01389       if (!obj->can_convert_to_ior ())
01390         throw ::CORBA::MARSHAL (CORBA::OMGVMCID | 4, CORBA::COMPLETED_NO);
01391 
01392       // Allow a user to provide custom object stringification
01393       char* user_string =
01394         obj->convert_to_ior (this->use_omg_ior_format_, ior_prefix);
01395 
01396       if (user_string != 0)
01397         return user_string;
01398     }
01399 
01400   // Application writer controls what kind of objref strings they get,
01401   // maybe along with other things, by how they initialize the ORB.
01402 
01403   if (use_omg_ior_format_)
01404     {
01405       // By default, orbs use IOR strings; these are ugly (and error
01406       // prone) but specified by CORBA.
01407       //
01408       // XXX there should be a simple way to reuse this code in other
01409       // ORB implementations ...
01410 
01411 #if defined (ACE_INITIALIZE_MEMORY_BEFORE_USE)
01412       char buf [ACE_CDR::DEFAULT_BUFSIZE] = { 0 };
01413 #else
01414       // Avoid the initialization overhead if not compiling with
01415       // support for a memory profiler.  There is no need to actually perform
01416       // initialization otherwise.
01417       char buf [ACE_CDR::DEFAULT_BUFSIZE];
01418 #endif /* ACE_INITIALIZE_MEMORY_BEFORE_USE */
01419 
01420       TAO_OutputCDR cdr (buf,  sizeof buf,
01421                          TAO_ENCAP_BYTE_ORDER,
01422                          this->orb_core_->output_cdr_buffer_allocator (),
01423                          this->orb_core_->output_cdr_dblock_allocator (),
01424                          this->orb_core_->output_cdr_msgblock_allocator (),
01425                          this->orb_core_->orb_params ()->cdr_memcpy_tradeoff (),
01426                          TAO_DEF_GIOP_MAJOR,
01427                          TAO_DEF_GIOP_MINOR);
01428 
01429       // There is no translator currently available for stringifying an object
01430       // reference, since there is no transport with which to choose an NCS/TCS
01431       // pair.
01432 
01433       // support limited oref ACE_OS::strcmp.
01434       (void) ACE_OS::memset (buf, 0, sizeof (buf));
01435 
01436       // Marshal the objref into an encapsulation bytestream.
01437       (void) cdr.write_octet (TAO_ENCAP_BYTE_ORDER);
01438       if (!(cdr << obj))
01439         throw ::CORBA::MARSHAL ();
01440 
01441       // Now hexify the encapsulated CDR data into a string, and
01442       // return that string.
01443 
01444       size_t const total_len = cdr.total_length ();
01445 
01446       char *cp = 0;
01447       ACE_ALLOCATOR_RETURN (cp,
01448                             CORBA::string_alloc (
01449                               sizeof ior_prefix
01450                               + 2
01451                               * static_cast<CORBA::ULong> (total_len)),
01452                             0);
01453 
01454       CORBA::String_var string = cp;
01455 
01456       ACE_OS::strcpy (cp, ior_prefix);
01457       cp += sizeof (ior_prefix) - 1;
01458 
01459       for (const ACE_Message_Block *i = cdr.begin (); i != 0; i = i->cont ())
01460         {
01461           const char *bytes = i->rd_ptr ();
01462           size_t len = i->length ();
01463 
01464           while (len--)
01465             {
01466               *cp++ = static_cast<char> (ACE::nibble2hex ((*bytes) >> 4));
01467               *cp++ = static_cast<char> (ACE::nibble2hex (*bytes));
01468               ++bytes;
01469             }
01470         }
01471       // Null terminate the string..
01472       *cp = 0;
01473 
01474       return string._retn ();
01475     }
01476   else
01477     {
01478       // It is perfectly valid to marshal a nil object reference.
01479       // However, it is not possible to convert a nil object reference
01480       // to a URL IOR, so throw an exception.
01481       if (CORBA::is_nil (obj) || obj->_stubobj () == 0)
01482         {
01483           if (TAO_debug_level > 0)
01484             ACE_ERROR ((LM_ERROR,
01485                         ACE_TEXT ("Nil object reference or TAO_Stub ")
01486                         ACE_TEXT ("pointer is zero when converting\n")
01487                         ACE_TEXT ("object reference to URL IOR.\n")));
01488 
01489           throw ::CORBA::MARSHAL (
01490             CORBA::SystemException::_tao_minor_code (
01491               0,
01492               EINVAL),
01493             CORBA::COMPLETED_NO);
01494         }
01495 
01496       TAO_MProfile &mp = obj->_stubobj ()->base_profiles ();
01497 
01498       if (mp.profile_count () == 0)
01499         {
01500           if (TAO_debug_level > 0)
01501             ACE_ERROR ((LM_ERROR,
01502                         ACE_TEXT ("(%P|%t) Cannot stringify given ")
01503                         ACE_TEXT ("object.  No profiles.\n")));
01504 
01505 
01506           throw ::CORBA::MARSHAL (
01507             CORBA::SystemException::_tao_minor_code (
01508               0,
01509               EINVAL),
01510             CORBA::COMPLETED_NO);
01511         }
01512 
01513       // For now we just use the first profile.
01514       TAO_Profile *profile = mp.get_profile (0);
01515 
01516       return profile->to_string ();
01517     }
01518 }

ORB& CORBA::ORB::operator= const ORB  )  [private]
 

ACE_INLINE TAO_ORB_Core * CORBA::ORB::orb_core void   )  const
 

Get the ORB core.

Definition at line 75 of file ORB.inl.

Referenced by check_shutdown(), destroy(), list_initial_services(), lookup_value_factory(), TAO_CORBALOC_Parser::make_stub_from_mprofile(), TAO_MCAST_Parser::multicast_query(), TAO_DLL_Parser::parse_string(), TAO_CORBALOC_Parser::parse_string(), perform_work(), register_value_factory(), resolve_initial_references(), run(), shutdown(), and unregister_value_factory().

00076 {
00077   return this->orb_core_;
00078 }

void CORBA::ORB::perform_work ACE_Time_Value tv  ) 
 

Definition at line 218 of file ORB.cpp.

References check_shutdown(), orb_core(), and TAO_ORB_Core::run().

00219 {
00220   // This method should not be called if the ORB has been shutdown.
00221   this->check_shutdown ();
00222 
00223   this->orb_core ()->run (tv, 1);
00224 }

void CORBA::ORB::perform_work ACE_Time_Value tv  ) 
 

Definition at line 212 of file ORB.cpp.

References perform_work().

00213 {
00214   this->perform_work (&tv);
00215 }

void CORBA::ORB::perform_work void   ) 
 

This operation performs an implementation-defined unit of work. Note that the default behavior is to block if the unit of work is not present; this behavior can be modified by passing an appropriate ACE_Time_Value as described in run().

Definition at line 206 of file ORB.cpp.

Referenced by perform_work().

00207 {
00208   this->perform_work (0);
00209 }

CORBA::Boolean CORBA::ORB::poll_next_response void   ) 
 

Definition at line 403 of file ORB.cpp.

References ENOTSUP.

00404 {
00405   throw ::CORBA::NO_IMPLEMENT (
00406     CORBA::SystemException::_tao_minor_code (
00407       0,
00408       ENOTSUP),
00409     CORBA::COMPLETED_NO);
00410 }

void CORBA::ORB::register_initial_reference const char *  id,
CORBA::Object_ptr  obj
 

Register an object reference with the ORB.

Definition at line 1012 of file ORB.cpp.

References CORBA::is_nil(), CORBA::Object_ptr, TAO_ORB_Core::object_ref_table(), TAO_Object_Ref_Table::register_initial_reference(), and ACE_OS::strlen().

01013 {
01014   if (id == 0 || ACE_OS::strlen (id) == 0)
01015     throw ::CORBA::ORB::InvalidName ();
01016 
01017   if (CORBA::is_nil (obj))
01018     throw ::CORBA::BAD_PARAM (CORBA::OMGVMCID | 27, CORBA::COMPLETED_NO);
01019 
01020   TAO_Object_Ref_Table &table = this->orb_core_->object_ref_table ();
01021 
01022   if (table.register_initial_reference (id, obj) == -1)
01023     throw ::CORBA::ORB::InvalidName ();
01024 }

CORBA::ValueFactory CORBA::ORB::register_value_factory const char *  repository_id,
CORBA::ValueFactory  factory
 

Definition at line 1708 of file ORB.cpp.

References orb_core(), CORBA::ValueFactory, TAO_ORB_Core::valuetype_adapter(), and TAO_Valuetype_Adapter::vf_map_rebind().

01710 {
01711   TAO_Valuetype_Adapter *vta = this->orb_core ()->valuetype_adapter ();
01712 
01713   if (vta)
01714     {
01715       int const result = vta->vf_map_rebind (repository_id, factory);
01716 
01717       if (result == 0) // No previous factory found
01718         {
01719           return 0;
01720         }
01721 
01722       if (result == -1)
01723         {
01724           // Error on bind.
01725           throw ::CORBA::MARSHAL ();
01726         }
01727     }
01728 
01729   return factory;    // previous factory was found
01730 }

CORBA::Object_ptr CORBA::ORB::resolve_initial_references const char *  name,
ACE_Time_Value timeout = 0
 

This method acts as a mini-bootstrapping Naming Service, which is provided by the ORB for certain well-known object references. TAO supports the "NameService", "TradingService", "RootPOA", "ImplRepo", and "POACurrent" via this method. The timeout value bounds the amount of time the ORB blocks waiting to resolve the service. This is most useful for bootstrapping remote services, such as the "NameService" or "TradingService", that are commonly resolved via multicast. By default, the value is 0, which means "use the TAO_DEFAULT_SERVICE_RESOLUTION_TIMEOUT timeout period".

Note:
By using a default value for the timeout parameter, TAO will remains compliant with the CORBA resolve_initial_references() specification.

Definition at line 872 of file ORB.cpp.

References TAO_Pseudo_Var_T< T >::_retn(), ACE_CString, check_shutdown(), ACE_OS::getenv(), TAO::String_var< charT >::in(), TAO_Pseudo_Var_T< T >::in(), TAO_ORB_Core::init_ref_map(), TAO::String_var< charT >::inout(), CORBA::is_nil(), TAO_ORB_Core::object_ref_table(), CORBA::Object_var, orb_core(), TAO_ORB_Core::resolve_codecfactory(), TAO_ORB_Core::resolve_compression_manager(), TAO_ORB_Core::resolve_dynanyfactory(), TAO_Object_Ref_Table::resolve_initial_reference(), TAO_ORB_Core::resolve_ior_manipulation(), TAO_ORB_Core::resolve_ior_table(), TAO_ORB_Core::resolve_picurrent(), TAO_ORB_Core::resolve_poa_current(), resolve_policy_current(), resolve_policy_manager(), TAO_ORB_Core::resolve_rir(), resolve_service(), TAO_ORB_Core::resolve_typecodefactory(), TAO_ORB_Core::root_poa(), set_timeout(), ACE_OS::strcat(), ACE_OS::strcmp(), ACE_OS::strcpy(), CORBA::string_alloc(), string_to_object(), CORBA::String_var, TAO_OBJID_CODECFACTORY, TAO_OBJID_COMPRESSIONMANAGER, TAO_OBJID_DYNANYFACTORY, TAO_OBJID_IMPLREPOSERVICE, TAO_OBJID_INTERFACEREP, TAO_OBJID_IORMANIPULATION, TAO_OBJID_IORTABLE, TAO_OBJID_NAMESERVICE, TAO_OBJID_PICurrent, TAO_OBJID_POACURRENT, TAO_OBJID_POLICYCURRENT, TAO_OBJID_POLICYMANAGER, TAO_OBJID_ROOTPOA, TAO_OBJID_TRADINGSERVICE, and TAO_OBJID_TYPECODEFACTORY.

Referenced by TAO_ORB_Core::implrepo_service(), and TAO_CORBALOC_Parser::parse_string_rir_helper().

00874 {
00875   // This method should not be called if the ORB has been shutdown.
00876   this->check_shutdown ();
00877 
00878   CORBA::Object_var result;
00879 
00880   if (ACE_OS::strcmp (name, TAO_OBJID_ROOTPOA) == 0)
00881     {
00882       result = this->orb_core ()->root_poa ();
00883     }
00884   else if (ACE_OS::strcmp (name, TAO_OBJID_POACURRENT) == 0)
00885     {
00886       result = this->orb_core ()->resolve_poa_current ();
00887     }
00888   else if (ACE_OS::strcmp (name, TAO_OBJID_POLICYMANAGER) == 0)
00889     {
00890       result = this->resolve_policy_manager ();
00891     }
00892   else if (ACE_OS::strcmp (name, TAO_OBJID_POLICYCURRENT) == 0)
00893     {
00894       result = this->resolve_policy_current ();
00895     }
00896   else if (ACE_OS::strcmp (name, TAO_OBJID_IORMANIPULATION) == 0)
00897     {
00898       result = this->orb_core ()->resolve_ior_manipulation ();
00899     }
00900   else if (ACE_OS::strcmp (name, TAO_OBJID_IORTABLE) == 0)
00901     {
00902       result = this->orb_core ()->resolve_ior_table ();
00903     }
00904   else if (ACE_OS::strcmp (name, TAO_OBJID_DYNANYFACTORY) == 0)
00905     {
00906       result = this->orb_core ()->resolve_dynanyfactory ();
00907     }
00908   else if (ACE_OS::strcmp (name, TAO_OBJID_TYPECODEFACTORY) == 0)
00909     {
00910       result = this->orb_core ()->resolve_typecodefactory ();
00911     }
00912   else if (ACE_OS::strcmp (name, TAO_OBJID_CODECFACTORY) == 0)
00913     {
00914       result = this->orb_core ()->resolve_codecfactory ();
00915     }
00916   else if (ACE_OS::strcmp (name, TAO_OBJID_COMPRESSIONMANAGER) == 0)
00917     {
00918       result = this->orb_core ()->resolve_compression_manager ();
00919     }
00920 #if TAO_HAS_INTERCEPTORS == 1
00921   else if (ACE_OS::strcmp (name, TAO_OBJID_PICurrent) == 0)
00922     {
00923       result = this->orb_core ()->resolve_picurrent ();
00924     }
00925 #endif
00926 
00927   // -----------------------------------------------------------------
00928 
00929   if (CORBA::is_nil (result.in ()))
00930     {
00931       // Search the object reference table.  This search must occur before
00932       // the InitRef table search, since it may contain local objects.
00933       result =
00934         this->orb_core ()->object_ref_table ().resolve_initial_reference (
00935           name);
00936     }
00937 
00938   if (!CORBA::is_nil (result.in ()))
00939     return result._retn ();
00940 
00941   // -----------------------------------------------------------------
00942 
00943   // Check ORBInitRef options.
00944 
00945   // @@ There appears to be long standing (i.e. back when the map was
00946   //    an ACE_Hash_Map_Manager) race condition here since the map
00947   //    access is not synchronized.
00948 
00949   // Is the service name in the IOR Table.
00950   TAO_ORB_Core::InitRefMap::iterator ior =
00951     this->orb_core_->init_ref_map ()->find (ACE_CString (name));
00952 
00953   if (ior != this->orb_core_->init_ref_map ()->end ())
00954     return this->string_to_object ((*ior).second.c_str ());
00955 
00956   // Look for an environment variable called "<name>IOR".
00957   //
00958   CORBA::String_var ior_env_var_name =
00959     CORBA::string_alloc (static_cast<CORBA::ULong> (ACE_OS::strlen (name) + 3));
00960 
00961   ACE_OS::strcpy (ior_env_var_name.inout (), name);
00962 
00963   ACE_OS::strcat (ior_env_var_name.inout (), "IOR");
00964 
00965   ACE_CString service_ior = ACE_OS::getenv (ior_env_var_name.in ());
00966 
00967   if (ACE_OS::strcmp (service_ior.c_str (), "") != 0)
00968     {
00969       result = this->string_to_object (service_ior.c_str());
00970 
00971       return result._retn ();
00972     }
00973 
00974   // May be trying the explicitly specified services and the well
00975   // known services should be tried first before falling on to default
00976   // services.
00977 
00978   // Set the timeout value.
00979   this->set_timeout (timeout);
00980 
00981   if (ACE_OS::strcmp (name, TAO_OBJID_NAMESERVICE) == 0)
00982     {
00983       this->resolve_service (TAO::MCAST_NAMESERVICE);
00984     }
00985   else if (ACE_OS::strcmp (name, TAO_OBJID_TRADINGSERVICE) == 0)
00986     {
00987       this->resolve_service (TAO::MCAST_TRADINGSERVICE);
00988     }
00989   else if (ACE_OS::strcmp (name, TAO_OBJID_IMPLREPOSERVICE) == 0)
00990     {
00991       this->resolve_service (TAO::MCAST_IMPLREPOSERVICE);
00992     }
00993   else if (ACE_OS::strcmp (name, TAO_OBJID_INTERFACEREP) == 0)
00994     {
00995       this->resolve_service (TAO::MCAST_INTERFACEREPOSERVICE);
00996     }
00997 
00998   // Is not one of the well known services, try to find it in the
00999   // InitRef table....check the defaultinitref values also.
01000 
01001   result = this->orb_core ()->resolve_rir (name);
01002 
01003   if (!CORBA::is_nil (result.in ()))
01004     return result._retn ();
01005   // -----------------------------------------------------------------
01006 
01007   throw ::CORBA::ORB::InvalidName ();
01008 }

CORBA::Object_ptr CORBA::ORB::resolve_policy_current void   )  [protected]
 

Resolve the Policy Current for this thread.

Definition at line 789 of file ORB.cpp.

References CORBA::Object::_duplicate(), CORBA::Object::_nil(), and TAO_ORB_Core::policy_current().

Referenced by resolve_initial_references().

00790 {
00791 #if (TAO_HAS_CORBA_MESSAGING == 1)
00792 
00793   TAO_Policy_Current &policy_current = this->orb_core_->policy_current ();
00794   return CORBA::Object::_duplicate (&policy_current);
00795 
00796 #else
00797 
00798   return CORBA::Object::_nil ();
00799 
00800 #endif /* TAO_HAS_CORBA_MESSAGING == 1 */
00801 }

CORBA::Object_ptr CORBA::ORB::resolve_policy_manager void   )  [protected]
 

Resolve the Policy Manager for this ORB.

Definition at line 768 of file ORB.cpp.

References CORBA::Object::_duplicate(), CORBA::Object::_nil(), and TAO_ORB_Core::policy_manager().

Referenced by resolve_initial_references().

00769 {
00770 #if (TAO_HAS_CORBA_MESSAGING == 1)
00771 
00772   TAO_Policy_Manager *policy_manager = this->orb_core_->policy_manager ();
00773 
00774   if (policy_manager == 0)
00775     {
00776       return CORBA::Object::_nil ();
00777     }
00778 
00779   return CORBA::Object::_duplicate (policy_manager);
00780 
00781 #else
00782 
00783   return CORBA::Object::_nil ();
00784 
00785 #endif /* TAO_HAS_CORBA_MESSAGING == 1 */
00786 }

void CORBA::ORB::resolve_service TAO::MCAST_SERVICEID  service_id  )  [private]
 

Resolve the given service based on the service ID.

"@c resolve_service" is a legacy name. This method now simply sets up a default initial reference that will be subsequently used in resolve_initial_references().

Definition at line 804 of file ORB.cpp.

References ACE_OS::atoi(), TAO_ORB_Parameters::default_init_ref(), ACE_OS::getenv(), TAO::String_var< charT >::in(), TAO_ORB_Core::orb_params(), TAO_ORB_Parameters::service_port(), ACE_OS::snprintf(), CORBA::String_var, ACE_OS::strncmp(), TAO_DEFAULT_IMPLREPO_SERVER_REQUEST_PORT, TAO_DEFAULT_INTERFACEREPO_SERVER_REQUEST_PORT, TAO_DEFAULT_NAME_SERVER_REQUEST_PORT, and TAO_DEFAULT_TRADING_SERVER_REQUEST_PORT.

Referenced by resolve_initial_references().

00805 {
00806 #if defined ACE_HAS_IP_MULTICAST
00807   static char const * const env_service_port[] =
00808   {
00809     "NameServicePort",
00810     "TradingServicePort",
00811     "ImplRepoServicePort",
00812     "InterfaceRepoServicePort"
00813   };
00814 
00815   static unsigned short const default_service_port[] =
00816   {
00817     TAO_DEFAULT_NAME_SERVER_REQUEST_PORT,
00818     TAO_DEFAULT_TRADING_SERVER_REQUEST_PORT,
00819     TAO_DEFAULT_IMPLREPO_SERVER_REQUEST_PORT,
00820     TAO_DEFAULT_INTERFACEREPO_SERVER_REQUEST_PORT
00821   };
00822 
00823   // By now, the table filled in with -ORBInitRef arguments has been
00824   // checked.  We only get here if the table didn't contain an initial
00825   // reference for the requested Service.
00826 
00827   CORBA::String_var default_init_ref =
00828         this->orb_core_->orb_params ()->default_init_ref ();
00829 
00830   static char const mcast_prefix[] = "mcast://:::";
00831 
00832   if ((ACE_OS::strncmp (default_init_ref.in (),
00833                         mcast_prefix,
00834                         sizeof (mcast_prefix) - 1) == 0))
00835     {
00836       // First, determine if the port was supplied on the command line
00837       unsigned short port =
00838         this->orb_core_->orb_params ()->service_port (mcast_service_id);
00839 
00840       if (port == 0)
00841         {
00842           // Look for the port among our environment variables.
00843           char const * const port_number =
00844             ACE_OS::getenv (env_service_port[mcast_service_id]);
00845 
00846           if (port_number != 0)
00847             port = static_cast<unsigned short> (ACE_OS::atoi (port_number));
00848           else
00849             port = default_service_port[mcast_service_id];
00850         }
00851 
00852       // Set the port value in ORB_Params: modify the default mcast
00853       // value.
00854       static char const mcast_fmt[] = "mcast://:%d::";
00855       static size_t const PORT_BUF_SIZE = 256;
00856 
00857       char def_init_ref[PORT_BUF_SIZE] = { 0 };
00858 
00859       ACE_OS::snprintf (def_init_ref,
00860                         PORT_BUF_SIZE,
00861                         mcast_fmt,
00862                         port);
00863 
00864       this->orb_core_->orb_params ()->default_init_ref (def_init_ref);
00865     }
00866 #else
00867   ACE_UNUSED_ARG (mcast_service_id);
00868 #endif /* ACE_HAS_IP_MULTICAST */
00869 }

void CORBA::ORB::run ACE_Time_Value tv  ) 
 

Instructs the ORB to initialize itself and run its event loop in the current thread, not returning until the ORB has shut down or the time value specified through tv has expired. If an error occurs during initialization or at runtime, a CORBA system exception will be thrown. tv is reduced by the amount of time spent in this call. If tv is 0, it means that the timeout is infinite. If tv is ACE_Time_Value::zero, it specifies to poll and does not block.

If this function is called with tv value, client threads making invocations will continue their operations. When the operation timesout and returns, any invocations showing up on the server will be buffered by TCP.

Definition at line 198 of file ORB.cpp.

References check_shutdown(), orb_core(), and TAO_ORB_Core::run().

00199 {
00200   this->check_shutdown ();
00201 
00202   this->orb_core ()->run (tv, 0);
00203 }

void CORBA::ORB::run ACE_Time_Value tv  ) 
 

Instructs the ORB to initialize itself and run its event loop in the current thread, not returning until the ORB has shut down or the time value specified through tv has expired. If an error occurs during initialization or at runtime, a CORBA system exception will be thrown. tv is reduced by the amount of time spent in this call.

If this function is called with a @ tv value, client threads making invocations will continue their operations. When the operation timesout and returns, any invocations showing up on the server will be buffered by TCP.

Definition at line 192 of file ORB.cpp.

References run().

00193 {
00194   this->run (&tv);
00195 }

void CORBA::ORB::run void   ) 
 

Instructs the ORB to initialize itself and run its event loop in the current thread, not returning until the ORB has shut down. If an error occurs during initialization or at runtime, a CORBA system exception will be thrown.

Definition at line 186 of file ORB.cpp.

Referenced by run().

00187 {
00188   this->run (0);
00189 }

void CORBA::ORB::send_multiple_requests_deferred const CORBA::RequestSeq req  ) 
 

Definition at line 383 of file ORB.cpp.

References ENOTSUP, and CORBA::RequestSeq.

00384 {
00385   throw ::CORBA::NO_IMPLEMENT (
00386                CORBA::SystemException::_tao_minor_code (
00387                  0,
00388                  ENOTSUP),
00389                CORBA::COMPLETED_NO);
00390 }

void CORBA::ORB::send_multiple_requests_oneway const CORBA::RequestSeq req  ) 
 

Definition at line 373 of file ORB.cpp.

References ENOTSUP, and CORBA::RequestSeq.

00374 {
00375   throw ::CORBA::NO_IMPLEMENT (
00376                CORBA::SystemException::_tao_minor_code (
00377                  0,
00378                  ENOTSUP),
00379                CORBA::COMPLETED_NO);
00380 }

ACE_INLINE void CORBA::ORB::set_timeout ACE_Time_Value timeout  )  [private]
 

Set the timeout value.

Definition at line 18 of file ORB.inl.

Referenced by resolve_initial_references().

00019 {
00020   this->timeout_ = timeout;
00021 }

void CORBA::ORB::shutdown CORBA::Boolean  wait_for_completion = false  ) 
 

This operation instructs the ORB to shut down. Shutting down the ORB causes all Object Adapters to be shut down. If wait_for_completion parameter is TRUE, this operation blocks until all ORB processing (including request processing and object deactivation or other operations associated with object adapters) has completed.

Definition at line 146 of file ORB.cpp.

References check_shutdown(), orb_core(), and TAO_ORB_Core::shutdown().

00147 {
00148   // We cannot lock the exceptions here. We need to propogate
00149   // BAD_INV_ORDER  exceptions if needed to the caller. Locking
00150   // exceptions down would render us non-compliant with the spec.
00151   this->check_shutdown ();
00152 
00153   this->orb_core ()->shutdown (wait_for_completion);
00154 }

CORBA::Object_ptr CORBA::ORB::string_to_object const char *  str  ) 
 

Turn a string-ified object reference back into an object pointer. Typically these strings are created using object_to_string(), but not necessarily locally.

Definition at line 1524 of file ORB.cpp.

References check_shutdown(), ior_prefix, ior_string_to_object(), TAO_Parser_Registry::match_parser(), TAO_IOR_Parser::parse_string(), TAO_ORB_Core::parser_registry(), ACE_OS::strncmp(), and url_ior_string_to_object().

Referenced by TAO_MCAST_Parser::multicast_to_service(), TAO_HTTP_Parser::parse_string(), TAO_FILE_Parser::parse_string(), TAO_CORBANAME_Parser::parse_string(), resolve_initial_references(), and TAO_ORB_Core::resolve_rir().

01525 {
01526   // This method should not be called if the ORB has been shutdown.
01527   this->check_shutdown ();
01528 
01529   // Check for NULL pointer
01530   if (str == 0)
01531     throw ::CORBA::INV_OBJREF (
01532       CORBA::SystemException::_tao_minor_code (
01533         0,
01534         EINVAL),
01535       CORBA::COMPLETED_NO);
01536 
01537   TAO_IOR_Parser *ior_parser =
01538     this->orb_core_->parser_registry ()->match_parser (str);
01539 
01540   if (ior_parser != 0)
01541     {
01542       return ior_parser->parse_string (str, this);
01543     }
01544 
01545   if (ACE_OS::strncmp (str, ior_prefix, sizeof ior_prefix - 1) == 0)
01546     return this->ior_string_to_object (str + sizeof ior_prefix - 1);
01547   else
01548     return this->url_ior_string_to_object (str);
01549 }

void CORBA::ORB::unregister_value_factory const char *  repository_id  ) 
 

Definition at line 1735 of file ORB.cpp.

References orb_core(), TAO_ORB_Core::valuetype_adapter(), and TAO_Valuetype_Adapter::vf_map_unbind().

01736 {
01737   TAO_Valuetype_Adapter *vta = this->orb_core ()->valuetype_adapter ();
01738 
01739   if (vta)
01740     {
01741       // Dont care whther it was successful or not!
01742       (void) vta->vf_map_unbind (repository_id);
01743     }
01744 }

CORBA::Object_ptr CORBA::ORB::url_ior_string_to_object const char *  ior  )  [private]
 

Convert an URL style IOR into an object reference.

Definition at line 1662 of file ORB.cpp.

References CORBA::Object::_nil(), TAO_ORB_Core::connector_registry(), TAO_ORB_Core::create_object(), TAO_ORB_Core::create_stub(), TAO_Stub_Auto_Ptr::get(), CORBA::is_nil(), TAO_Connector_Registry::make_mprofile(), CORBA::Object_ptr, and TAO_Stub_Auto_Ptr::release().

Referenced by string_to_object().

01663 {
01664   TAO_MProfile mprofile;
01665   // It is safe to declare this on the stack since the contents of
01666   // mprofile get copied.  No memory is allocated for profile storage
01667   // here.  The Connector Registry will determine the exact number
01668   // of profiles and tell the MProfile object to allocate enough memory
01669   // to hold them all.
01670 
01671   TAO_Connector_Registry *conn_reg = this->orb_core_->connector_registry ();
01672 
01673   int const retv = conn_reg->make_mprofile (str, mprofile);
01674   // Return nil.
01675 
01676   if (retv != 0)
01677     {
01678       throw ::CORBA::INV_OBJREF (
01679         CORBA::SystemException::_tao_minor_code (
01680           0,
01681           EINVAL),
01682         CORBA::COMPLETED_NO);
01683     }
01684 
01685   // Now make the TAO_Stub.
01686   TAO_Stub *data = this->orb_core_->create_stub ((char *) 0, mprofile);
01687 
01688   TAO_Stub_Auto_Ptr safe_objdata (data);
01689 
01690   // Figure out if the servant is collocated.
01691   CORBA::Object_ptr obj = this->orb_core_->create_object (safe_objdata.get ());
01692 
01693   if (CORBA::is_nil (obj))
01694     return CORBA::Object::_nil ();
01695 
01696   // Transfer ownership to the CORBA::Object
01697   (void) safe_objdata.release ();
01698 
01699   return obj;
01700 }

CORBA::Boolean CORBA::ORB::work_pending ACE_Time_Value tv  ) 
 

Note:
This is useful for implementing an event loop with an idle timeout.

Definition at line 227 of file ORB.cpp.

References check_shutdown(), ETIME, TAO_ORB_Core::reactor(), and ACE_Reactor::work_pending().

00228 {
00229   // This method should not be called if the ORB has been shutdown.
00230   this->check_shutdown ();
00231 
00232   int const result = this->orb_core_->reactor ()->work_pending (tv);
00233   if (result == 0 || (result == -1 && errno == ETIME))
00234     return 0;
00235 
00236   if (result == -1)
00237     throw ::CORBA::INTERNAL ();
00238 
00239   return 1;
00240 }

CORBA::Boolean CORBA::ORB::work_pending void   ) 
 

Returns an indication of whether the ORB needs to perform some work.

Definition at line 243 of file ORB.cpp.

References check_shutdown(), TAO_ORB_Core::reactor(), and ACE_Reactor::work_pending().

00244 {
00245   // This method should not be called if the ORB has been shutdown.
00246   this->check_shutdown ();
00247 
00248   const int result = this->orb_core_->reactor ()->work_pending ();
00249   if (result == 0)
00250     return 0;
00251 
00252   if (result == -1)
00253     throw ::CORBA::INTERNAL ();
00254 
00255   return 1;
00256 }


Member Data Documentation

CORBA::TypeCode_ptr const CORBA::ORB::_tc_ObjectId [static]
 

Definition at line 190 of file ORB.h.

CORBA::TypeCode_ptr const CORBA::ORB::_tc_ObjectIdList [static]
 

Definition at line 196 of file ORB.h.

TAO_ORB_Core* CORBA::ORB::orb_core_ [private]
 

The ORB_Core that created us....

Definition at line 567 of file ORB.h.

ACE_Atomic_Op<TAO_SYNCH_MUTEX, unsigned long> CORBA::ORB::refcount_ [private]
 

Maintains a reference count of number of instantiations of the ORB.

Definition at line 564 of file ORB.h.

ACE_Time_Value* CORBA::ORB::timeout_ [private]
 

Timeout value.

Definition at line 577 of file ORB.h.

CORBA::Boolean CORBA::ORB::use_omg_ior_format_ [private]
 

Decides whether to use the URL notation or to use IOR notation.

Definition at line 570 of file ORB.h.

Referenced by _use_omg_ior_format(), object_to_string(), and ORB().


The documentation for this interface was generated from the following files:
Generated on Sun Jan 27 13:17:13 2008 for TAO by doxygen 1.3.6