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

acsContainerHandlerImpl.h

Go to the documentation of this file.
00001 #ifndef _ACS_CONTAINER_HANDLER_IMPL_H_
00002 #define _ACS_CONTAINER_HANDLER_IMPL_H_
00003 
00004 /*******************************************************************************
00005 *    ALMA - Atacama Large Millimiter Array
00006 *    (c) European Southern Observatory, 2002
00007 *    Copyright by ESO (in the framework of the ALMA collaboration)
00008 *    and Cosylab 2002, All rights reserved
00009 *
00010 *    This library is free software; you can redistribute it and/or
00011 *    modify it under the terms of the GNU Lesser General Public
00012 *    License as published by the Free Software Foundation; either
00013 *    version 2.1 of the License, or (at your option) any later version.
00014 *
00015 *    This library is distributed in the hope that it will be useful,
00016 *    but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00018 *    Lesser General Public License for more details.
00019 *
00020 *    You should have received a copy of the GNU Lesser General Public
00021 *    License along with this library; if not, write to the Free Software
00022 *    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
00023 *
00024 * "@(#) $Id: acsContainerHandlerImpl.h,v 1.8 2012/11/07 11:05:34 bjeram Exp $"
00025 *
00026 * who       when      what
00027 * --------  --------  ----------------------------------------------
00028 * msekoran 2006-06-21 created 
00029 * agrimstr 2007-11-07 refactored Container interface into separate
00030 *                     class for use in template pattern implementation
00031 *                     of the acsdaemon
00032 */
00033 
00034 #ifndef __cplusplus
00035 #error This is a C++ include file and cannot be used from plain C
00036 #endif
00037 
00038 #include "acsdaemonS.h"
00039 #include "logging.h"
00040 #include "acsDaemonImpl.h"
00041 #include <acserr.h>
00042 #include "acsDaemonUtils.h"
00043 #include <acsdaemonErrType.h>
00044 #include <ACSErrTypeCommon.h>
00045 #include <acsutilPorts.h>
00046 
00047 class ACSContainerHandlerImpl : public POA_acsdaemon::ContainerDaemon {
00048 
00049   public:
00050     
00054     ACSContainerHandlerImpl();
00055   
00059     virtual ~ACSContainerHandlerImpl();
00060 
00064     void setService(ACSDaemonServiceImpl<ACSContainerHandlerImpl> *service)
00065     {
00066         h_service = service;
00067     }
00068 
00072     void initialize(CORBA::ORB_ptr orb) {}
00073 
00077     void dispose(CORBA::ORB_ptr orb) {}
00078 
00082     std::string getName();
00083 
00087     std::string getType();
00088     
00092     std::string getPort();
00093 
00094     /*************************** CORBA interface *****************************/
00095 
00096     virtual void start_container (
00097         const char * container_type,
00098         const char * container_name,
00099         ::CORBA::Short instance_number,
00100         const ::ACS::stringSeq & type_modifiers,
00101         const char * additional_command_line
00102       )
00103       throw(
00104         CORBA::SystemException,
00105         ::acsdaemonErrType::FailedToStartContainerEx,
00106         ::ACSErrTypeCommon::BadParameterEx
00107       );
00108 
00109     virtual void start_container_sync (
00110             const char * container_type,
00111             const char * container_name,
00112             ::CORBA::Short instance_number,
00113             const ::ACS::stringSeq & type_modifiers,
00114             const char * additional_command_line
00115           )
00116           throw(
00117             CORBA::SystemException,
00118             ::acsdaemonErrType::FailedToStartContainerEx,
00119         ::ACSErrTypeCommon::BadParameterEx
00120           );
00121 
00122     virtual void stop_container (
00123         const char * container_name,
00124         ::CORBA::Short instance_number,
00125         const char * additional_command_line
00126       )
00127       throw(
00128         CORBA::SystemException,
00129         ::acsdaemonErrType::FailedToStopContainerEx,
00130         ::ACSErrTypeCommon::BadParameterEx
00131       );
00132 
00133     virtual void stop_container_sync (
00134             const char * container_name,
00135             ::CORBA::Short instance_number,
00136             const char * additional_command_line
00137           )
00138           throw(
00139             CORBA::SystemException,
00140             ::acsdaemonErrType::FailedToStopContainerEx,
00141         ::ACSErrTypeCommon::BadParameterEx
00142           );
00143 
00144     virtual void shutdown ()
00145       throw(
00146         CORBA::SystemException,
00147         ::maciErrType::NoPermissionEx
00148       );
00149 
00150   private:
00151     std::string h_name; // Name of container handler (used for logging purposes
00152     std::string h_type; // CORBA-type for this container handler
00153     ACSDaemonServiceImpl<ACSContainerHandlerImpl> *h_service; // ACS daemon service
00154     AcsDaemonUtils m_daemonUtils;
00155 };
00156 
00157 
00158 
00159 #endif

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