Back to index

nordugrid-arc-nox  1.1.0~rc6
AREXClient.h
Go to the documentation of this file.
00001 // -*- indent-tabs-mode: nil -*-
00002 
00003 #ifndef __AREX_CLIENT__
00004 #define __AREX_CLIENT__
00005 
00006 #include <string>
00007 #include <utility>
00008 
00009 #include <arc/URL.h>
00010 #include <arc/XMLNode.h>
00011 #include <arc/client/Job.h>
00012 
00013 namespace Arc {
00014 
00015   class ClientSOAP;
00016   class Config;
00017   class Logger;
00018   class MCCConfig;
00019   class PayloadSOAP;
00020   enum ServiceType;
00021 
00023 
00030   class AREXClient {
00031   public:
00032 
00034 
00039     AREXClient(const URL& url, const MCCConfig& cfg, int timeout, bool arex_features = true);
00040 
00042 
00045     ~AREXClient();
00046 
00048 
00054     bool submit(const std::string& jobdesc, std::string& jobid,
00055                 bool delegate = false);
00056 
00058 
00064 //    bool stat(const std::string& jobid, std::string& status);
00065     bool stat(const std::string& jobid, Job& job);
00066 
00068 
00073     bool kill(const std::string& jobid);
00074 
00076 
00082     bool clean(const std::string& jobid);
00083 
00085 
00089     bool sstat(XMLNode& status);
00090 
00092 
00098     bool getdesc(const std::string& jobid, std::string& jobdesc);
00099 
00100 
00102 
00110     bool migrate(const std::string& jobid, const std::string& jobdesc, bool forcemigration, std::string& newjobid, bool delegate = false);
00111 
00112 
00113     bool listServicesFromISIS(std::list< std::pair<URL, ServiceType> >& services);
00114 
00115 
00116     bool resume(const std::string& jobid);
00117 
00119 
00126     static void createActivityIdentifier(const URL& jobid, std::string& activityIdentifier);
00127 
00128     ClientSOAP* SOAP(void) {
00129       return client;
00130     }
00131 
00132     static const std::string mainStateModel;
00133 
00134   private:
00135     bool process(PayloadSOAP& req, bool delegate, XMLNode& response);
00136 
00137     ClientSOAP *client;
00138 
00140 
00142     NS arex_ns;
00143 
00144     URL rurl;
00145 
00146     std::string action;
00147 
00148     bool arex_enabled;
00149 
00151 
00154     static Logger logger;
00155   };
00156 
00157 }
00158 
00159 #endif