• 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.7 2008/10/27 21:11:23 msekoran 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 <acsdaemonErrType.h>
00043 #include <ACSErrTypeCommon.h>
00044 #include <acsutilPorts.h>
00045 
00046 class ACSContainerHandlerImpl : public POA_acsdaemon::ContainerDaemon {
00047 
00048   public:
00049     
00053     ACSContainerHandlerImpl();
00054   
00058     virtual ~ACSContainerHandlerImpl();
00059 
00063     void setService(ACSDaemonServiceImpl<ACSContainerHandlerImpl> *service)
00064     {
00065         h_service = service;
00066     }
00067 
00071     void initialize(CORBA::ORB_ptr orb) {}
00072 
00076     void dispose(CORBA::ORB_ptr orb) {}
00077 
00081     std::string getName();
00082 
00086     std::string getType();
00087     
00091     std::string getPort();
00092 
00093     /*************************** CORBA interface *****************************/
00094 
00095     virtual void start_container (
00096         const char * container_type,
00097         const char * container_name,
00098         ::CORBA::Short instance_number,
00099         const ::ACS::stringSeq & type_modifiers,
00100         const char * additional_command_line
00101       )
00102       ACE_THROW_SPEC ((
00103         CORBA::SystemException,
00104         ::acsdaemonErrType::FailedToStartContainerEx,
00105         ::ACSErrTypeCommon::BadParameterEx
00106       ));
00107     virtual void stop_container (
00108         const char * container_name,
00109         ::CORBA::Short instance_number,
00110         const char * additional_command_line
00111       )
00112       ACE_THROW_SPEC ((
00113         CORBA::SystemException,
00114         ::acsdaemonErrType::FailedToStopContainerEx,
00115         ::ACSErrTypeCommon::BadParameterEx
00116       ));
00117     virtual void shutdown ()
00118       ACE_THROW_SPEC ((
00119         CORBA::SystemException,
00120         ::maciErrType::NoPermissionEx
00121       ));
00122 
00123   private:
00124     std::string h_name; // Name of container handler (used for logging purposes
00125     std::string h_type; // CORBA-type for this container handler
00126     ACSDaemonServiceImpl<ACSContainerHandlerImpl> *h_service; // ACS daemon service
00127 
00128 };
00129 
00130 
00131 
00132 #endif

Generated on Thu Jan 12 2012 23:13:50 for ACS-10.0 C++ API by  doxygen 1.7.0