// WsClientScheduler.h #ifndef WsClientScheduler_H #define WsClientScheduler_H // SOAP server interface for a DIAL scheduler. #include "dial_sched/Scheduler.h" #include namespace dial { class WsClientScheduler : public Scheduler { public: // embedded classes class Imp; private: // data Imp* pimp; public: // methods // XML name. static const char* xml_name() { return "WsClientScheduler"; } // DTD. static const Text& dtd(); public: // methods // Constructor. // Argument is the URL of the server, e.g. // http://dial.myaddress:8080 WsClientScheduler(std::string url, bool usegsi =true); // Destructor. ~WsClientScheduler(); // Add a task and build it for an application. int add_task(const Application& app, const Task& tsk); // Remove a task and build it for an application. int remove_task(const Application& app, const Task& tsk); // Submit a job. JobId submit(const Application& app, const Task& tsk, const dset::Dataset& dst, const JobPreferences& prf); // Start a job. int start(JobId jid); // Kill a job. int kill(JobId jid); // Remove a job and any associated data. int remove(JobId jid); // Lock and unlock mutex. int lock() const; int unlock() const; // Is this a valid scheduler. // Requires connection to a valid scheduler. bool is_valid() const; // Ping. // Pings the underlying service and returns true if it makes contact. bool ping() const; // Check application. bool has_application(const Application& app) const; // Check task. bool has_task(const Application& app, const Task& tsk) const; // Fetch ID for task job. JobId task_job(const Application& app, const Task& tsk) const; // Fetch list of jobs. JobIdList jobs() const; // Has a job. bool has_job(JobId jid) const; // Fetch a job. Job& job(JobId jid) const; // XML. const XmlElement* xml() const; // Return the log for this scheduler. Text log() const; // Set timeout. void set_timeout(int to); // Retrieve the timeout. int timeout() const; // Set delegation. // Returns 0 for success. int set_delegation(bool del =true); // Return if the credential delegation is enabled. bool is_delegating() const; // Fetch a report on the service resource usage. std::string resource_report() const; // Terminate service. // Don't call this! void terminate_service() const; // Output stream. std::ostream& ostr(std::ostream& str) const; }; } // end namespace dial #endif