Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

dalt_client.h

Go to the documentation of this file.
00001 /***************************************************************************
00002                           dalt_client.h  -  description
00003                              -------------------
00004     begin                : Tue Dec 4 2001
00005     copyright            : (C) 2001 by Vlad Mereuta
00006     email                : dizzy@deity.fsnet.co.uk
00007  ***************************************************************************/
00008 
00009 /***************************************************************************
00010  *                                                                         *
00011  *   This program is free software; you can redistribute it and/or modify  *
00012  *   it under the terms of the GNU General Public License as published by  *
00013  *   the Free Software Foundation; either version 2 of the License, or     *
00014  *   (at your option) any later version.                                   *
00015  *                                                                         *
00016  ***************************************************************************/
00017 #ifdef HAVE_CONFIG_H
00018 #include "config.h"
00019 #endif
00020 
00021 #ifndef DALT_CLIENT_H
00022 #define DALT_CLIENT_H
00023 
00024 #include <string>
00025 #include <vector>
00026 #include <map>
00027 #include <list>
00028 #include <easysoap/SOAP.h>
00029 #include <dalt_client/run_time_info.h>
00030 #include <dalt_client/agent_watcher.h>
00031 
00032 using namespace EasySoap;
00033 
00034 namespace DALT_Client {
00035 
00036 //forward definition for agent
00037 class Agent;
00038 
00055 class DALTClient
00056 {
00057 protected:
00059     typedef void (DALTClient::*HandlerFunction)(const SOAPMethod& request, SOAPMethod& response);
00060 
00062     float               machine_speed;
00064     vector<Agent*>  agents; 
00066     string          location;
00069     list<Agent*>        to_kill;
00070 public:
00072     SOAPProxy*  endpoint;
00074     string          server_location;
00075 
00077     AgentWatcher*   agent_watcher;
00082     DALTClient(int port_no, string server);
00083     virtual ~DALTClient();
00084 
00089     virtual int createAgent(string type, int id)=0;
00090     
00092     virtual void killAgent(int id);
00093         
00094     /*------------- SOAP method handlers --------------------- */
00095 
00097     virtual void soap_createAgent(const SOAPMethod& request, SOAPMethod& response);
00099     virtual void soap_newCycleNotify(const SOAPMethod& request, SOAPMethod& response);
00101     virtual void soap_clientStatus(const SOAPMethod& request, SOAPMethod& response);
00104     virtual void soap_agentStats(const SOAPMethod& request, SOAPMethod& response);
00107     virtual void soap_actionRequest(const SOAPMethod& request, SOAPMethod& response) = 0;
00108 };
00109 
00110 }
00111 
00112 //now include the agent definition
00113 #include <dalt_client/agent.h>
00114 #endif

Generated at Thu Jan 31 15:20:07 2002 for DALT Client by doxygen1.2.8 written by Dimitri van Heesch, © 1997-2001