Classes | Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Member Functions | Private Member Functions | Private Attributes

CORBA::ORB Class Reference

ORB pseudo-object. More...

#include <ORB.h>

Collaboration diagram for CORBA::ORB:
Collaboration graph
[legend]

List of all members.

Classes

class  InvalidName

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_ObjectIdList * ObjectIdList_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::Object_ptr unregister_initial_reference (const char *id)
 Unregister 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_refcount (void)
 Reference counting...
unsigned long _decr_refcount (void)
unsigned long _refcount (void) const
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

static CORBA::ORB_ptr _duplicate (CORBA::ORB_ptr orb)
 Return a duplicate of orb.
static CORBA::ORB_ptr _nil (void)
static CORBA::ORB_ptr _tao_make_ORB (TAO_ORB_Core *orb_core)
 Factory method that creates an ORB.

Static Public Attributes

static CORBA::TypeCode_ptr const _tc_ObjectId
static 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.


Member Typedef Documentation

typedef char* CORBA::ORB::ObjectId
typedef CORBA::ORB_ObjectIdList CORBA::ORB::ObjectIdList
typedef CORBA::ORB_ObjectIdList* CORBA::ORB::ObjectIdList_ptr

Constructor & Destructor Documentation

CORBA::ORB::ORB ( TAO_ORB_Core orb_core ) [protected]
CORBA::ORB::~ORB ( void   ) [protected]

Destructor.

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

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.

unsigned long CORBA::ORB::_decr_refcount ( void   )
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().

unsigned long CORBA::ORB::_incr_refcount ( void   )

Reference counting...

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.

unsigned long CORBA::ORB::_refcount ( void   ) const
CORBA::ORB_ptr CORBA::ORB::_tao_make_ORB ( TAO_ORB_Core orb_core ) [static]

Factory method that creates an ORB.

CORBA::Boolean CORBA::ORB::_use_omg_ior_format ( void   )

Get the IOR flag.

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

Set the IOR flag.

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

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

CORBA::TypeCode_ptr CORBA::ORB::create_abstract_interface_tc ( const char *  id,
const char *  name 
)
CORBA::TypeCode_ptr CORBA::ORB::create_alias_tc ( const char *  id,
const char *  name,
CORBA::TypeCode_ptr  original_type 
)
CORBA::TypeCode_ptr CORBA::ORB::create_array_tc ( CORBA::ULong  length,
CORBA::TypeCode_ptr  element_type 
)
CORBA::TypeCode_ptr CORBA::ORB::create_component_tc ( const char *  id,
const char *  name 
)
void CORBA::ORB::create_context_list ( CORBA::ContextList_ptr ctxtlist )
CORBA::TypeCode_ptr CORBA::ORB::create_enum_tc ( const char *  id,
const char *  name,
const CORBA::EnumMemberSeq &  members 
)
void CORBA::ORB::create_environment ( CORBA::Environment_ptr new_env )
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 
)
void CORBA::ORB::create_exception_list ( CORBA::ExceptionList_ptr exclist )
CORBA::TypeCode_ptr CORBA::ORB::create_exception_tc ( const char *  id,
const char *  name,
const CORBA::StructMemberSeq &  members 
)
CORBA::TypeCode_ptr CORBA::ORB::create_fixed_tc ( CORBA::UShort  digits,
CORBA::UShort  scale 
)
CORBA::TypeCode_ptr CORBA::ORB::create_home_tc ( const char *  id,
const char *  name 
)
CORBA::TypeCode_ptr CORBA::ORB::create_interface_tc ( const char *  id,
const char *  name 
)
void CORBA::ORB::create_list ( CORBA::Long  count,
CORBA::NVList_ptr new_list 
)
CORBA::TypeCode_ptr CORBA::ORB::create_local_interface_tc ( const char *  id,
const char *  name 
)
void CORBA::ORB::create_named_value ( CORBA::NamedValue_ptr nmval )
CORBA::TypeCode_ptr CORBA::ORB::create_native_tc ( const char *  id,
const char *  name 
)
void CORBA::ORB::create_operation_list ( CORBA::OperationDef_ptr  opDef,
CORBA::NVList_ptr result 
)
CORBA::Policy_ptr CORBA::ORB::create_policy ( CORBA::PolicyType  type,
const CORBA::Any &  val 
)
CORBA::TypeCode_ptr CORBA::ORB::create_recursive_tc ( const char *  id )
CORBA::TypeCode_ptr CORBA::ORB::create_sequence_tc ( CORBA::ULong  bound,
CORBA::TypeCode_ptr  element_type 
)
CORBA::TypeCode_ptr CORBA::ORB::create_string_tc ( CORBA::ULong  bound )
CORBA::TypeCode_ptr CORBA::ORB::create_struct_tc ( const char *  id,
const char *  name,
const CORBA::StructMemberSeq &  members 
)

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 
)
CORBA::TypeCode_ptr CORBA::ORB::create_value_box_tc ( const char *  id,
const char *  name,
CORBA::TypeCode_ptr  boxed_type 
)
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 
)
CORBA::TypeCode_ptr CORBA::ORB::create_wstring_tc ( CORBA::ULong  bound )
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.

void CORBA::ORB::get_default_context ( CORBA::Context_ptr ctx )
void CORBA::ORB::get_next_response ( CORBA::Request_ptr req )
CORBA::Boolean CORBA::ORB::get_service_information ( CORBA::ServiceType  service_type,
CORBA::ServiceInformation_out  service_information 
)
ACE_Time_Value * CORBA::ORB::get_timeout ( void   )

Get the Timeout value.

char * CORBA::ORB::id ( void   )

Return this ORB's ORBid.

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

Convert an OMG IOR into an object reference.

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.

CORBA::ValueFactory CORBA::ORB::lookup_value_factory ( const char *  repository_id )
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.

ORB& CORBA::ORB::operator= ( const ORB  ) [private]
TAO_ORB_Core * CORBA::ORB::orb_core ( void   ) const

Get the ORB core.

void CORBA::ORB::perform_work ( ACE_Time_Value tv )
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().

void CORBA::ORB::perform_work ( ACE_Time_Value tv )
CORBA::Boolean CORBA::ORB::poll_next_response ( void   )
void CORBA::ORB::register_initial_reference ( const char *  id,
CORBA::Object_ptr  obj 
)

Register an object reference with the ORB.

CORBA::ValueFactory CORBA::ORB::register_value_factory ( const char *  repository_id,
CORBA::ValueFactory  factory 
)
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 @c 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.
CORBA::Object_ptr CORBA::ORB::resolve_policy_current ( void   ) [protected]

Resolve the Policy Current for this thread.

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

Resolve the Policy Manager for this ORB.

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().

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 times out and returns, any invocations showing up on the server will be buffered by TCP.

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.

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.

void CORBA::ORB::send_multiple_requests_deferred ( const CORBA::RequestSeq req )
void CORBA::ORB::send_multiple_requests_oneway ( const CORBA::RequestSeq req )
void CORBA::ORB::set_timeout ( ACE_Time_Value timeout ) [private]

Set the timeout value.

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.

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.

CORBA::Object_ptr CORBA::ORB::unregister_initial_reference ( const char *  id )

Unregister an object reference with the ORB.

void CORBA::ORB::unregister_value_factory ( const char *  repository_id )
CORBA::Object_ptr CORBA::ORB::url_ior_string_to_object ( const char *  ior ) [private]

Convert an URL style IOR into an object reference.

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

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.

Note:
This is useful for implementing an event loop with an idle timeout.
CORBA::Boolean CORBA::ORB::work_pending ( void   )

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


Member Data Documentation

The ORB_Core that created us....

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

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

Timeout value.

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


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines