00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef __EDG_WORKLOAD_LOGGING_CLIENT_NOTIFICATION_HPP__
00019 #define __EDG_WORKLOAD_LOGGING_CLIENT_NOTIFICATION_HPP__
00020
00021
00022 #include "glite/wmsutils/jobid/JobId.h"
00023
00024 #include "glite/lb/consumer.h"
00025 #include "glite/lb/notification.h"
00026 #include "glite/lb/JobStatus.h"
00027
00028
00029 EWL_BEGIN_NAMESPACE
00030
00031
00036 class Notification {
00037 public:
00041 Notification();
00042
00048 Notification(const std::string host,const u_int16_t port);
00049
00054 Notification(const std::string notifId);
00055
00056 ~Notification();
00057
00058 std::string getNotifId() const;
00059 time_t getValid() const;
00060 int getFd() const;
00067 void addJob(const glite::wmsutils::jobid::JobId &jobId);
00068
00072 void removeJob(const glite::wmsutils::jobid::JobId &jobId);
00073
00075 std::string getJobs();
00076
00078 void setStates(const std::vector<glite::lb::JobStatus::Code> &);
00079
00081 std::string getStates();
00082
00086 void Register();
00087
00092 void Bind(const std::string address);
00093
00099 int receive(glite::lb::JobStatus &,timeval &);
00100
00101 private:
00102 std::vector<glite::wmsutils::jobid::JobId> jobs;
00103 std::vector<glite::lb::JobStatus::Code> states;
00104
00105 edg_wll_Context ctx;
00106 edg_wll_NotifId notifId;
00107 time_t valid;
00108 };
00109
00110
00111 EWL_END_NAMESPACE
00112
00113 #endif