#include <tao_imr_i.h>
Inheritance diagram for TAO_IMR_Op_ShutdownRepo:
Public Member Functions | |
TAO_IMR_Op_ShutdownRepo () | |
virtual int | parse (int argc, ACE_TCHAR **argv) |
Parse arguments. | |
virtual int | run (void) |
Do the work. | |
Protected Member Functions | |
void | print_usage (void) |
Protected Attributes | |
bool | activators_ |
Definition at line 260 of file tao_imr_i.h.
|
Definition at line 533 of file tao_imr_i.cpp.
00534 : activators_(false) 00535 { 00536 } |
|
Parse arguments.
Implements TAO_IMR_Op. Definition at line 550 of file tao_imr_i.cpp. References ACE_ERROR, activators_, LM_ERROR, and print_usage().
00551 { 00552 // Check for enough arguments (we need at least one for the server name) 00553 if (argc < 1) 00554 { 00555 this->print_usage (); 00556 return -1; 00557 } 00558 00559 // Skip both the program name and the "shutdown-repo" command 00560 ACE_Get_Opt get_opts (argc, argv, "ha"); 00561 00562 int c; 00563 00564 while ((c = get_opts ()) != -1) 00565 { 00566 switch (c) 00567 { 00568 case 'h': 00569 this->print_usage (); 00570 return -1; 00571 case 'a': 00572 activators_ = true; 00573 break; 00574 default: 00575 ACE_ERROR((LM_ERROR, "ERROR : Unknown option '%c'\n", (char) c)); 00576 this->print_usage (); 00577 return -1; 00578 } 00579 } 00580 00581 return 0; 00582 } |
|
Definition at line 539 of file tao_imr_i.cpp. References ACE_ERROR, and LM_ERROR. Referenced by parse().
00540 { 00541 ACE_ERROR ((LM_ERROR, "Shuts down the ImR\n" 00542 "\n" 00543 "Usage: tao_imr [options] shutdown-repo [-a]\n" 00544 " where [options] are ORB options\n" 00545 " Specify -a to also shutdown any registered ImR Activators.\n" 00546 " -h Displays this\n")); 00547 } |
|
Do the work.
Implements TAO_IMR_Op. Definition at line 991 of file tao_imr_i.cpp. References ACE_ANY_EXCEPTION, ACE_ASSERT, ACE_CATCH, ACE_CATCHANY, ACE_DEBUG, ACE_DECLARE_NEW_CORBA_ENV, ACE_ENDTRY, ACE_ENV_ARG_PARAMETER, ACE_PRINT_EXCEPTION, ACE_TRY, ACE_TRY_CHECK, activators_, and LM_DEBUG.
00992 { 00993 ACE_ASSERT(! CORBA::is_nil(imr_)); 00994 00995 ACE_DECLARE_NEW_CORBA_ENV; 00996 ACE_TRY 00997 { 00998 bool servers = false; // not implemented yet, if ever 00999 this->imr_->shutdown (activators_, servers ACE_ENV_ARG_PARAMETER); 01000 ACE_TRY_CHECK; 01001 01002 ACE_DEBUG ((LM_DEBUG, "ImR shutdown initiated.\n")); 01003 } 01004 ACE_CATCH(CORBA::TIMEOUT, ex) 01005 { 01006 ACE_DEBUG ((LM_DEBUG, "Timeout waiting for ImR shutdown.\n")); 01007 } 01008 ACE_CATCHANY 01009 { 01010 ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "Shutting Down ImR"); 01011 return TAO_IMR_Op::UNKNOWN; 01012 } 01013 ACE_ENDTRY; 01014 01015 return TAO_IMR_Op::NORMAL; 01016 } |
|
Definition at line 270 of file tao_imr_i.h. |