TAO  2.3.2
Public Member Functions | List of all members
TAO_DLL_Parser Class Reference

Implment the parser for the DLL-style IORs. More...

#include <DLL_Parser.h>

Inheritance diagram for TAO_DLL_Parser:
Inheritance graph
[legend]
Collaboration diagram for TAO_DLL_Parser:
Collaboration graph
[legend]

Public Member Functions

virtual ~TAO_DLL_Parser (void)
 The destructor. More...
 
virtual bool match_prefix (const char *ior_string) const
 
virtual CORBA::Object_ptr parse_string (const char *ior, CORBA::ORB_ptr orb)
 
- Public Member Functions inherited from TAO_IOR_Parser
virtual ~TAO_IOR_Parser (void)
 The destructor. More...
 
- Public Member Functions inherited from ACE_Service_Object
 ACE_Service_Object (ACE_Reactor *=0)
 
virtual ~ACE_Service_Object (void)
 
virtual int suspend (void)
 
virtual int resume (void)
 
- Public Member Functions inherited from ACE_Event_Handler
virtual ~ACE_Event_Handler (void)
 
virtual ACE_HANDLE get_handle (void) const
 
virtual void set_handle (ACE_HANDLE)
 
virtual int priority (void) const
 
virtual void priority (int priority)
 
virtual int handle_input (ACE_HANDLE fd=ACE_INVALID_HANDLE)
 
virtual int handle_output (ACE_HANDLE fd=ACE_INVALID_HANDLE)
 
virtual int handle_exception (ACE_HANDLE fd=ACE_INVALID_HANDLE)
 
virtual int handle_timeout (const ACE_Time_Value &current_time, const void *act=0)
 
virtual int handle_exit (ACE_Process *)
 
virtual int handle_close (ACE_HANDLE handle, ACE_Reactor_Mask close_mask)
 
virtual int handle_signal (int signum, siginfo_t *=0, ucontext_t *=0)
 
virtual int resume_handler (void)
 
virtual int handle_qos (ACE_HANDLE=ACE_INVALID_HANDLE)
 
virtual int handle_group_qos (ACE_HANDLE=ACE_INVALID_HANDLE)
 
virtual void reactor (ACE_Reactor *reactor)
 
virtual ACE_Reactorreactor (void) const
 
virtual ACE_Reactor_Timer_Interfacereactor_timer_interface (void) const
 
virtual Reference_Count add_reference (void)
 
virtual Reference_Count remove_reference (void)
 
Reference_Counting_Policyreference_counting_policy (void)
 
- Public Member Functions inherited from ACE_Shared_Object
 ACE_Shared_Object (void)
 
virtual ~ACE_Shared_Object (void)
 
virtual int init (int argc, ACE_TCHAR *argv[])
 
virtual int fini (void)
 
virtual int info (ACE_TCHAR **info_string, size_t length=0) const
 

Additional Inherited Members

- Public Types inherited from ACE_Event_Handler
typedef long Reference_Count
 
- Static Public Member Functions inherited from ACE_Event_Handler
static ACE_THR_FUNC_RETURN read_adapter (void *event_handler)
 
static int register_stdin_handler (ACE_Event_Handler *eh, ACE_Reactor *reactor, ACE_Thread_Manager *thr_mgr, int flags=THR_DETACHED)
 
static int remove_stdin_handler (ACE_Reactor *reactor, ACE_Thread_Manager *thr_mgr)
 
- Public Attributes inherited from ACE_Event_Handler
 LO_PRIORITY
 
 HI_PRIORITY
 
 NULL_MASK
 
 READ_MASK
 
 WRITE_MASK
 
 EXCEPT_MASK
 
 ACCEPT_MASK
 
 CONNECT_MASK
 
 TIMER_MASK
 
 QOS_MASK
 
 GROUP_QOS_MASK
 
 SIGNAL_MASK
 
 ALL_EVENTS_MASK
 
 RWE_MASK
 
 DONT_CALL
 
 ACE_EVENT_HANDLER_NOT_RESUMED
 
 ACE_REACTOR_RESUMES_HANDLER
 
 ACE_APPLICATION_RESUMES_HANDLER
 
- Protected Types inherited from ACE_Event_Handler
typedef ACE_Atomic_Op< ACE_SYNCH_MUTEX, Reference_CountAtomic_Reference_Count
 
- Protected Member Functions inherited from ACE_Event_Handler
 ACE_Event_Handler (ACE_Reactor *=0, int priority=ACE_Event_Handler::LO_PRIORITY)
 
- Protected Attributes inherited from ACE_Event_Handler
Atomic_Reference_Count reference_count_
 

Detailed Description

Implment the parser for the DLL-style IORs.

The DLL-style IORs allows applications to transparently load object implementations. The ORB can parse an IOR in the format:

DLL:Service_Name

the string_to_object() function will use ACE's Service Configurator framework to dynamically load the service named 'Service_Name' using all the normal platform-independent naming conventions and environment variable lookup rules that are normally used by ACE_DLL::open(). The ORB assumes that this service implements the TAO_Object_Loader interface, and uses that interface to create a new object implementation locally. The object reference for this local object is returned to the application.

This can be used in applications that sometimes require local object while other times they may use a remote implementation. For example, the application could be configured to use a remote Event Service or to dynamically load an Event Service implementation and use the local copy instead. The local Event Service would federate to its remote peers to work as-if a single Event Service was in place.

Such an application could be written as follows:

int main (int argc, char* argv) { CORBA::ORB_var orb = CORBA::ORB_init(argc, argv);

CORBA::Object_var object = orb->resolve_initial_references("EventService"); // Use <object> here... }

if the application is invoked using:

$ program -ORBInitRef EventService=IOR:....

then a remote event service is used, but the application could also be invoked using:

$ program -ORBInitRef EventService=DLL:Event_Service_Loader

In this case the Event_Service implementation will be dynamically loaded without any modifications to the application code.

Constructor & Destructor Documentation

TAO_DLL_Parser::~TAO_DLL_Parser ( void  )
virtual

The destructor.

Member Function Documentation

bool TAO_DLL_Parser::match_prefix ( const char *  ior_string) const
virtual

Return true if ior_string starts with a prefix known to this IOR parser

Implements TAO_IOR_Parser.

CORBA::Object_ptr TAO_DLL_Parser::parse_string ( const char *  ior,
CORBA::ORB_ptr  orb 
)
virtual

Parse the ior argument and return an object reference. The call may raise the standard system exceptions (NO_MEMORY, INV_OBJREF, etc.)

Implements TAO_IOR_Parser.


The documentation for this class was generated from the following files: