Main Page | Modules | Class Hierarchy | Class List | File List | Class Members | File Members

Notification.h

Go to the documentation of this file.
00001 /*
00002 Copyright (c) Members of the EGEE Collaboration. 2004-2010.
00003 See http://www.eu-egee.org/partners for details on the copyright holders.
00004 
00005 Licensed under the Apache License, Version 2.0 (the "License");
00006 you may not use this file except in compliance with the License.
00007 You may obtain a copy of the License at
00008 
00009     http://www.apache.org/licenses/LICENSE-2.0
00010 
00011 Unless required by applicable law or agreed to in writing, software
00012 distributed under the License is distributed on an "AS IS" BASIS,
00013 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00014 See the License for the specific language governing permissions and
00015 limitations under the License.
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

Generated on Fri Aug 20 13:06:41 2010 for Glite LB Client: CPP - Interface by  doxygen 1.3.9.1