#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 528 of file tao_imr_i.cpp.
00529 : activators_(false) 00530 { 00531 } |
|
Parse arguments.
Implements TAO_IMR_Op. Definition at line 545 of file tao_imr_i.cpp. References ACE_ERROR, activators_, LM_ERROR, and print_usage().
00546 { 00547 // Check for enough arguments (we need at least one for the server name) 00548 if (argc < 1) 00549 { 00550 this->print_usage (); 00551 return -1; 00552 } 00553 00554 // Skip both the program name and the "shutdown-repo" command 00555 ACE_Get_Opt get_opts (argc, argv, "ha"); 00556 00557 int c; 00558 00559 while ((c = get_opts ()) != -1) 00560 { 00561 switch (c) 00562 { 00563 case 'h': 00564 this->print_usage (); 00565 return -1; 00566 case 'a': 00567 activators_ = true; 00568 break; 00569 default: 00570 ACE_ERROR((LM_ERROR, "ERROR : Unknown option '%c'\n", (char) c)); 00571 this->print_usage (); 00572 return -1; 00573 } 00574 } 00575 00576 return 0; 00577 } |
|
Definition at line 534 of file tao_imr_i.cpp. References ACE_ERROR, and LM_ERROR. Referenced by parse().
00535 { 00536 ACE_ERROR ((LM_ERROR, "Shuts down the ImR\n" 00537 "\n" 00538 "Usage: tao_imr [options] shutdown-repo [-a]\n" 00539 " where [options] are ORB options\n" 00540 " Specify -a to also shutdown any registered ImR Activators.\n" 00541 " -h Displays this\n")); 00542 } |
|
Do the work.
Implements TAO_IMR_Op. Definition at line 966 of file tao_imr_i.cpp. References ACE_ASSERT, ACE_DEBUG, activators_, and LM_DEBUG.
00967 { 00968 ACE_ASSERT(! CORBA::is_nil(imr_)); 00969 00970 try 00971 { 00972 bool servers = false; // not implemented yet, if ever 00973 this->imr_->shutdown (activators_, servers); 00974 00975 ACE_DEBUG ((LM_DEBUG, "ImR shutdown initiated.\n")); 00976 } 00977 catch (const CORBA::TIMEOUT&) 00978 { 00979 ACE_DEBUG ((LM_DEBUG, "Timeout waiting for ImR shutdown.\n")); 00980 } 00981 catch (const CORBA::Exception& ex) 00982 { 00983 ex._tao_print_exception ("Shutting Down ImR"); 00984 return TAO_IMR_Op::UNKNOWN; 00985 } 00986 00987 return TAO_IMR_Op::NORMAL; 00988 } |
|
Definition at line 270 of file tao_imr_i.h. |