Salome HOME
Porting to Mandrake 10.1 and new products:
[modules/kernel.git] / src / Batch / Batch_BatchManager_PBS.hxx
1 /*
2  * BatchManager_PBS.hxx : 
3  *
4  * Auteur : Ivan DUTKA-MALEN - EDF R&D
5  * Mail   : mailto:ivan.dutka-malen@der.edf.fr
6  * Date   : Thu Nov  6 10:17:22 2003
7  * Projet : Salome 2
8  *
9  */
10
11 #ifndef _BATCHMANAGER_PBS_H_
12 #define _BATCHMANAGER_PBS_H_
13
14
15 #include "Batch_Job.hxx"
16 #include "Batch_Job.hxx"
17 #include "Batch_JobId.hxx"
18 #include "Batch_JobInfo.hxx"
19 #include "Batch_JobInfo_PBS.hxx"
20 #include "Batch_Job_PBS.hxx"
21 #include "Batch_InvalidArgumentException.hxx"
22 #include "Batch_ConnexionFailureException.hxx"
23 #include "Batch_APIInternalFailureException.hxx"
24 #include "Batch_NotYetImplementedException.hxx"
25 #include "Batch_BatchManager.hxx"
26
27 namespace Batch {
28
29   class Job;
30   class JobId;
31   class JobInfo;
32   class FactBatchManager;
33
34   class BatchManager_PBS : public BatchManager
35   {
36   public:
37     // Constructeur et destructeur
38     //BatchManager_PBS() throw(InvalidArgumentException,ConnexionFailureException); // connexion au serveur par defaut
39     //BatchManager_PBS(std::string host) throw(InvalidArgumentException,ConnexionFailureException); // connexion a la machine host
40     BatchManager_PBS(const FactBatchManager * parent, const char * host="localhost") throw(InvalidArgumentException,ConnexionFailureException); // connexion a la machine host
41     virtual ~BatchManager_PBS();
42
43     // Recupere le nom du serveur par defaut
44     // static std::string BatchManager_PBS::getDefaultServer();
45
46     // Methodes pour le controle des jobs
47     virtual const JobId submitJob(const Job & job); // soumet un job au gestionnaire
48     virtual void deleteJob(const JobId & jobid); // retire un job du gestionnaire
49     virtual void holdJob(const JobId & jobid); // suspend un job en file d'attente
50     virtual void releaseJob(const JobId & jobid); // relache un job suspendu
51     virtual void alterJob(const JobId & jobid, const Parametre & param, const Environnement & env); // modifie un job en file d'attente
52     virtual void alterJob(const JobId & jobid, const Parametre & param); // modifie un job en file d'attente
53     virtual void alterJob(const JobId & jobid, const Environnement & env); // modifie un job en file d'attente
54     virtual JobInfo queryJob(const JobId & jobid); // renvoie l'etat du job
55
56     virtual void setParametre(const JobId & jobid, const Parametre & param) { return alterJob(jobid, param); } // modifie un job en file d'attente
57     virtual void setEnvironnement(const JobId & jobid, const Environnement & env) { return alterJob(jobid, env); } // modifie un job en file d'attente
58
59
60   protected:
61     int _connect; // PBS connect id
62
63   private:
64
65 #ifdef SWIG
66   public:
67     // Recupere le l'identifiant d'un job deja soumis au BatchManager
68     //virtual const JobId getJobIdByReference(const std::string & ref) { return BatchManager::getJobIdByReference(ref); }
69     virtual const JobId getJobIdByReference(const char * ref) { return BatchManager::getJobIdByReference(ref); }
70 #endif
71
72   };
73
74 }
75
76 #endif