Back to index

nordugrid-arc-nox  1.1.0~rc6
paul.h
Go to the documentation of this file.
00001 #ifndef __ARC_PAUL_H__
00002 #define __ARC_PAUL_H__
00003 
00004 #include <arc/Run.h>
00005 #include <arc/message/Service.h>
00006 #include <arc/delegation/DelegationInterface.h>
00007 #include <arc/infosys/InformationInterface.h>
00008 #include <arc/infosys/RegisteredService.h>
00009 #include <vector>
00010 #include <map>
00011 #include "job.h"
00012 #include "job_queue.h"
00013 #include "sysinfo.h"
00014 #include "configurator.h"
00015 
00016 namespace Paul {
00017 
00018 class PaulService: public Arc::RegisteredService {
00019     protected:
00020         Configurator configurator;
00021         std::string uuid;
00022         std::string endpoint;
00023         bool in_shutdown;
00024         Arc::NS ns_;
00025         Arc::Logger logger_;
00026         JobQueue jobq;
00027         bool information_collector(Arc::XMLNode &doc);
00028         std::map<std::string, Arc::Run *> runq;
00029         SysInfo sysinfo;
00030         void do_request(void);
00031         void do_report(void);
00032         void do_action(void);
00033         static void process_job(void *arg);
00034         static void request_loop(void *arg);
00035         static void report_and_action_loop(void *arg);
00036         bool stage_in(Job &j);
00037         bool run(Job &j);
00038         bool stage_out(Job &j);
00039     public:
00040         PaulService(Arc::Config *cfg);
00041         virtual ~PaulService(void);
00042         Arc::MCC_Status process(Arc::Message &in, Arc::Message &out);
00043         bool RegistrationCollector(Arc::XMLNode &doc);
00044         void GetActivities(const std::string &url, std::vector<std::string> &ret);
00045 
00046 }; // class PaulService
00047 
00048 } // namespace Paul
00049 
00050 #endif
00051