• Classes
  • Modules
  • Namespaces
  • Files
  • Related Pages
  • File List
  • File Members

acsdaemonTestAsyncStopRequest.h

Go to the documentation of this file.
00001 #ifndef __TestAcsDaemonAsyncStopRequest_h
00002 #define __TestAcsDaemonAsyncStopRequest_h
00003 /*******************************************************************************
00004 * E.S.O. - VLT project
00005 *
00006 * "@(#) $Id: 
00007 *
00008 * who       when        what
00009 * --------  ----------  ----------------------------------------------
00010 * rbourtem  2013-10-11
00011 */
00012 
00013 /************************************************************************
00014  *
00015  *----------------------------------------------------------------------
00016  */
00017 
00018 #include <Task.h>
00019 #include <string>
00020 #include <vector>
00021 
00022 #include "acsdaemonC.h"
00023 
00028 class TestAcsDaemonAsyncStopRequest : public ACE_Task_Base
00029 {
00030 public:
00031   TestAcsDaemonAsyncStopRequest(const std::string &container, const std::string &host);
00032   ~TestAcsDaemonAsyncStopRequest();
00033 
00034   // run the CORBA method in a seperate task
00035   void run();
00036 
00037   // wait for thread completion
00038   int wait();
00039 
00040   // Return the exception
00041   std::string &exceptionString() {return exceptionString_m;};
00042   //SPARTA::ErrorEvent &exception() { return exception_m;};
00043   bool commandOK() {return commandOK_m;};
00044 
00045 protected:
00046 private:
00047   // Overloaded ACE_Task_Base method
00048   int svc();
00049   bool commandOK_m;
00050   bool completed_m;
00051 
00052   std::string host_m;
00053   std::string container_m;
00054 
00055   acsdaemon::ContainerDaemon_var m_containerDaemon;
00056   
00060   int m_acsInstance;
00064   std::string m_managerCorbaloc;
00069   std::string m_additionalCmdLine; // Additional command used to give the manager reference to
00070                                    // the acscontainerdaemon when start_container() or stop_container() is invoked
00071 
00072   int stopContainerOnHost(std::string &host, std::string &container) throw (CORBA::SystemException,acsdaemonErrType::FailedToStopContainerEx, ACSErrTypeCommon::BadParameterEx);
00073   
00074   acsdaemon::ContainerDaemon_ptr getContainerDaemonRef_(const std::string & host);
00081   std::string getManagerCorbaloc_();
00082 
00083   // Store the error string if an exception occurs
00084   std::string exceptionString_m;
00085   //SPARTA::ErrorEvent exception_m;
00086 };
00087 
00088 int shutdownContainers(std::vector<std::string> containers, std::string) throw (CORBA::SystemException,acsdaemonErrType::FailedToStopContainerEx,ACSErrTypeCommon::BadParameterEx);
00089 int main(int argc, char* argv[]);
00090 
00091 #endif  /* __TestAcsDaemonAsyncStopRequest_h */

Generated on Mon May 4 2015 08:27:41 for ACS-2015.4 C++ API by  doxygen 1.7.0