~ubuntu-branches/debian/sid/nordugrid-arc/sid

« back to all changes in this revision

Viewing changes to src/hed/acc/EMIES/EMIESClient.h

  • Committer: Package Import Robot
  • Author(s): Mattias Ellert
  • Date: 2012-12-13 16:41:31 UTC
  • mfrom: (1.1.5)
  • Revision ID: package-import@ubuntu.com-20121213164131-0fumka0jar8mxm07
Tags: 2.0.1-1
* 2.0.1 Release
* Drop patches accepted upstream

Show diffs side-by-side

added added

removed removed

Lines of Context:
9
9
#include <arc/XMLNode.h>
10
10
#include <arc/DateTime.h>
11
11
#include <arc/message/MCC.h>
 
12
#include <arc/UserConfig.h>
12
13
/*
13
14
#include <utility>
14
15
 
114
115
     */
115
116
    ~EMIESClient();
116
117
 
 
118
    operator bool(void) {
 
119
      return (client != NULL);
 
120
    }
 
121
 
 
122
    bool operator!(void) {
 
123
      return (client == NULL);
 
124
    }
 
125
 
117
126
    //! Submit a job.
118
127
    /*! This method submits a job to the EM IES service corresponding
119
128
       to this client instance. It does not do data staging.
197
206
      return client;
198
207
    }
199
208
 
 
209
    const URL& url(void) {
 
210
      return rurl;
 
211
    }
 
212
 
200
213
    bool delegation(XMLNode& operation);
201
214
 
202
215
  private:
203
 
    bool process(PayloadSOAP& req, bool delegate, XMLNode& response);
 
216
    bool process(PayloadSOAP& req, bool delegate, XMLNode& response, bool retry = true);
 
217
 
 
218
    bool reconnect();
204
219
 
205
220
    bool dosimple(const std::string& action, const std::string& id);
206
221
 
215
230
 
216
231
    const MCCConfig cfg;
217
232
 
 
233
    int timeout;
 
234
 
218
235
    //! A logger for the A-REX client.
219
236
    /*! This is a logger to which all logging messages from the EMI ES
220
237
       client are sent.
222
239
    static Logger logger;
223
240
  };
224
241
 
 
242
  class EMIESClients {
 
243
    std::multimap<URL, EMIESClient*> clients_;
 
244
    const UserConfig& usercfg_;
 
245
  public:
 
246
    EMIESClients(const UserConfig& usercfg);
 
247
    ~EMIESClients(void);
 
248
    EMIESClient* acquire(const URL& url);
 
249
    void release(EMIESClient* client);
 
250
  };
 
251
 
225
252
}
226
253
 
227
254
#endif