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

TAO_IMR_Op Class Reference

IMR Operation Base Class. More...

#include <tao_imr_i.h>

Inheritance diagram for TAO_IMR_Op:

Inheritance graph
[legend]
List of all members.

Public Methods

 TAO_IMR_Op (void)
 Constructor. More...

virtual void set_imr_locator (ImplementationRepository::Locator_ptr imr)
 Sets the implrepo locator pointer. More...

virtual ~TAO_IMR_Op (void)
 Virtual Destructor. More...

virtual int parse (int argc, ACE_TCHAR **argv)=0
 Parse arguments. More...

virtual int run (void)=0
 Do the work. More...


Static Public Methods

TAO_IMR_Op * make_op (const ACE_TCHAR *op_name)
 Factory. More...


Protected Methods

void display_server_information (const ImplementationRepository::ServerInformation &info)
 Prints out the information contained in a ServerInformation structure. More...


Protected Attributes

ImplementationRepository::Locator_ptr imr_locator_
 Reference to our implementation repository. More...


Detailed Description

IMR Operation Base Class.

Provides a base class with virtual methods for each operation strategy.

Definition at line 78 of file tao_imr_i.h.


Constructor & Destructor Documentation

TAO_IMR_Op::TAO_IMR_Op void   
 

Constructor.

Definition at line 197 of file tao_imr_i.cpp.

00198 {
00199   // Nothing
00200 }

TAO_IMR_Op::~TAO_IMR_Op void    [virtual]
 

Virtual Destructor.

Definition at line 255 of file tao_imr_i.cpp.

00256 {
00257   // Nothing
00258 }


Member Function Documentation

void TAO_IMR_Op::display_server_information const ImplementationRepository::ServerInformation   info [protected]
 

Prints out the information contained in a ServerInformation structure.

Reimplemented in TAO_IMR_Op_List.

Definition at line 1220 of file tao_imr_i.cpp.

References ACE_DEBUG, LM_DEBUG, ImplementationRepository::ServerInformation::location, ImplementationRepository::ServerInformation::server, ImplementationRepository::ServerInformation::startup, and ACE_OS_String::strlen.

Referenced by TAO_IMR_Op_List::display_server_information, and TAO_IMR_Op_Update::run.

01221 {
01222   // Figure out what the activation string is.
01223   const char *act = "UNKNOWN STARTUP";
01224   if (info.startup.activation == ImplementationRepository::NORMAL)
01225     act = "NORMAL";
01226   else if (info.startup.activation == ImplementationRepository::MANUAL)
01227     act = "MANUAL";
01228   else if (info.startup.activation == ImplementationRepository::PER_CLIENT)
01229     act = "PER_CLIENT";
01230   else if (info.startup.activation == ImplementationRepository::AUTO_START)
01231     act = "AUTO_START";
01232 
01233   // Print out information
01234   ACE_DEBUG ((LM_DEBUG, "Server <%s>\n", info.server.in ()));
01235   ACE_DEBUG ((LM_DEBUG,
01236               "  Command Line: %s\n"
01237               "  Working Directory: %s\n"
01238               "  Activation Mode: %s\n",
01239               info.startup.command_line.in (),
01240               info.startup.working_directory.in (),
01241               act));
01242   for (CORBA::ULong i = 0; i < info.startup.environment.length (); ++i)
01243     ACE_DEBUG ((LM_DEBUG, "Environment Variable: %s=%s \n",
01244                 info.startup.environment[i].name.in (),
01245                 info.startup.environment[i].value.in ()));
01246 
01247   // @@ add logical server once implemented
01248 
01249 
01250   if (info.startup.activation == ImplementationRepository::PER_CLIENT)
01251     ACE_DEBUG ((LM_DEBUG, "  No running info available for PER_CLIENT mode\n"));
01252   else if (ACE_OS::strlen (info.location) > 0)
01253     ACE_DEBUG ((LM_DEBUG,
01254                 "  Running at endpoint: %s\n",
01255                 info.location.in ()));
01256   else   // I am assuming that a blank location means currently not running.
01257     ACE_DEBUG ((LM_DEBUG,
01258                 "  Not currently running\n"));
01259 }

TAO_IMR_Op * TAO_IMR_Op::make_op const ACE_TCHAR   op_name [static]
 

Factory.

Definition at line 162 of file tao_imr_i.cpp.

References ACE_TCHAR, ACE_TEXT, and ACE_OS_String::strcasecmp.

Referenced by TAO_IMR_i::parse_args.

00163 {
00164   if (ACE_OS::strcasecmp (op_name, ACE_TEXT ("activate")) == 0)
00165     return new TAO_IMR_Op_Activate ();
00166   else if (ACE_OS::strcasecmp (op_name, ACE_TEXT ("add")) == 0)
00167     return new TAO_IMR_Op_Add ();
00168   else if (ACE_OS::strcasecmp (op_name, ACE_TEXT ("autostart")) == 0)
00169     return new TAO_IMR_Op_Autostart();
00170   else if (ACE_OS::strcasecmp (op_name, ACE_TEXT ("ior")) == 0)
00171     return new TAO_IMR_Op_IOR();
00172   else if (ACE_OS::strcasecmp (op_name, ACE_TEXT ("list")) == 0)
00173     return new TAO_IMR_Op_List ();
00174   else if (ACE_OS::strcasecmp (op_name, ACE_TEXT ("remove")) == 0)
00175     return new TAO_IMR_Op_Remove ();
00176   else if (ACE_OS::strcasecmp (op_name, ACE_TEXT ("shutdown")) == 0)
00177     return new TAO_IMR_Op_Shutdown ();
00178   else if (ACE_OS::strcasecmp (op_name, ACE_TEXT ("update")) == 0)
00179     return new TAO_IMR_Op_Update ();
00180 
00181   return 0;
00182 }

virtual int TAO_IMR_Op::parse int    argc,
ACE_TCHAR **    argv
[pure virtual]
 

Parse arguments.

Implemented in TAO_IMR_Op_Activate.

Referenced by TAO_IMR_i::parse_args.

virtual int TAO_IMR_Op::run void    [pure virtual]
 

Do the work.

Implemented in TAO_IMR_Op_Activate.

Referenced by TAO_IMR_i::run.

void TAO_IMR_Op::set_imr_locator ImplementationRepository::Locator_ptr    imr [virtual]
 

Sets the implrepo locator pointer.

Definition at line 188 of file tao_imr_i.cpp.

References imr_locator_.

Referenced by TAO_IMR_i::init.

00189 {
00190   this->imr_locator_ = imr_locator;
00191 }


Member Data Documentation

ImplementationRepository::Locator_ptr TAO_IMR_Op::imr_locator_ [protected]
 

Reference to our implementation repository.

Definition at line 101 of file tao_imr_i.h.

Referenced by TAO_IMR_Op_Update::run, TAO_IMR_Op_Shutdown::run, TAO_IMR_Op_Remove::run, TAO_IMR_Op_List::run, TAO_IMR_Op_IOR::run, TAO_IMR_Op_Autostart::run, TAO_IMR_Op_Add::run, TAO_IMR_Op_Activate::run, and set_imr_locator.


The documentation for this class was generated from the following files:
Generated on Mon Jun 16 20:04:29 2003 for TAO_Implementation_Repository by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002