ImR_Activator_Loader Class Reference

#include <Activator_Loader.h>

Inheritance diagram for ImR_Activator_Loader:

Inheritance graph
[legend]
Collaboration diagram for ImR_Activator_Loader:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 ImR_Activator_Loader (void)
virtual int init (int argc, ACE_TCHAR *argv[])
virtual int fini (void)
virtual CORBA::Object_ptr create_object (CORBA::ORB_ptr orb, int argc, ACE_TCHAR *argv[]) throw (CORBA::SystemException)
int run (void)

Private Member Functions

 ImR_Activator_Loader (const ImR_Activator_Loader &)
ImR_Activator_Loaderoperator= (const ImR_Activator_Loader &)

Private Attributes

ImR_Activator_i service_
Activator_Options opts_
ACE_Auto_Ptr< ImR_Activator_ORB_Runnerrunner_

Constructor & Destructor Documentation

ImR_Activator_Loader::ImR_Activator_Loader void   ) 
 

Definition at line 23 of file Activator_Loader.cpp.

00024 {
00025 }

ImR_Activator_Loader::ImR_Activator_Loader const ImR_Activator_Loader  )  [private]
 


Member Function Documentation

virtual CORBA::Object_ptr ImR_Activator_Loader::create_object CORBA::ORB_ptr  orb,
int  argc,
ACE_TCHAR argv[]
throw (CORBA::SystemException) [virtual]
 

Implements TAO_Object_Loader.

int ImR_Activator_Loader::fini void   )  [virtual]
 

Reimplemented from ACE_Shared_Object.

Definition at line 62 of file Activator_Loader.cpp.

References ACE_ASSERT, ACE_CATCHANY, ACE_DECLARE_NEW_CORBA_ENV, ACE_ENDTRY, ACE_ENV_SINGLE_ARG_PARAMETER, ACE_TRY, ACE_TRY_CHECK, ImR_Activator_i::fini(), ACE_Auto_Basic_Ptr< X >::reset(), and runner_.

00063 {
00064   ACE_ASSERT (this->runner_.get() != 0);
00065   ACE_DECLARE_NEW_CORBA_ENV;
00066   ACE_TRY
00067     {
00068       int ret = this->service_.fini (ACE_ENV_SINGLE_ARG_PARAMETER);
00069       ACE_TRY_CHECK;
00070 
00071       this->runner_->wait ();
00072       this->runner_.reset (0);
00073       return ret;
00074     }
00075   ACE_CATCHANY
00076     {
00077       return -1;
00078     }
00079   ACE_ENDTRY;
00080 }

int ImR_Activator_Loader::init int  argc,
ACE_TCHAR argv[]
[virtual]
 

Reimplemented from ACE_Shared_Object.

Definition at line 34 of file Activator_Loader.cpp.

References ACE_ASSERT, ACE_CATCHANY, ACE_ENDTRY, ACE_ENV_ARG_PARAMETER, ACE_TRY, ACE_TRY_CHECK, ImR_Activator_i::init(), Activator_Options::init(), ACE_Auto_Basic_Ptr< X >::reset(), and runner_.

00035 {
00036   ACE_TRY
00037     {
00038       int err = this->opts_.init (argc, argv);
00039       if (err != 0)
00040         return -1;
00041 
00042       // Creates it's own internal orb, which we must run later
00043       err = this->service_.init (this->opts_ ACE_ENV_ARG_PARAMETER);
00044       ACE_TRY_CHECK;
00045       if (err != 0)
00046         return -1;
00047 
00048       // Create a thread in which to run the service
00049       ACE_ASSERT (this->runner_.get () == 0);
00050       this->runner_.reset (new ImR_Activator_ORB_Runner (*this));
00051       this->runner_->activate ();
00052     }
00053   ACE_CATCHANY
00054     {
00055       return -1;
00056     }
00057   ACE_ENDTRY;
00058   return 0;
00059 }

ImR_Activator_Loader& ImR_Activator_Loader::operator= const ImR_Activator_Loader  )  [private]
 

int ImR_Activator_Loader::run void   ) 
 

Definition at line 93 of file Activator_Loader.cpp.

References ACE_CATCHALL, ACE_DECLARE_NEW_CORBA_ENV, ACE_ENDTRY, ACE_ENV_SINGLE_ARG_PARAMETER, ACE_ERROR, ACE_TRY, ACE_TRY_CHECK, LM_ERROR, and ImR_Activator_i::run().

Referenced by ImR_Activator_ORB_Runner::svc().

00094 {
00095   ACE_DECLARE_NEW_CORBA_ENV;
00096   ACE_TRY
00097     {
00098       return this->service_.run (ACE_ENV_SINGLE_ARG_PARAMETER);
00099       ACE_TRY_CHECK;
00100     }
00101   ACE_CATCHALL
00102     {
00103       ACE_ERROR ((LM_ERROR, "Exception in ImR_Locator_ORB_Runner()\n"));
00104       return -1;
00105     }
00106   ACE_ENDTRY;
00107 }


Member Data Documentation

Activator_Options ImR_Activator_Loader::opts_ [private]
 

Definition at line 41 of file Activator_Loader.h.

ACE_Auto_Ptr<ImR_Activator_ORB_Runner> ImR_Activator_Loader::runner_ [private]
 

Definition at line 42 of file Activator_Loader.h.

Referenced by fini(), and init().

ImR_Activator_i ImR_Activator_Loader::service_ [private]
 

Definition at line 40 of file Activator_Loader.h.


The documentation for this class was generated from the following files:
Generated on Thu Nov 9 13:37:04 2006 for TAO_Implementation_Repository by doxygen 1.3.6