Back to index

nordugrid-arc-nox  1.1.0~rc6
CREAMClient.h
Go to the documentation of this file.
00001 // -*- indent-tabs-mode: nil -*-
00002 
00003 #ifndef __ARC_CREAMCLIENT_H__
00004 #define __ARC_CREAMCLIENT_H__
00005 
00006 #include <string>
00007 
00008 #include <arc/XMLNode.h>
00009 #include <arc/client/Job.h>
00010 
00011 namespace Arc {
00012 
00013   class ClientSOAP;
00014   class Logger;
00015   class MCCConfig;
00016   class URL;
00017   class PayloadSOAP;
00018 
00019   struct creamJobInfo {
00020     std::string jobId;
00021     std::string creamURL;
00022     std::string ISB_URI;
00023     std::string OSB_URI;
00024   };
00025 
00026   class CREAMClient {
00027   public:
00028     CREAMClient(const URL& url, const MCCConfig& cfg, int timeout);
00029     ~CREAMClient();
00030     void setDelegationId(const std::string& delegId) {
00031       this->delegationId = delegId;
00032     }
00033     bool createDelegation(const std::string& delegation_id,
00034                           const std::string& proxy);
00035     bool destroyDelegation(const std::string& delegation_id);
00036     bool registerJob(const std::string& jdl_text, creamJobInfo& info);
00037     bool startJob(const std::string& jobid);
00038     bool stat(const std::string& jobid, Job& job);
00039     bool cancel(const std::string& jobid);
00040     bool purge(const std::string& jobid);
00041 
00042   private:
00043     bool process(PayloadSOAP& req, XMLNode& response);
00044 
00045     std::string action;
00046 
00047     ClientSOAP *client;
00048     std::string cafile;
00049     std::string cadir;
00050     NS cream_ns;
00051     std::string delegationId;
00052     static Logger logger;
00053   };
00054 
00055 } // namespace Arc
00056 
00057 #endif // __ARC_CREAMCLIENT_H__