Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

CORBA_ORB Class Reference

ORB pseudo-objref. More...

#include <ORB.h>

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 CORBA_ORB_RequestSeq RequestSeq
typedef CORBA_ORB_RequestSeq_var RequestSeq_var
typedef CORBA_ORB_RequestSeq_out RequestSeq_out
typedef CORBA_ORB_ptr _ptr_type
typedef CORBA_ORB_var _var_type

Public Methods

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

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

CORBA::TypeCode_ptr create_union_tc (const char *id, const char *name, CORBA::TypeCode_ptr discriminator_type, const CORBA::UnionMemberSeq &members ACE_ENV_ARG_DECL_WITH_DEFAULTS) throw (CORBA::SystemException)
CORBA::TypeCode_ptr create_enum_tc (const char *id, const char *name, const CORBA::EnumMemberSeq &members ACE_ENV_ARG_DECL_WITH_DEFAULTS) throw (CORBA::SystemException)
CORBA::TypeCode_ptr create_alias_tc (const char *id, const char *name, CORBA::TypeCode_ptr original_type ACE_ENV_ARG_DECL_WITH_DEFAULTS) throw (CORBA::SystemException)
CORBA::TypeCode_ptr create_exception_tc (const char *id, const char *name, const CORBA::StructMemberSeq &members ACE_ENV_ARG_DECL_WITH_DEFAULTS) throw (CORBA::SystemException)
CORBA::TypeCode_ptr create_interface_tc (const char *id, const char *name ACE_ENV_ARG_DECL_WITH_DEFAULTS) throw (CORBA::SystemException)
CORBA::TypeCode_ptr create_string_tc (CORBA::ULong bound ACE_ENV_ARG_DECL_WITH_DEFAULTS) throw (CORBA::SystemException)
CORBA::TypeCode_ptr create_wstring_tc (CORBA::ULong bound ACE_ENV_ARG_DECL_WITH_DEFAULTS) throw (CORBA::SystemException)
CORBA::TypeCode_ptr create_fixed_tc (CORBA::UShort digits, CORBA::UShort scale ACE_ENV_ARG_DECL_WITH_DEFAULTS) throw (CORBA::SystemException)
CORBA::TypeCode_ptr create_sequence_tc (CORBA::ULong bound, CORBA::TypeCode_ptr element_type ACE_ENV_ARG_DECL_WITH_DEFAULTS) throw (CORBA::SystemException)
CORBA::TypeCode_ptr create_array_tc (CORBA::ULong length, CORBA::TypeCode_ptr element_type ACE_ENV_ARG_DECL_WITH_DEFAULTS) throw (CORBA::SystemException)
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 ACE_ENV_ARG_DECL_WITH_DEFAULTS) throw (CORBA::SystemException)
CORBA::TypeCode_ptr create_value_box_tc (const char *id, const char *name, CORBA::TypeCode_ptr boxed_type ACE_ENV_ARG_DECL_WITH_DEFAULTS) throw (CORBA::SystemException)
CORBA::TypeCode_ptr create_native_tc (const char *id, const char *name ACE_ENV_ARG_DECL_WITH_DEFAULTS) throw (CORBA::SystemException)
CORBA::TypeCode_ptr create_recursive_tc (const char *id ACE_ENV_ARG_DECL_WITH_DEFAULTS) throw (CORBA::SystemException)
CORBA::TypeCode_ptr create_abstract_interface_tc (const char *id, const char *name ACE_ENV_ARG_DECL_WITH_DEFAULTS) throw (CORBA::SystemException)
CORBA::TypeCode_ptr create_local_interface_tc (const char *id, const char *ame ACE_ENV_ARG_DECL_WITH_DEFAULTS) throw (CORBA::SystemException)
void run (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
void run (ACE_Time_Value &tv ACE_ENV_ARG_DECL_WITH_DEFAULTS)
void run (ACE_Time_Value *tv ACE_ENV_ARG_DECL_WITH_DEFAULTS)
CORBA::Boolean work_pending (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
 Returns an indication of whether the ORB needs to perform some work. More...

CORBA::Boolean work_pending (ACE_Time_Value &tv ACE_ENV_ARG_DECL_WITH_DEFAULTS)
 Returns an indication of whether the ORB needs to perform some work but will look for work pending for no more than the specified time. This is useful for implementing an event loop with an idle timeout. More...

void perform_work (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
void perform_work (ACE_Time_Value &ACE_ENV_ARG_DECL_WITH_DEFAULTS)
void perform_work (ACE_Time_Value *ACE_ENV_ARG_DECL_WITH_DEFAULTS)
void shutdown (CORBA::Boolean wait_for_completion=0 ACE_ENV_ARG_DECL_WITH_DEFAULTS)
void destroy (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
CORBA_Object_ptr resolve_initial_references (const char *name ACE_ENV_ARG_DECL_WITH_DEFAULTS)
CORBA_Object_ptr resolve_initial_references (const char *name, ACE_Time_Value *timeout ACE_ENV_ARG_DECL_WITH_DEFAULTS)
void register_initial_reference (const char *id, CORBA::Object_ptr obj ACE_ENV_ARG_DECL_WITH_DEFAULTS)
 Register an object reference with the ORB. More...

CORBA_ORB_ObjectIdList_ptr list_initial_services (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
 Returns a sequence of ObjectIds that lists which objects have references available via the initial references mechanism. More...

CORBA::Policy_ptr create_policy (CORBA::PolicyType type, const CORBA::Any &val ACE_ENV_ARG_DECL_WITH_DEFAULTS) throw (CORBA::SystemException, CORBA::PolicyError)
CORBA::Policy_ptr _create_policy (CORBA::PolicyType type ACE_ENV_ARG_DECL) throw (CORBA::SystemException, CORBA::PolicyError)
 Create an empty policy, usually to be filled in later by demarshaling. More...

CORBA_Object_ptr resolve_root_poa (ACE_ENV_SINGLE_ARG_DECL)
 Resolve the POA. More...

CORBA::ULong _incr_refcnt (void)
CORBA::ULong _decr_refcnt (void)
void _use_omg_ior_format (CORBA::Boolean ior)
 Set the IOR flag. Get the IOR flag. More...

CORBA::Boolean _use_omg_ior_format (void)
void _optimize_collocation_objects (CORBA::Boolean opt)
 Set collocation optimization status. Get collocation optimization status. More...

CORBA::Boolean _optimize_collocation_objects (void) const
TAO_ORB_Coreorb_core (void) const
 Get the ORB core. More...

const ACE_CString_tao_ft_client_id (void)
void _tao_ft_client_id (const char *id)
ACE_Time_Valueget_timeout (void)
 Get the Timeout value. More...


Static Public Methods

CORBA::ORB_ptr _duplicate (CORBA::ORB_ptr orb)
 Return a duplicate of <{orb}>. When work with this duplicate is complete, it should be freed up using <CORBA::release()>. More...

CORBA::ORB_ptr _nil (void)
 Returns a pointer to a nil ORB, i.e., an non-existent ORB. This can be used for initialization or in comparisons. More...

void init_orb_globals (ACE_ENV_SINGLE_ARG_DECL)
 Initialize the ORB globals correctly, i.e., only when they haven't been initialized yet. More...

void _tao_unexpected_exception (void)

Static Public Attributes

CORBA::TypeCode_ptr _tc_ObjectId = 0
CORBA::TypeCode_ptr _tc_ObjectIdList

Protected Methods

 CORBA_ORB (TAO_ORB_Core *orb_core)
 ~CORBA_ORB (void)
CORBA_Object_ptr resolve_poa_current (ACE_ENV_SINGLE_ARG_DECL)
 Resolve the POA current. More...

CORBA_Object_ptr resolve_policy_manager (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
 Resolve the Policy Manager for this ORB. More...

CORBA_Object_ptr resolve_policy_current (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
 Resolve the Policy Current for this thread. More...


Private Methods

CORBA::Object_ptr resolve_service (TAO_MCAST_SERVICEID service_id ACE_ENV_ARG_DECL)
 Resolve the given service based on the service ID. More...

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

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

void check_shutdown (ACE_ENV_SINGLE_ARG_DECL)
 Check if ORB has shutdown. If it has, throw an exception. More...

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

 CORBA_ORB (const CORBA_ORB &)
CORBA_ORB & operator= (const CORBA_ORB &)

Private Attributes

TAO_SYNCH_MUTEX lock_
 lock required for mutual exclusion between multiple threads. More...

u_int refcount_
 Maintains a reference count of number of instantiations of the ORB. More...

TAO_ORB_Coreorb_core_
 The ORB_Core that created us.... More...

TAO_ValueFactory_Mapvaluetype_factory_map_
 If non-0 then this is the Factory for OBV unmarshaling. More...

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

ACE_Time_Valuetimeout_
 Timeout value. More...


Static Private Attributes

int orb_init_count_ = 0
 Count of the number of times that <ORB_init> has been called. More...


Friends

class TAO_ORB_Core
TAO_Export TAO_ORB_CoreTAO_ORB_Core_instance (void)

Detailed Description

ORB pseudo-objref.

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 70 of file ORB.h.


Member Typedef Documentation

typedef CORBA_ORB_ptr CORBA_ORB::_ptr_type
 

Definition at line 503 of file ORB.h.

typedef CORBA_ORB_var CORBA_ORB::_var_type
 

Definition at line 504 of file ORB.h.

typedef char* CORBA_ORB::ObjectId
 

Definition at line 105 of file ORB.h.

Referenced by TAO_TypeCodes::init.

typedef CORBA::String_out CORBA_ORB::ObjectId_out
 

Definition at line 107 of file ORB.h.

typedef CORBA::String_var CORBA_ORB::ObjectId_var
 

Definition at line 106 of file ORB.h.

typedef CORBA_ORB_ObjectIdList CORBA_ORB::ObjectIdList
 

Definition at line 110 of file ORB.h.

typedef CORBA_ORB_ObjectIdList_out CORBA_ORB::ObjectIdList_out
 

Definition at line 112 of file ORB.h.

typedef CORBA_ORB_ObjectIdList* CORBA_ORB::ObjectIdList_ptr
 

Definition at line 113 of file ORB.h.

typedef CORBA_ORB_ObjectIdList_var CORBA_ORB::ObjectIdList_var
 

Definition at line 111 of file ORB.h.

typedef CORBA_ORB_RequestSeq CORBA_ORB::RequestSeq
 

Definition at line 162 of file ORB.h.

typedef CORBA_ORB_RequestSeq_out CORBA_ORB::RequestSeq_out
 

Definition at line 164 of file ORB.h.

typedef CORBA_ORB_RequestSeq_var CORBA_ORB::RequestSeq_var
 

Definition at line 163 of file ORB.h.


Constructor & Destructor Documentation

CORBA_ORB::CORBA_ORB TAO_ORB_Core   orb_core [protected]
 

Definition at line 148 of file ORB.cpp.

00149   : lock_ (),
00150     refcount_ (1),
00151     orb_core_ (orb_core),
00152     valuetype_factory_map_ (0),
00153     use_omg_ior_format_ (1),
00154     timeout_ (0)
00155 {
00156 }

CORBA_ORB::~CORBA_ORB void    [protected]
 

Definition at line 158 of file ORB.cpp.

00159 {
00160   // This destructor is only invoked when the last ORB reference (not
00161   // instance) is being destroyed.
00162 }

CORBA_ORB::CORBA_ORB const CORBA_ORB &    [private]
 


Member Function Documentation

CORBA::Policy_ptr CORBA_ORB::_create_policy CORBA::PolicyType type    ACE_ENV_ARG_DECL throw (CORBA::SystemException, CORBA::PolicyError)
 

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

Definition at line 1777 of file ORB.cpp.

References CORBA::Policy::_nil, ACE_CHECK_RETURN, ACE_ENV_ARG_PARAMETER, and ACE_ENV_SINGLE_ARG_PARAMETER.

01781 {
01782   this->check_shutdown (ACE_ENV_SINGLE_ARG_PARAMETER);
01783   ACE_CHECK_RETURN (CORBA::Policy::_nil ());
01784 
01785   // Attempt to obtain the policy from the policy factory registry.
01786   return
01787     this->orb_core_->policy_factory_registry ()->_create_policy (
01788       type
01789       ACE_ENV_ARG_PARAMETER);
01790 }

ACE_INLINE CORBA::ULong CORBA_ORB::_decr_refcnt void   
 

Definition at line 18 of file ORB.i.

References ACE_GUARD_RETURN, refcount_, and TAO_SYNCH_MUTEX.

00019 {
00020   {
00021     ACE_GUARD_RETURN (TAO_SYNCH_MUTEX, mon, this->lock_, 0);
00022     this->refcount_--;
00023     if (this->refcount_ != 0)
00024       return this->refcount_;
00025   }
00026 
00027   delete this;
00028   return 0;
00029 }

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 32 of file ORB.i.

Referenced by CORBA_ORB_var::CORBA_ORB_var, CORBA_ORB_out::operator=, and CORBA_ORB_var::operator=.

00033 {
00034   if (obj)
00035     obj->_incr_refcnt ();
00036   return obj;
00037 }

ACE_INLINE CORBA::ULong CORBA_ORB::_incr_refcnt void   
 

Definition at line 11 of file ORB.i.

References ACE_GUARD_RETURN, lock_, refcount_, and TAO_SYNCH_MUTEX.

00012 {
00013   ACE_GUARD_RETURN (TAO_SYNCH_MUTEX, guard, lock_, 0);
00014   return ++this->refcount_;
00015 }

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 42 of file ORB.i.

Referenced by CORBA_ORB_var::_retn, CORBA_ORB_out::CORBA_ORB_out, CORBA_ORB_var::CORBA_ORB_var, and CORBA_ORB_var::out.

00043 {
00044   return 0;
00045 }

CORBA::Boolean CORBA_ORB::_optimize_collocation_objects void    const
 

Definition at line 1917 of file ORB.cpp.

References TAO_ORB_Core::optimize_collocation_objects, and orb_core_.

01918 {
01919   if (this->orb_core_ != 0)
01920     return this->orb_core_->optimize_collocation_objects ();
01921   else
01922     return 0; // Need to return something
01923 }

void CORBA_ORB::_optimize_collocation_objects CORBA::Boolean    opt
 

Set collocation optimization status. Get collocation optimization status.

Definition at line 1910 of file ORB.cpp.

References TAO_ORB_Core::optimize_collocation_objects, and orb_core_.

01911 {
01912   if (this->orb_core_ != 0)
01913     this->orb_core_->optimize_collocation_objects (opt);
01914 }

void CORBA_ORB::_tao_ft_client_id const char *    id
 

Definition at line 1328 of file ORB.cpp.

References TAO_Fault_Tolerance_Service::client_id, TAO_ORB_Core::fault_tolerance_service, id, and orb_core.

01329 {
01330   this->orb_core ()->fault_tolerance_service ().client_id (id);
01331 }

const ACE_CString & CORBA_ORB::_tao_ft_client_id void   
 

TAO specific extension to get and set the client ID. The client id can be set by the application which would be used by the FT service. As there are no specific interfaces defined in the spec, we have this prorpietary extensions

Definition at line 1322 of file ORB.cpp.

References TAO_Fault_Tolerance_Service::client_id, TAO_ORB_Core::fault_tolerance_service, and orb_core.

01323 {
01324   return this->orb_core ()->fault_tolerance_service ().client_id ();
01325 }

void CORBA_ORB::_tao_unexpected_exception void    [static]
 

Definition at line 1311 of file ORB.cpp.

Referenced by init_orb_globals.

01312 {
01313 #if defined(ACE_HAS_EXCEPTIONS)
01314   throw CORBA::UNKNOWN ();
01315 #else
01316   // Nothing to do, this will be handled by the ORB core when sending
01317   // the exception back to the client...
01318 #endif /* ACE_HAS_EXCEPTIONS */
01319 }

ACE_INLINE CORBA::Boolean CORBA_ORB::_use_omg_ior_format void   
 

Definition at line 54 of file ORB.i.

References use_omg_ior_format_.

00055 {
00056   return this->use_omg_ior_format_;
00057 }

ACE_INLINE void CORBA_ORB::_use_omg_ior_format CORBA::Boolean    ior
 

Set the IOR flag. Get the IOR flag.

Definition at line 48 of file ORB.i.

References use_omg_ior_format_.

00049 {
00050   this->use_omg_ior_format_ = ior;
00051 }

void CORBA_ORB::check_shutdown ACE_ENV_SINGLE_ARG_DECL    [private]
 

Check if ORB has shutdown. If it has, throw an exception.

Definition at line 1181 of file ORB.cpp.

References ACE_CHECK, ACE_ENV_SINGLE_ARG_DECL, ACE_ENV_SINGLE_ARG_PARAMETER, ACE_THROW, TAO_ORB_Core::check_shutdown, orb_core, and TAO_DEFAULT_MINOR_CODE.

Referenced by list_initial_services, object_to_string, resolve_initial_references, run, shutdown, string_to_object, and work_pending.

01182 {
01183   if (this->orb_core () != 0)
01184     {
01185       this->orb_core ()->check_shutdown (ACE_ENV_SINGLE_ARG_PARAMETER);
01186       ACE_CHECK;
01187     }
01188   else
01189     {
01190       // If the ORB_Core pointer is zero, assume that the ORB_Core has
01191       // been destroyed.
01192 
01193       // As defined by the CORBA 2.3 specification, throw a
01194       // CORBA::OBJECT_NOT_EXIST exception if the ORB has been
01195       // destroyed by the time an ORB function is called.
01196 
01197       ACE_THROW (CORBA::OBJECT_NOT_EXIST (TAO_DEFAULT_MINOR_CODE,
01198                                           CORBA::COMPLETED_NO));
01199     }
01200 }

CORBA::TypeCode_ptr CORBA_ORB::create_abstract_interface_tc const char *    id,
const char *name    ACE_ENV_ARG_DECL_WITH_DEFAULTS
throw (CORBA::SystemException)
 

Definition at line 828 of file ORB.cpp.

References ACE_ENV_ARG_PARAMETER, ACE_THROW_RETURN, TAO_TypeCodeFactory_Adapter::create_abstract_interface_tc, ACE_Dynamic_Service::instance, and TAO_ORB_Core::typecodefactory_adapter_name.

00834 {
00835   TAO_TypeCodeFactory_Adapter *adapter =
00836     ACE_Dynamic_Service<TAO_TypeCodeFactory_Adapter>::instance (
00837         TAO_ORB_Core::typecodefactory_adapter_name ()
00838       );
00839 
00840   if (adapter == 0)
00841     {
00842       ACE_THROW_RETURN (CORBA::INTERNAL (),
00843                         CORBA::TypeCode::_nil ());
00844     }
00845 
00846   return adapter->create_abstract_interface_tc (id,
00847                                                 name
00848                                                 ACE_ENV_ARG_PARAMETER);
00849 }

CORBA::TypeCode_ptr CORBA_ORB::create_alias_tc const char *    id,
const char *    name,
CORBA::TypeCode_ptr original_type    ACE_ENV_ARG_DECL_WITH_DEFAULTS
throw (CORBA::SystemException)
 

Definition at line 534 of file ORB.cpp.

References ACE_ENV_ARG_PARAMETER, ACE_THROW_RETURN, TAO_TypeCodeFactory_Adapter::create_alias_tc, ACE_Dynamic_Service::instance, and TAO_ORB_Core::typecodefactory_adapter_name.

00541 {
00542   TAO_TypeCodeFactory_Adapter *adapter =
00543     ACE_Dynamic_Service<TAO_TypeCodeFactory_Adapter>::instance (
00544         TAO_ORB_Core::typecodefactory_adapter_name ()
00545       );
00546 
00547   if (adapter == 0)
00548     {
00549       ACE_THROW_RETURN (CORBA::INTERNAL (),
00550                         CORBA::TypeCode::_nil ());
00551     }
00552 
00553   return adapter->create_alias_tc (id,
00554                                    name,
00555                                    original_type
00556                                    ACE_ENV_ARG_PARAMETER);
00557 }

CORBA::TypeCode_ptr CORBA_ORB::create_array_tc CORBA::ULong    length,
CORBA::TypeCode_ptr element_type    ACE_ENV_ARG_DECL_WITH_DEFAULTS
throw (CORBA::SystemException)
 

Definition at line 702 of file ORB.cpp.

References ACE_ENV_ARG_PARAMETER, ACE_THROW_RETURN, TAO_TypeCodeFactory_Adapter::create_array_tc, ACE_Dynamic_Service::instance, and TAO_ORB_Core::typecodefactory_adapter_name.

00708 {
00709   TAO_TypeCodeFactory_Adapter *adapter =
00710     ACE_Dynamic_Service<TAO_TypeCodeFactory_Adapter>::instance (
00711         TAO_ORB_Core::typecodefactory_adapter_name ()
00712       );
00713 
00714   if (adapter == 0)
00715     {
00716       ACE_THROW_RETURN (CORBA::INTERNAL (),
00717                         CORBA::TypeCode::_nil ());
00718     }
00719 
00720   return adapter->create_array_tc (length,
00721                                    element_type
00722                                    ACE_ENV_ARG_PARAMETER);
00723 }

void CORBA_ORB::create_context_list CORBA::ContextList_ptr &ctxtlist    ACE_ENV_ARG_DECL_WITH_DEFAULTS
 

CORBA::TypeCode_ptr CORBA_ORB::create_enum_tc const char *    id,
const char *    name,
const CORBA::EnumMemberSeq &members    ACE_ENV_ARG_DECL_WITH_DEFAULTS
throw (CORBA::SystemException)
 

void CORBA_ORB::create_environment CORBA::Environment_ptr &new_env    ACE_ENV_ARG_DECL_WITH_DEFAULTS
 

void CORBA_ORB::create_exception_list CORBA::ExceptionList_ptr &exclist    ACE_ENV_ARG_DECL_WITH_DEFAULTS
 

CORBA::TypeCode_ptr CORBA_ORB::create_exception_tc const char *    id,
const char *    name,
const CORBA::StructMemberSeq &members    ACE_ENV_ARG_DECL_WITH_DEFAULTS
throw (CORBA::SystemException)
 

CORBA::TypeCode_ptr CORBA_ORB::create_fixed_tc CORBA::UShort    digits,
CORBA::UShort scale    ACE_ENV_ARG_DECL_WITH_DEFAULTS
throw (CORBA::SystemException)
 

Definition at line 654 of file ORB.cpp.

References ACE_ENV_ARG_PARAMETER, ACE_THROW_RETURN, TAO_TypeCodeFactory_Adapter::create_fixed_tc, ACE_Dynamic_Service::instance, and TAO_ORB_Core::typecodefactory_adapter_name.

00660 {
00661   TAO_TypeCodeFactory_Adapter *adapter =
00662     ACE_Dynamic_Service<TAO_TypeCodeFactory_Adapter>::instance (
00663         TAO_ORB_Core::typecodefactory_adapter_name ()
00664       );
00665 
00666   if (adapter == 0)
00667     {
00668       ACE_THROW_RETURN (CORBA::INTERNAL (),
00669                         CORBA::TypeCode::_nil ());
00670     }
00671 
00672   return adapter->create_fixed_tc (digits,
00673                                    scale
00674                                    ACE_ENV_ARG_PARAMETER);
00675 }

CORBA::TypeCode_ptr CORBA_ORB::create_interface_tc const char *    id,
const char *name    ACE_ENV_ARG_DECL_WITH_DEFAULTS
throw (CORBA::SystemException)
 

Definition at line 586 of file ORB.cpp.

References ACE_ENV_ARG_PARAMETER, ACE_THROW_RETURN, TAO_TypeCodeFactory_Adapter::create_interface_tc, ACE_Dynamic_Service::instance, and TAO_ORB_Core::typecodefactory_adapter_name.

00592 {
00593   TAO_TypeCodeFactory_Adapter *adapter =
00594     ACE_Dynamic_Service<TAO_TypeCodeFactory_Adapter>::instance (
00595         TAO_ORB_Core::typecodefactory_adapter_name ()
00596       );
00597 
00598   if (adapter == 0)
00599     {
00600       ACE_THROW_RETURN (CORBA::INTERNAL (),
00601                         CORBA::TypeCode::_nil ());
00602     }
00603 
00604   return adapter->create_interface_tc (id,
00605                                        name
00606                                        ACE_ENV_ARG_PARAMETER);
00607 }

void CORBA_ORB::create_list CORBA::Long    count,
CORBA::NVList_ptr &new_list    ACE_ENV_ARG_DECL_WITH_DEFAULTS
 

Definition at line 291 of file ORB.cpp.

References CORBA_SystemException::_tao_minor_code, ACE_ASSERT, ACE_CHECK, ACE_NEW_THROW_EX, and TAO_DEFAULT_MINOR_CODE.

00294 {
00295   ACE_ASSERT (CORBA::ULong (count) <= UINT_MAX);
00296 
00297   // Create an empty list
00298   ACE_NEW_THROW_EX (new_list,
00299                     CORBA::NVList,
00300                     CORBA::NO_MEMORY (
00301                       CORBA_SystemException::_tao_minor_code (
00302                         TAO_DEFAULT_MINOR_CODE,
00303                         ENOMEM),
00304                       CORBA::COMPLETED_NO));
00305   ACE_CHECK;
00306 
00307   // If count is greater than 0, create a list of NamedValues.
00308   if (count != 0)
00309     {
00310       new_list->max_ = (CORBA::ULong) count;
00311 
00312       for (CORBA::Long i = 0; i < count; i++)
00313         {
00314           CORBA::NamedValue_ptr nv = 0;
00315           ACE_NEW_THROW_EX (nv,
00316                             CORBA::NamedValue,
00317                             CORBA::NO_MEMORY (
00318                               CORBA_SystemException::_tao_minor_code (
00319                                 TAO_DEFAULT_MINOR_CODE,
00320                                 ENOMEM),
00321                               CORBA::COMPLETED_NO));
00322           ACE_CHECK;
00323 
00324           new_list->values_.enqueue_tail (nv);
00325         }
00326     }
00327 }

CORBA::TypeCode_ptr CORBA_ORB::create_local_interface_tc const char *    id,
const char *ame    ACE_ENV_ARG_DECL_WITH_DEFAULTS
throw (CORBA::SystemException)
 

void CORBA_ORB::create_named_value CORBA::NamedValue_ptr &nmval    ACE_ENV_ARG_DECL_WITH_DEFAULTS
 

CORBA::TypeCode_ptr CORBA_ORB::create_native_tc const char *    id,
const char *name    ACE_ENV_ARG_DECL_WITH_DEFAULTS
throw (CORBA::SystemException)
 

Definition at line 782 of file ORB.cpp.

References ACE_ENV_ARG_PARAMETER, ACE_THROW_RETURN, TAO_TypeCodeFactory_Adapter::create_native_tc, ACE_Dynamic_Service::instance, and TAO_ORB_Core::typecodefactory_adapter_name.

00788 {
00789   TAO_TypeCodeFactory_Adapter *adapter =
00790     ACE_Dynamic_Service<TAO_TypeCodeFactory_Adapter>::instance (
00791         TAO_ORB_Core::typecodefactory_adapter_name ()
00792       );
00793 
00794   if (adapter == 0)
00795     {
00796       ACE_THROW_RETURN (CORBA::INTERNAL (),
00797                         CORBA::TypeCode::_nil ());
00798     }
00799 
00800   return adapter->create_native_tc (id,
00801                                     name
00802                                     ACE_ENV_ARG_PARAMETER);
00803 }

CORBA::Policy_ptr CORBA_ORB::create_policy CORBA::PolicyType    type,
const CORBA::Any &val    ACE_ENV_ARG_DECL_WITH_DEFAULTS
throw (CORBA::SystemException, CORBA::PolicyError)
 

Definition at line 1759 of file ORB.cpp.

References CORBA::Policy::_nil, ACE_CHECK_RETURN, ACE_ENV_ARG_PARAMETER, and ACE_ENV_SINGLE_ARG_PARAMETER.

01764 {
01765   this->check_shutdown (ACE_ENV_SINGLE_ARG_PARAMETER);
01766   ACE_CHECK_RETURN (CORBA::Policy::_nil ());
01767 
01768   // Attempt to obtain the policy from the policy factory registry.
01769   return
01770     this->orb_core_->policy_factory_registry ()->create_policy (
01771       type,
01772       val
01773       ACE_ENV_ARG_PARAMETER);
01774 }

CORBA::TypeCode_ptr CORBA_ORB::create_recursive_tc const char *id    ACE_ENV_ARG_DECL_WITH_DEFAULTS throw (CORBA::SystemException)
 

Definition at line 806 of file ORB.cpp.

References ACE_ENV_ARG_PARAMETER, ACE_THROW_RETURN, TAO_TypeCodeFactory_Adapter::create_recursive_tc, ACE_Dynamic_Service::instance, and TAO_ORB_Core::typecodefactory_adapter_name.

00811 {
00812   TAO_TypeCodeFactory_Adapter *adapter =
00813     ACE_Dynamic_Service<TAO_TypeCodeFactory_Adapter>::instance (
00814         TAO_ORB_Core::typecodefactory_adapter_name ()
00815       );
00816 
00817   if (adapter == 0)
00818     {
00819       ACE_THROW_RETURN (CORBA::INTERNAL (),
00820                         CORBA::TypeCode::_nil ());
00821     }
00822 
00823   return adapter->create_recursive_tc (id
00824                                        ACE_ENV_ARG_PARAMETER);
00825 }

CORBA::TypeCode_ptr CORBA_ORB::create_sequence_tc CORBA::ULong    bound,
CORBA::TypeCode_ptr element_type    ACE_ENV_ARG_DECL_WITH_DEFAULTS
throw (CORBA::SystemException)
 

Definition at line 678 of file ORB.cpp.

References ACE_ENV_ARG_PARAMETER, ACE_THROW_RETURN, TAO_TypeCodeFactory_Adapter::create_sequence_tc, ACE_Dynamic_Service::instance, and TAO_ORB_Core::typecodefactory_adapter_name.

00684 {
00685   TAO_TypeCodeFactory_Adapter *adapter =
00686     ACE_Dynamic_Service<TAO_TypeCodeFactory_Adapter>::instance (
00687         TAO_ORB_Core::typecodefactory_adapter_name ()
00688       );
00689 
00690   if (adapter == 0)
00691     {
00692       ACE_THROW_RETURN (CORBA::INTERNAL (),
00693                         CORBA::TypeCode::_nil ());
00694     }
00695 
00696   return adapter->create_sequence_tc (bound,
00697                                       element_type
00698                                       ACE_ENV_ARG_PARAMETER);
00699 }

CORBA::TypeCode_ptr CORBA_ORB::create_string_tc CORBA::ULong bound    ACE_ENV_ARG_DECL_WITH_DEFAULTS throw (CORBA::SystemException)
 

Definition at line 610 of file ORB.cpp.

References ACE_ENV_ARG_PARAMETER, ACE_THROW_RETURN, TAO_TypeCodeFactory_Adapter::create_string_tc, ACE_Dynamic_Service::instance, and TAO_ORB_Core::typecodefactory_adapter_name.

00615 {
00616   TAO_TypeCodeFactory_Adapter *adapter =
00617     ACE_Dynamic_Service<TAO_TypeCodeFactory_Adapter>::instance (
00618         TAO_ORB_Core::typecodefactory_adapter_name ()
00619       );
00620 
00621   if (adapter == 0)
00622     {
00623       ACE_THROW_RETURN (CORBA::INTERNAL (),
00624                         CORBA::TypeCode::_nil ());
00625     }
00626 
00627   return adapter->create_string_tc (bound
00628                                     ACE_ENV_ARG_PARAMETER);
00629 }

CORBA::TypeCode_ptr CORBA_ORB::create_struct_tc const char *    id,
const char *    name,
const CORBA::StructMemberSeq &members    ACE_ENV_ARG_DECL_WITH_DEFAULTS
throw (CORBA::SystemException)
 

The ORB TypeCode creation functions.

CORBA::TypeCode_ptr CORBA_ORB::create_union_tc const char *    id,
const char *    name,
CORBA::TypeCode_ptr    discriminator_type,
const CORBA::UnionMemberSeq &members    ACE_ENV_ARG_DECL_WITH_DEFAULTS
throw (CORBA::SystemException)
 

CORBA::TypeCode_ptr CORBA_ORB::create_value_box_tc const char *    id,
const char *    name,
CORBA::TypeCode_ptr boxed_type    ACE_ENV_ARG_DECL_WITH_DEFAULTS
throw (CORBA::SystemException)
 

Definition at line 756 of file ORB.cpp.

References ACE_ENV_ARG_PARAMETER, ACE_THROW_RETURN, TAO_TypeCodeFactory_Adapter::create_value_box_tc, ACE_Dynamic_Service::instance, and TAO_ORB_Core::typecodefactory_adapter_name.

00763 {
00764   TAO_TypeCodeFactory_Adapter *adapter =
00765     ACE_Dynamic_Service<TAO_TypeCodeFactory_Adapter>::instance (
00766         TAO_ORB_Core::typecodefactory_adapter_name ()
00767       );
00768 
00769   if (adapter == 0)
00770     {
00771       ACE_THROW_RETURN (CORBA::INTERNAL (),
00772                         CORBA::TypeCode::_nil ());
00773     }
00774 
00775   return adapter->create_value_box_tc (id,
00776                                        name,
00777                                        boxed_type
00778                                        ACE_ENV_ARG_PARAMETER);
00779 }

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    ACE_ENV_ARG_DECL_WITH_DEFAULTS
throw (CORBA::SystemException)
 

CORBA::TypeCode_ptr CORBA_ORB::create_wstring_tc CORBA::ULong bound    ACE_ENV_ARG_DECL_WITH_DEFAULTS throw (CORBA::SystemException)
 

Definition at line 632 of file ORB.cpp.

References ACE_ENV_ARG_PARAMETER, ACE_THROW_RETURN, TAO_TypeCodeFactory_Adapter::create_wstring_tc, ACE_Dynamic_Service::instance, and TAO_ORB_Core::typecodefactory_adapter_name.

00637 {
00638   TAO_TypeCodeFactory_Adapter *adapter =
00639     ACE_Dynamic_Service<TAO_TypeCodeFactory_Adapter>::instance (
00640         TAO_ORB_Core::typecodefactory_adapter_name ()
00641       );
00642 
00643   if (adapter == 0)
00644     {
00645       ACE_THROW_RETURN (CORBA::INTERNAL (),
00646                         CORBA::TypeCode::_nil ());
00647     }
00648 
00649   return adapter->create_wstring_tc (bound
00650                                      ACE_ENV_ARG_PARAMETER);
00651 }

void CORBA_ORB::destroy ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS   
 

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 179 of file ORB.cpp.

References ACE_CHECK, ACE_DEBUG, ACE_ENV_SINGLE_ARG_DECL, ACE_ENV_SINGLE_ARG_PARAMETER, ACE_LIB_TEXT, ACE_TEXT_CHAR_TO_TCHAR, ACE_THROW, TAO_ORB_Core::destroy, LM_DEBUG, orb_core, orb_core_, and TAO_DEFAULT_MINOR_CODE.

00180 {
00181   if (this->orb_core () == 0)
00182     {
00183       // If the ORB_Core pointer is zero, assume that the ORB_Core has
00184       // been destroyed.
00185 
00186       // As defined by the CORBA 2.3 specification, throw a
00187       // CORBA::OBJECT_NOT_EXIST exception if the ORB has been
00188       // destroyed by the time an ORB function is called.
00189 
00190       ACE_THROW (CORBA::OBJECT_NOT_EXIST (TAO_DEFAULT_MINOR_CODE,
00191                                           CORBA::COMPLETED_NO));
00192     }
00193 
00194   if (TAO_debug_level >= 3)
00195     {
00196       ACE_DEBUG ((LM_DEBUG,
00197                   ACE_LIB_TEXT ("CORBA::ORB::destroy() has been called on ORB <%s>.\n"),
00198                   ACE_TEXT_CHAR_TO_TCHAR (this->orb_core ()->orbid ())));
00199     }
00200 
00201   this->orb_core ()->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
00202   ACE_CHECK;
00203 
00204   // Now invalidate the pointer to the ORB_Core that created this
00205   // ORB.
00206   this->orb_core_ = 0;
00207 }

void CORBA_ORB::get_default_context CORBA::Context_ptr &ctx    ACE_ENV_ARG_DECL_WITH_DEFAULTS
 

void CORBA_ORB::get_next_response CORBA_Request_ptr &req    ACE_ENV_ARG_DECL_WITH_DEFAULTS
 

CORBA::Boolean CORBA_ORB::get_service_information CORBA::ServiceType    service_type,
CORBA::ServiceInformation_out service_information    ACE_ENV_ARG_DECL_WITH_DEFAULTS
 

Definition at line 372 of file ORB.cpp.

References CORBA_SystemException::_tao_minor_code, ACE_THROW_RETURN, ENOTSUP, and TAO_DEFAULT_MINOR_CODE.

00376 {
00377   ACE_THROW_RETURN (CORBA::NO_IMPLEMENT (
00378                       CORBA_SystemException::_tao_minor_code (
00379                         TAO_DEFAULT_MINOR_CODE,
00380                         ENOTSUP),
00381                       CORBA::COMPLETED_NO),
00382                     0);
00383 }

ACE_Time_Value * CORBA_ORB::get_timeout void   
 

Get the Timeout value.

Definition at line 2000 of file ORB.cpp.

References timeout_.

02001 {
02002   return this->timeout_;
02003 }

char * CORBA_ORB::id ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS   
 

Return this ORB's ORBid.

Definition at line 1751 of file ORB.cpp.

References ACE_ENV_SINGLE_ARG_DECL_NOT_USED, and CORBA::string_dup.

Referenced by _tao_ft_client_id, and register_initial_reference.

01752 {
01753   return CORBA::string_dup (this->orb_core_->orbid ());
01754 }

void CORBA_ORB::init_orb_globals ACE_ENV_SINGLE_ARG_DECL    [static]
 

Initialize the ORB globals correctly, i.e., only when they haven't been initialized yet.

Definition at line 1205 of file ORB.cpp.

References PortableInterceptor::ORBInitializer::_nil, TAO_Singleton_Manager::_set_unexpected, CORBA_SystemException::_tao_minor_code, _tao_unexpected_exception, ACE_CHECK, ACE_DEBUG, ACE_ENV_ARG_PARAMETER, ACE_ENV_SINGLE_ARG_DECL, ACE_ENV_SINGLE_ARG_PARAMETER, ACE_NEW_THROW_EX, ACE_SIZEOF_VOID_P, ACE_THROW, PortableInterceptor::ORBInitializer_var::in, TAO_Exceptions::init, TAO_TypeCodes::init, TAO_Singleton_Manager::instance, LM_DEBUG, PortableInterceptor::register_orb_initializer, and TAO_DEFAULT_MINOR_CODE.

01206 {
01207   // This method should be invoked atomically.  It is the caller's
01208   // responsibility to ensure that this condition is satisfied.
01209 
01210   // Prevent multiple initializations.
01211   if (CORBA::ORB::orb_init_count_ != 0)
01212     return;
01213   else
01214     CORBA::ORB::orb_init_count_++;
01215 
01216   // initialize the system TypeCodes
01217   TAO_TypeCodes::init ();
01218 
01219   // initialize the system exceptions
01220   TAO_Exceptions::init (ACE_ENV_SINGLE_ARG_PARAMETER);
01221   ACE_CHECK;
01222 
01223 #if defined (ACE_HAS_EXCEPTIONS)
01224   // This must be done after the system TypeCodes and Exceptions have
01225   // been initialized.  An unexpected exception will cause TAO's
01226   // unexpected exception handler to be called.  That handler
01227   // transforms all unexpected exceptions to CORBA::UNKNOWN, which of
01228   // course requires the TypeCode constants and system exceptions to
01229   // have been initialized.
01230   TAO_Singleton_Manager::instance ()->_set_unexpected (
01231     CORBA_ORB::_tao_unexpected_exception);
01232 #endif /* ACE_HAS_EXCEPTIONS */
01233 
01234   // Verify some of the basic implementation requirements.  This test
01235   // gets optimized away by a decent compiler (or else the rest of the
01236   // routine does).
01237   //
01238   // NOTE:  we still "just" assume that native floating point is IEEE.
01239   if (sizeof (CORBA::Short) != 2
01240       || sizeof (CORBA::Long) != 4
01241       || sizeof (CORBA::LongLong) != 8
01242       || sizeof (CORBA::Float) != 4
01243       || sizeof (CORBA::Double) != 8
01244       || sizeof (CORBA::LongDouble) != 16
01245       || sizeof (CORBA::WChar) < 2
01246       || sizeof (void *) != ACE_SIZEOF_VOID_P)
01247     {
01248       ACE_DEBUG ((LM_DEBUG,
01249                   "%s; ERROR: unexpected basic type size; "
01250                   "s:%d l:%d ll:%d f:%d d:%d ld:%d wc:%d v:%d\n"
01251                   "please reconfigure TAO\n",
01252                   __FILE__,
01253                   sizeof (CORBA::Short),
01254                   sizeof (CORBA::Long),
01255                   sizeof (CORBA::LongLong),
01256                   sizeof (CORBA::Float),
01257                   sizeof (CORBA::Double),
01258                   sizeof (CORBA::LongDouble),
01259                   sizeof (CORBA::WChar),
01260                   sizeof (void *)));
01261 
01262       ACE_THROW (CORBA::INITIALIZE ());
01263     }
01264 
01265   // Register the CodecFactory ORBInitializer.
01266   PortableInterceptor::ORBInitializer_ptr tmp_cf_initializer;
01267   ACE_NEW_THROW_EX (tmp_cf_initializer,
01268                     TAO_CodecFactory_ORBInitializer,
01269                     CORBA::NO_MEMORY (
01270                       CORBA_SystemException::_tao_minor_code (
01271                         TAO_DEFAULT_MINOR_CODE,
01272                         ENOMEM),
01273                       CORBA::COMPLETED_NO));
01274   ACE_CHECK;
01275 
01276   PortableInterceptor::ORBInitializer_var cf_initializer =
01277     tmp_cf_initializer;
01278 
01279   PortableInterceptor::register_orb_initializer (cf_initializer.in ()
01280                                                  ACE_ENV_ARG_PARAMETER);
01281   ACE_CHECK;
01282 
01283   // -------------------------------------------------------------
01284   // @@ These ORB initializer instantiations should go away.  They
01285   //    should be registered via the service configurator, for
01286   //    example.
01287 
01288 #if TAO_HAS_INTERCEPTORS == 1
01289   PortableInterceptor::ORBInitializer_ptr temp_pi_initializer =
01290     PortableInterceptor::ORBInitializer::_nil ();
01291   PortableInterceptor::ORBInitializer_var pi_initializer;
01292 
01293   // Register the PICurrent ORBInitializer.
01294   ACE_NEW_THROW_EX (temp_pi_initializer,
01295                     TAO_PICurrent_ORBInitializer,
01296                     CORBA::NO_MEMORY (
01297                       CORBA_SystemException::_tao_minor_code (
01298                         TAO_DEFAULT_MINOR_CODE,
01299                         ENOMEM),
01300                       CORBA::COMPLETED_NO));
01301   ACE_CHECK;
01302 
01303   pi_initializer = temp_pi_initializer;
01304 
01305   PortableInterceptor::register_orb_initializer (pi_initializer.in ()
01306                                                  ACE_ENV_ARG_PARAMETER);
01307   ACE_CHECK;
01308 #endif  /* TAO_HAS_INTERCEPTORS == 1 */
01309 }

CORBA::Object_ptr CORBA_ORB::ior_string_to_object const char *ior    ACE_ENV_ARG_DECL [private]
 

Convert an OMG IOR into an object reference.

Referenced by string_to_object.

CORBA_ORB_ObjectIdList_ptr CORBA_ORB::list_initial_services ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS   
 

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

Definition at line 1171 of file ORB.cpp.

References ACE_CHECK_RETURN, ACE_ENV_SINGLE_ARG_DECL, ACE_ENV_SINGLE_ARG_PARAMETER, check_shutdown, TAO_ORB_Core::list_initial_references, and orb_core.

01172 {
01173   this->check_shutdown (ACE_ENV_SINGLE_ARG_PARAMETER);
01174   ACE_CHECK_RETURN (0);
01175 
01176   return
01177     this->orb_core ()->list_initial_references (ACE_ENV_SINGLE_ARG_PARAMETER);
01178 }

CORBA::ValueFactory CORBA_ORB::lookup_value_factory const char *repository_id    ACE_ENV_ARG_DECL_WITH_DEFAULTS
 

Definition at line 2054 of file ORB.cpp.

References ACE_ENV_ARG_DECL_NOT_USED, TAO_ValueFactory_Map::find, and valuetype_factory_map_.

02056 {
02057 // %! guard
02058 // do _add_ref here not in map->find
02059   if (valuetype_factory_map_)
02060     {
02061       CORBA::ValueFactory factory;
02062       int result = valuetype_factory_map_->find (repository_id,
02063                                                  factory);
02064 
02065       if (result == -1)
02066         {
02067           factory = 0;  // %! raise exception !
02068         }
02069 
02070       return factory;
02071     }
02072   else
02073     {
02074       return 0; // %! raise exception !
02075     }
02076 }

char * CORBA_ORB::object_to_string CORBA::Object_ptr obj    ACE_ENV_ARG_DECL_WITH_DEFAULTS
 

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 1569 of file ORB.cpp.

References CORBA_SystemException::_tao_minor_code, ACE_ALLOCATOR_RETURN, ACE_CHECK_RETURN, ACE_ENV_SINGLE_ARG_PARAMETER, ACE_ERROR, ACE_TEXT, ACE_THROW_RETURN, ACE_OutputCDR::begin, TAO_ORB_Parameters::cdr_memcpy_tradeoff, check_shutdown, ACE_Message_Block::cont, ACE_CDR::DEFAULT_BUFSIZE, TAO_MProfile::get_profile, ior_prefix, CORBA::is_nil, ACE_Message_Block::length, LM_ERROR, ACE_OS_String::memset, ACE::nibble2hex, orb_core_, 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_String::strcpy, TAO_DEF_GIOP_MAJOR, TAO_DEF_GIOP_MINOR, TAO_DEFAULT_MINOR_CODE, TAO_ENCAP_BYTE_ORDER, TAO_Profile::to_string, ACE_OutputCDR::total_length, and ACE_OutputCDR::write_octet.

01571 {
01572   // This method should not be called if the ORB has been shutdown.
01573   this->check_shutdown (ACE_ENV_SINGLE_ARG_PARAMETER);
01574   ACE_CHECK_RETURN (0);
01575 
01576   if (!CORBA::is_nil (obj) && obj->_is_local ())
01577     // @@ The CCM spec says one minor code, and the CORBA spec says
01578     //    another.  Which is the correct one?
01579     ACE_THROW_RETURN (CORBA::MARSHAL (CORBA::OMGVMCID | 4,
01580                                       CORBA::COMPLETED_NO),
01581                       0);
01582 
01583 
01584   // Application writer controls what kind of objref strings they get,
01585   // maybe along with other things, by how they initialize the ORB.
01586 
01587   if (use_omg_ior_format_)
01588     {
01589       // By default, orbs use IOR strings; these are ugly (and error
01590       // prone) but specified by CORBA.
01591       //
01592       // XXX there should be a simple way to reuse this code in other
01593       // ORB implementations ...
01594 
01595 #if defined (ACE_HAS_PURIFY)
01596       char buf [ACE_CDR::DEFAULT_BUFSIZE] = { 0 };
01597 #else
01598       // Avoid the initialization overhead if not compiling with
01599       // support for Purify.  There is no need to actually perform
01600       // initialization otherwise.
01601       char buf [ACE_CDR::DEFAULT_BUFSIZE];
01602 #endif /* ACE_HAS_PURIFY */
01603 
01604       TAO_OutputCDR cdr (buf,  sizeof buf,
01605                          TAO_ENCAP_BYTE_ORDER,
01606                          this->orb_core_->output_cdr_buffer_allocator (),
01607                          this->orb_core_->output_cdr_dblock_allocator (),
01608                          this->orb_core_->output_cdr_msgblock_allocator (),
01609                          this->orb_core_->orb_params ()->cdr_memcpy_tradeoff (),
01610                          TAO_DEF_GIOP_MAJOR,
01611                          TAO_DEF_GIOP_MINOR);
01612 
01613       // There is no translator currently available for stringifying an object
01614       // reference, since there is no transport with which to choose an NCS/TCS
01615       // pair.
01616 
01617       // support limited oref ACE_OS::strcmp.
01618       (void) ACE_OS::memset (buf, 0, sizeof (buf));
01619 
01620       // Marshal the objref into an encapsulation bytestream.
01621       (void) cdr.write_octet (TAO_ENCAP_BYTE_ORDER);
01622       if ((cdr << obj) == 0)
01623         ACE_THROW_RETURN (CORBA::MARSHAL (), 0);
01624 
01625       // Now hexify the encapsulated CDR data into a string, and
01626       // return that string.
01627 
01628       size_t total_len = cdr.total_length ();
01629 
01630       char *cp;
01631       ACE_ALLOCATOR_RETURN (cp,
01632                             CORBA::string_alloc (sizeof ior_prefix
01633                                                  + 2 *
01634                                                  ACE_static_cast(CORBA::ULong,
01635                                                                  total_len)),
01636                             0);
01637 
01638       CORBA::String_var string = cp;
01639 
01640       ACE_OS::strcpy (cp, ior_prefix);
01641       cp += sizeof (ior_prefix) - 1;
01642 
01643       for (const ACE_Message_Block *i = cdr.begin ();
01644            i != 0;
01645            i = i->cont ())
01646         {
01647           const char *bytes = i->rd_ptr ();
01648           size_t len = i->length ();
01649 
01650           while (len--)
01651             {
01652               *cp++ = ACE::nibble2hex ((*bytes) >> 4);
01653               *cp++ = ACE::nibble2hex (*bytes);
01654               bytes++;
01655             }
01656         }
01657       // Null terminate the string..
01658       *cp = 0;
01659 
01660       return string._retn ();
01661     }
01662   else
01663     {
01664       // It is perfectly valid to marshal a nil object reference.
01665       // However, it is not possible to convert a nil object reference
01666       // to a URL IOR, so throw an exception.
01667       if (CORBA::is_nil (obj) || obj->_stubobj () == 0)
01668         {
01669           if (TAO_debug_level > 0)
01670             ACE_ERROR ((LM_ERROR,
01671                         ACE_TEXT ("Nil object reference or TAO_Stub ")
01672                         ACE_TEXT ("pointer is zero when converting\n")
01673                         ACE_TEXT ("object reference to URL IOR.\n")));
01674 
01675           ACE_THROW_RETURN (CORBA::MARSHAL (
01676                               CORBA_SystemException::_tao_minor_code (
01677                                 TAO_DEFAULT_MINOR_CODE,
01678                                 EINVAL),
01679                               CORBA::COMPLETED_NO),
01680                             0);
01681         }
01682 
01683       TAO_MProfile &mp = obj->_stubobj ()->base_profiles ();
01684 
01685       if (mp.profile_count () == 0)
01686         {
01687           if (TAO_debug_level > 0)
01688             ACE_ERROR ((LM_ERROR,
01689                         ACE_TEXT ("(%P|%t) Cannot stringify given ")
01690                         ACE_TEXT ("object.  No profiles.\n")));
01691 
01692 
01693           ACE_THROW_RETURN (CORBA::MARSHAL (
01694                               CORBA_SystemException::_tao_minor_code (
01695                                 TAO_DEFAULT_MINOR_CODE,
01696                                 EINVAL),
01697                               CORBA::COMPLETED_NO),
01698                             0);
01699         }
01700 
01701       // For now we just use the first profile.
01702       TAO_Profile *profile = mp.get_profile (0);
01703 
01704       return profile->to_string (ACE_ENV_SINGLE_ARG_PARAMETER);
01705     }
01706 }

CORBA_ORB& CORBA_ORB::operator= const CORBA_ORB &    [private]
 

ACE_INLINE TAO_ORB_Core * CORBA_ORB::orb_core void    const
 

Get the ORB core.

Definition at line 60 of file ORB.i.

References orb_core_.

Referenced by _tao_ft_client_id, check_shutdown, destroy, list_initial_services, resolve_initial_references, run, and shutdown.

00061 {
00062   return this->orb_core_;
00063 }

void CORBA_ORB::perform_work ACE_Time_Value   ACE_ENV_ARG_DECL_WITH_DEFAULTS
 

void CORBA_ORB::perform_work ACE_Time_Value   ACE_ENV_ARG_DECL_WITH_DEFAULTS
 

void CORBA_ORB::perform_work ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS   
 

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 232 of file ORB.cpp.

References ACE_ENV_ARG_PARAMETER, and ACE_ENV_SINGLE_ARG_DECL.

00233 {
00234   this->perform_work (0 ACE_ENV_ARG_PARAMETER);
00235 }

CORBA::Boolean CORBA_ORB::poll_next_response ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS   
 

Definition at line 441 of file ORB.cpp.

References CORBA_SystemException::_tao_minor_code, ACE_ENV_SINGLE_ARG_DECL, ACE_THROW_RETURN, ENOTSUP, and TAO_DEFAULT_MINOR_CODE.

00442 {
00443   ACE_THROW_RETURN (CORBA::NO_IMPLEMENT (
00444                       CORBA_SystemException::_tao_minor_code (
00445                         TAO_DEFAULT_MINOR_CODE,
00446                         ENOTSUP),
00447                       CORBA::COMPLETED_NO),
00448                     0);
00449 }

void CORBA_ORB::register_initial_reference const char *    id,
CORBA::Object_ptr obj    ACE_ENV_ARG_DECL_WITH_DEFAULTS
 

Register an object reference with the ORB.

Definition at line 1159 of file ORB.cpp.

References ACE_CHECK, ACE_ENV_ARG_PARAMETER, id, TAO_ORB_Core::object_ref_table, orb_core_, and TAO_Object_Ref_Table::register_initial_reference.

01162 {
01163   TAO_Object_Ref_Table &table = this->orb_core_->object_ref_table ();
01164 
01165   table.register_initial_reference (id, obj ACE_ENV_ARG_PARAMETER);
01166   ACE_CHECK;
01167 }

CORBA::ValueFactory CORBA_ORB::register_value_factory const char *    repository_id,
CORBA::ValueFactory factory    ACE_ENV_ARG_DECL_WITH_DEFAULTS
 

Definition at line 2016 of file ORB.cpp.

References ACE_THROW_RETURN, TAO_Singleton::instance, TAO_ValueFactory_Map::rebind, and valuetype_factory_map_.

02019 {
02020 // %! guard, and ACE_Null_Mutex in the map
02021 // do _add_ref here not in map->rebind
02022 
02023   if (valuetype_factory_map_ == 0)
02024     {
02025       // currently the ValueFactory_Map is a singleton and not per ORB
02026       // as in the OMG specs
02027       valuetype_factory_map_ = TAO_VALUEFACTORY_MAP::instance ();
02028       if (valuetype_factory_map_ == 0)
02029         ACE_THROW_RETURN (CORBA::INTERNAL (), 0);
02030     }
02031 
02032   int result = valuetype_factory_map_->rebind (repository_id, factory);
02033   if (result == -1)
02034     {
02035       // Error on bind.
02036       ACE_THROW_RETURN (CORBA::INTERNAL (), 0);
02037     }
02038   if (result == 1)
02039     {
02040       return factory;    // previous factory was found
02041     }
02042   return 0;
02043 }

CORBA_Object_ptr CORBA_ORB::resolve_initial_references const char *    name,
ACE_Time_Value *timeout    ACE_ENV_ARG_DECL_WITH_DEFAULTS
 

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 that by using a default value for the <timeout> parameter, TAO will remains compliant with the CORBA <resolve_initial_references> specification.

Definition at line 1044 of file ORB.cpp.

References ACE_CHECK_RETURN, ACE_CString, ACE_ENV_ARG_PARAMETER, ACE_ENV_SINGLE_ARG_PARAMETER, ACE_THROW_RETURN, check_shutdown, IMPLREPOSERVICE, TAO_ORB_Core::init_ref_map, INTERFACEREPOSERVICE, CORBA::is_nil, NAMESERVICE, TAO_ORB_Core::object_ref_table, orb_core, orb_core_, TAO_ORB_Core::resolve_dynanyfactory, TAO_Object_Ref_Table::resolve_initial_references, TAO_ORB_Core::resolve_ior_manipulation, TAO_ORB_Core::resolve_ior_table, resolve_poa_current, resolve_policy_current, resolve_policy_manager, TAO_ORB_Core::resolve_rir, resolve_root_poa, resolve_service, TAO_ORB_Core::resolve_typecodefactory, set_timeout, ACE_OS_String::strcmp, string_to_object, TAO_OBJID_DYNANYFACTORY, TAO_OBJID_IMPLREPOSERVICE, TAO_OBJID_INTERFACEREP, TAO_OBJID_IORMANIPULATION, TAO_OBJID_IORTABLE, TAO_OBJID_NAMESERVICE, TAO_OBJID_POACURRENT, TAO_OBJID_POLICYCURRENT, TAO_OBJID_POLICYMANAGER, TAO_OBJID_ROOTPOA, TAO_OBJID_TRADINGSERVICE, TAO_OBJID_TYPECODEFACTORY, and TRADINGSERVICE.

01047 {
01048   // This method should not be called if the ORB has been shutdown.
01049   this->check_shutdown (ACE_ENV_SINGLE_ARG_PARAMETER);
01050   ACE_CHECK_RETURN (CORBA::Object::_nil ());
01051 
01052   if (ACE_OS::strcmp (name, TAO_OBJID_ROOTPOA) == 0)
01053     return this->resolve_root_poa (ACE_ENV_SINGLE_ARG_PARAMETER);
01054 
01055   else if (ACE_OS::strcmp (name, TAO_OBJID_POACURRENT) == 0)
01056     return this->resolve_poa_current (ACE_ENV_SINGLE_ARG_PARAMETER);
01057 
01058   else if (ACE_OS::strcmp (name, TAO_OBJID_POLICYMANAGER) == 0)
01059     return this->resolve_policy_manager (ACE_ENV_SINGLE_ARG_PARAMETER);
01060 
01061   else if (ACE_OS::strcmp (name, TAO_OBJID_POLICYCURRENT) == 0)
01062     return this->resolve_policy_current (ACE_ENV_SINGLE_ARG_PARAMETER);
01063 
01064   else if (ACE_OS::strcmp (name, TAO_OBJID_IORMANIPULATION) == 0)
01065     return this->orb_core ()->resolve_ior_manipulation (ACE_ENV_SINGLE_ARG_PARAMETER);
01066 
01067   else if (ACE_OS::strcmp (name, TAO_OBJID_IORTABLE) == 0)
01068     return this->orb_core ()->resolve_ior_table (ACE_ENV_SINGLE_ARG_PARAMETER);
01069 
01070   else if (ACE_OS::strcmp (name, TAO_OBJID_DYNANYFACTORY) == 0)
01071     return this->orb_core ()->resolve_dynanyfactory (ACE_ENV_SINGLE_ARG_PARAMETER);
01072 
01073   else if (ACE_OS::strcmp (name, TAO_OBJID_TYPECODEFACTORY) == 0)
01074     return this->orb_core ()->resolve_typecodefactory (ACE_ENV_SINGLE_ARG_PARAMETER);
01075 
01076 
01077   // -----------------------------------------------------------------
01078 
01079   // Search the object reference table.  This search must occur before
01080   // the InitRef table search, since it may contain local objects.
01081   CORBA::Object_var result =
01082     this->orb_core ()->object_ref_table ().resolve_initial_references (
01083       name
01084       ACE_ENV_ARG_PARAMETER);
01085   ACE_CHECK_RETURN (CORBA::Object::_nil ());
01086 
01087   if (!CORBA::is_nil (result.in ()))
01088     return result._retn ();
01089 
01090   // -----------------------------------------------------------------
01091 
01092   // Check ORBInitRef options.
01093   ACE_CString ior;
01094   ACE_CString object_id ((const char *) name);
01095 
01096   // Is the service name in the IOR Table.
01097   if (this->orb_core_->init_ref_map ()->find (object_id, ior) == 0)
01098     return this->string_to_object (ior.c_str ()
01099                                    ACE_ENV_ARG_PARAMETER);
01100 
01101   // May be trying the explicitly specified services and the well
01102   // known services should be tried first before falling on to default
01103   // services.
01104 
01105   // Set the timeout value.
01106   this->set_timeout (timeout);
01107 
01108   if (ACE_OS::strcmp (name, TAO_OBJID_NAMESERVICE) == 0)
01109     {
01110       result = this->resolve_service (NAMESERVICE
01111                                       ACE_ENV_ARG_PARAMETER);
01112       ACE_CHECK_RETURN (CORBA::Object::_nil ());
01113 
01114       if (!CORBA::is_nil (result.in ()))
01115         return result._retn ();
01116     }
01117   else if (ACE_OS::strcmp (name, TAO_OBJID_TRADINGSERVICE) == 0)
01118     {
01119       result = this->resolve_service (TRADINGSERVICE
01120                                       ACE_ENV_ARG_PARAMETER);
01121       ACE_CHECK_RETURN (CORBA::Object::_nil ());
01122 
01123       if (!CORBA::is_nil (result.in ()))
01124         return result._retn ();
01125     }
01126   else if (ACE_OS::strcmp (name, TAO_OBJID_IMPLREPOSERVICE) == 0)
01127     {
01128       result = this->resolve_service (IMPLREPOSERVICE
01129                                       ACE_ENV_ARG_PARAMETER);
01130       ACE_CHECK_RETURN (CORBA::Object::_nil ());
01131 
01132       if (!CORBA::is_nil (result.in ()))
01133         return result._retn ();
01134     }
01135   else if (ACE_OS::strcmp (name, TAO_OBJID_INTERFACEREP) == 0)
01136     {
01137       result = this->resolve_service (INTERFACEREPOSERVICE
01138                                       ACE_ENV_ARG_PARAMETER);
01139       ACE_CHECK_RETURN (CORBA::Object::_nil ());
01140 
01141       if (!CORBA::is_nil (result.in ()))
01142         return result._retn ();
01143     }
01144 
01145   // Is not one of the well known services, try to find it in the
01146   // InitRef table....check the defaultinitref values also.
01147 
01148   result = this->orb_core ()->resolve_rir (name ACE_ENV_ARG_PARAMETER);
01149   ACE_CHECK_RETURN (CORBA::Object::_nil ());
01150 
01151   if (!CORBA::is_nil (result.in ()))
01152     return result._retn ();
01153   // -----------------------------------------------------------------
01154 
01155   ACE_THROW_RETURN (CORBA::ORB::InvalidName (), CORBA::Object::_nil ());
01156 }

CORBA_Object_ptr CORBA_ORB::resolve_initial_references const char *name    ACE_ENV_ARG_DECL_WITH_DEFAULTS
 

Definition at line 1035 of file ORB.cpp.

References ACE_ENV_ARG_PARAMETER.

01037 {
01038   return this->resolve_initial_references (name,
01039                                            0
01040                                            ACE_ENV_ARG_PARAMETER);
01041 }

CORBA_Object_ptr CORBA_ORB::resolve_poa_current ACE_ENV_SINGLE_ARG_DECL    [protected]
 

Resolve the POA current.

Definition at line 886 of file ORB.cpp.

References ACE_ENV_SINGLE_ARG_DECL_NOT_USED, orb_core_, and TAO_ORB_Core::poa_current.

Referenced by resolve_initial_references.

00887 {
00888   return this->orb_core_->poa_current ();
00889 }

CORBA_Object_ptr CORBA_ORB::resolve_policy_current ACE_ENV_SINGLE_ARG_DECL_NOT_USED    [protected]
 

Resolve the Policy Current for this thread.

Definition at line 913 of file ORB.cpp.

References CORBA_Object::_duplicate, CORBA_Object::_nil, ACE_ENV_SINGLE_ARG_DECL_NOT_USED, orb_core_, and TAO_ORB_Core::policy_current.

Referenced by resolve_initial_references.

00914 {
00915 
00916 #if (TAO_HAS_CORBA_MESSAGING == 1)
00917 
00918   TAO_Policy_Current &policy_current = this->orb_core_->policy_current ();
00919   return CORBA_Object::_duplicate (&policy_current);
00920 
00921 #else
00922 
00923   return CORBA_Object::_nil ();
00924 
00925 #endif /* TAO_HAS_CORBA_MESSAGING == 1 */
00926 }

CORBA_Object_ptr CORBA_ORB::resolve_policy_manager ACE_ENV_SINGLE_ARG_DECL_NOT_USED    [protected]
 

Resolve the Policy Manager for this ORB.

Definition at line 892 of file ORB.cpp.

References CORBA_Object::_duplicate, CORBA_Object::_nil, ACE_ENV_SINGLE_ARG_DECL_NOT_USED, orb_core_, and TAO_ORB_Core::policy_manager.

Referenced by resolve_initial_references.

00893 {
00894 
00895 #if (TAO_HAS_CORBA_MESSAGING == 1)
00896 
00897   TAO_Policy_Manager *policy_manager =
00898     this->orb_core_->policy_manager ();
00899   if (policy_manager == 0)
00900     return CORBA_Object::_nil ();
00901 
00902   return CORBA_Object::_duplicate (policy_manager);
00903 
00904 #else
00905 
00906   return CORBA_Object::_nil ();
00907 
00908 #endif /* TAO_HAS_CORBA_MESSAGING == 1 */
00909 
00910 }

CORBA_Object_ptr CORBA_ORB::resolve_root_poa ACE_ENV_SINGLE_ARG_DECL   
 

Resolve the POA.

Definition at line 880 of file ORB.cpp.

References ACE_ENV_SINGLE_ARG_DECL, ACE_ENV_SINGLE_ARG_PARAMETER, orb_core_, and TAO_ORB_Core::root_poa.

Referenced by resolve_initial_references.

00881 {
00882   return this->orb_core_->root_poa (ACE_ENV_SINGLE_ARG_PARAMETER);
00883 }

CORBA::Object_ptr CORBA_ORB::resolve_service TAO_MCAST_SERVICEID service_id    ACE_ENV_ARG_DECL [private]
 

Resolve the given service based on the service ID.

Referenced by resolve_initial_references.

void CORBA_ORB::run ACE_Time_Value *tv    ACE_ENV_ARG_DECL_WITH_DEFAULTS
 

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 run-time, 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.

Definition at line 222 of file ORB.cpp.

References ACE_CHECK, ACE_ENV_ARG_PARAMETER, ACE_ENV_SINGLE_ARG_PARAMETER, check_shutdown, orb_core, and TAO_ORB_Core::run.

00224 {
00225   this->check_shutdown (ACE_ENV_SINGLE_ARG_PARAMETER);
00226   ACE_CHECK;
00227 
00228   this->orb_core ()->run (tv, 0 ACE_ENV_ARG_PARAMETER);
00229 }

void CORBA_ORB::run ACE_Time_Value &tv    ACE_ENV_ARG_DECL_WITH_DEFAULTS
 

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 run-time, a CORBA system exception will be thrown. <tv> is reduced by the amount of time spent in this call.

Definition at line 216 of file ORB.cpp.

References ACE_ENV_ARG_PARAMETER, and run.

00217 {
00218   this->run (&tv ACE_ENV_ARG_PARAMETER);
00219 }

void CORBA_ORB::run ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS   
 

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 run-time, a CORBA system exception will be thrown.

Definition at line 210 of file ORB.cpp.

References ACE_ENV_ARG_PARAMETER, and ACE_ENV_SINGLE_ARG_DECL.

Referenced by run.

00211 {
00212   this->run (0 ACE_ENV_ARG_PARAMETER);
00213 }

void CORBA_ORB::send_multiple_requests_deferred const CORBA_ORB_RequestSeq &req    ACE_ENV_ARG_DECL_WITH_DEFAULTS
 

void CORBA_ORB::send_multiple_requests_oneway const CORBA_ORB_RequestSeq &req    ACE_ENV_ARG_DECL_WITH_DEFAULTS
 

void CORBA_ORB::set_timeout ACE_Time_Value   timeout [private]
 

Set the timeout value.

Definition at line 2006 of file ORB.cpp.

References timeout_.

Referenced by resolve_initial_references.

02007 {
02008   this->timeout_ = timeout;
02009 }

void CORBA_ORB::shutdown CORBA::Boolean    wait_for_completion = 0 ACE_ENV_ARG_DECL_WITH_DEFAULTS
 

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 165 of file ORB.cpp.

References ACE_CHECK, ACE_ENV_ARG_PARAMETER, ACE_ENV_SINGLE_ARG_PARAMETER, check_shutdown, orb_core, and TAO_ORB_Core::shutdown.

00167 {
00168   // We cannot lock the exceptions here. We need to propogate
00169   // BAD_INV_ORDER  exceptions if needed to the caller. Locking
00170   // exceptions down would render us non-compliant with the spec.
00171   this->check_shutdown (ACE_ENV_SINGLE_ARG_PARAMETER);
00172   ACE_CHECK;
00173 
00174   this->orb_core ()->shutdown (wait_for_completion
00175                                ACE_ENV_ARG_PARAMETER);
00176 }

CORBA::Object_ptr CORBA_ORB::string_to_object const char *str    ACE_ENV_ARG_DECL_WITH_DEFAULTS
 

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 1712 of file ORB.cpp.

References CORBA_SystemException::_tao_minor_code, ACE_CHECK_RETURN, ACE_ENV_ARG_PARAMETER, ACE_ENV_SINGLE_ARG_PARAMETER, ACE_THROW_RETURN, check_shutdown, ior_prefix, ior_string_to_object, TAO_Parser_Registry::match_parser, orb_core_, TAO_IOR_Parser::parse_string, TAO_ORB_Core::parser_registry, ACE_OS_String::strncmp, TAO_DEFAULT_MINOR_CODE, and url_ior_string_to_object.

Referenced by resolve_initial_references.

01714 {
01715   // This method should not be called if the ORB has been shutdown.
01716   this->check_shutdown (ACE_ENV_SINGLE_ARG_PARAMETER);
01717   ACE_CHECK_RETURN (CORBA::Object::_nil ());
01718 
01719   // Check for NULL pointer
01720   if (str == 0)
01721     ACE_THROW_RETURN (CORBA::INV_OBJREF (
01722                         CORBA_SystemException::_tao_minor_code (
01723                           TAO_DEFAULT_MINOR_CODE,
01724                           EINVAL),
01725                         CORBA::COMPLETED_NO),
01726                       CORBA::Object::_nil ());
01727 
01728   TAO_IOR_Parser *ior_parser =
01729     this->orb_core_->parser_registry ()->match_parser (str);
01730 
01731   if (ior_parser != 0)
01732     {
01733       return ior_parser->parse_string (str,
01734                                        this
01735                                        ACE_ENV_ARG_PARAMETER);
01736     }
01737 
01738 
01739   if (ACE_OS::strncmp (str,
01740                        ior_prefix,
01741                        sizeof ior_prefix - 1) == 0)
01742     return this->ior_string_to_object (str + sizeof ior_prefix - 1
01743                                        ACE_ENV_ARG_PARAMETER);
01744   else
01745     return this->url_ior_string_to_object (str ACE_ENV_ARG_PARAMETER);
01746 }

void CORBA_ORB::unregister_value_factory const char *repository_id    ACE_ENV_ARG_DECL_WITH_DEFAULTS
 

CORBA::Object_ptr CORBA_ORB::url_ior_string_to_object const char *ior    ACE_ENV_ARG_DECL [private]
 

Convert an URL style IOR into an object reference.

Referenced by string_to_object.

CORBA::Boolean CORBA_ORB::work_pending ACE_Time_Value &tv    ACE_ENV_ARG_DECL_WITH_DEFAULTS
 

Returns an indication of whether the ORB needs to perform some work but will look for work pending for no more than the specified time. This is useful for implementing an event loop with an idle timeout.

Definition at line 255 of file ORB.cpp.

References ACE_CHECK_RETURN, ACE_ENV_SINGLE_ARG_PARAMETER, ACE_THROW_RETURN, check_shutdown, ETIME, orb_core_, TAO_ORB_Core::reactor, and ACE_Reactor::work_pending.

00256 {
00257   // This method should not be called if the ORB has been shutdown.
00258   this->check_shutdown (ACE_ENV_SINGLE_ARG_PARAMETER);
00259   ACE_CHECK_RETURN (0);
00260 
00261   int result = this->orb_core_->reactor ()->work_pending (tv);
00262   if (result == 0 || (result == -1 && errno == ETIME))
00263     return 0;
00264 
00265   if (result == -1)
00266     ACE_THROW_RETURN (CORBA::INTERNAL (), 0);
00267 
00268   return 1;
00269 }

CORBA::Boolean CORBA_ORB::work_pending ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS   
 

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

Definition at line 272 of file ORB.cpp.

References ACE_CHECK_RETURN, ACE_ENV_SINGLE_ARG_DECL, ACE_ENV_SINGLE_ARG_PARAMETER, ACE_THROW_RETURN, check_shutdown, orb_core_, TAO_ORB_Core::reactor, and ACE_Reactor::work_pending.

00273 {
00274   // This method should not be called if the ORB has been shutdown.
00275   this->check_shutdown (ACE_ENV_SINGLE_ARG_PARAMETER);
00276   ACE_CHECK_RETURN (0);
00277 
00278   int result = this->orb_core_->reactor ()->work_pending ();
00279   if (result == 0)
00280     return 0;
00281 
00282   if (result == -1)
00283     ACE_THROW_RETURN (CORBA::INTERNAL (), 0);
00284 
00285   return 1;
00286 }


Friends And Related Function Documentation

friend class TAO_ORB_Core [friend]
 

Definition at line 75 of file ORB.h.

TAO_Export TAO_ORB_Core* TAO_ORB_Core_instance void    [friend]
 

Definition at line 2786 of file ORB_Core.cpp.

02787 {
02788   // @@ This is a slight violation of layering, we should use
02789   //    TAO_ORB_Core_instance(), but that breaks during startup.
02790   TAO_ORB_Table *orb_table = TAO_ORB_Table::instance ();
02791   if (orb_table->first_orb () == 0)
02792     {
02793       ACE_MT (ACE_GUARD_RETURN (TAO_SYNCH_RECURSIVE_MUTEX, guard,
02794                                 *ACE_Static_Object_Lock::instance (), 0));
02795 
02796       if (orb_table->first_orb () == 0)
02797         {
02798           // Calling CORBA::ORB_init() returns a duplicated ORB
02799           // reference, so make sure that reference is stored in an
02800           // ORB_var so that no leak occurs.  The duplicate ORB
02801           // reference isn't needed outside the scope of this function
02802           // since the corresponding ORB Core instance will still
02803           // exist in the ORB table after the ORB reference is
02804           // destroyed.
02805 
02806           CORBA::ORB_var orb;
02807 
02808           int argc = 0;
02809           ACE_DECLARE_NEW_CORBA_ENV;
02810           ACE_TRY
02811             {
02812               orb = CORBA::ORB_init (argc, 0, 0 ACE_ENV_ARG_PARAMETER);
02813               ACE_TRY_CHECK;
02814             }
02815           ACE_CATCHANY
02816             {
02817               // @@ What should we do here?
02818             }
02819           ACE_ENDTRY;
02820         }
02821     }
02822 
02823   return orb_table->first_orb ();
02824 }


Member Data Documentation

TAO_NAMESPACE_END TAO_NAMESPACE_END TAO_NAMESPACE_END CORBA::TypeCode_ptr CORBA_ORB::_tc_ObjectId = 0 [static]
 

Definition at line 173 of file Typecode_Constants.cpp.

Referenced by TAO_TypeCodes::fini, and TAO_TypeCodes::init.

CORBA::TypeCode_ptr CORBA_ORB::_tc_ObjectIdList [static]
 

Definition at line 114 of file ORB.h.

TAO_SYNCH_MUTEX CORBA_ORB::lock_ [private]
 

lock required for mutual exclusion between multiple threads.

Definition at line 547 of file ORB.h.

Referenced by _incr_refcnt.

TAO_ORB_Core* CORBA_ORB::orb_core_ [private]
 

The ORB_Core that created us....

Definition at line 558 of file ORB.h.

Referenced by _optimize_collocation_objects, destroy, object_to_string, orb_core, register_initial_reference, resolve_initial_references, resolve_poa_current, resolve_policy_current, resolve_policy_manager, resolve_root_poa, string_to_object, and work_pending.

int CORBA_ORB::orb_init_count_ = 0 [static, private]
 

Count of the number of times that <ORB_init> has been called.

Definition at line 63 of file ORB.cpp.

u_int CORBA_ORB::refcount_ [private]
 

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

Definition at line 551 of file ORB.h.

Referenced by _decr_refcnt, and _incr_refcnt.

ACE_Time_Value* CORBA_ORB::timeout_ [private]
 

Timeout value.

Definition at line 571 of file ORB.h.

Referenced by get_timeout, and set_timeout.

CORBA::Boolean CORBA_ORB::use_omg_ior_format_ [private]
 

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

Definition at line 564 of file ORB.h.

Referenced by _use_omg_ior_format.

TAO_ValueFactory_Map* CORBA_ORB::valuetype_factory_map_ [private]
 

If non-0 then this is the Factory for OBV unmarshaling.

Definition at line 561 of file ORB.h.

Referenced by lookup_value_factory, and register_value_factory.


The documentation for this class was generated from the following files:
Generated on Mon Jun 16 15:01:36 2003 for TAO by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002