ARC SDK
DataDeliveryRemoteComm.h
1 #ifndef DATADELIVERYREMOTECOMM_H_
2 #define DATADELIVERYREMOTECOMM_H_
3 
4 #include <arc/XMLNode.h>
5 #include <arc/communication/ClientInterface.h>
6 #include <arc/message/MCC.h>
7 
8 #include "DataDeliveryComm.h"
9 
10 namespace DataStaging {
11 
13 
18  public:
22  virtual ~DataDeliveryRemoteComm();
23 
25  virtual void PullStatus();
26 
28  static bool CheckComm(DTR_ptr dtr, std::vector<std::string>& allowed_dirs, std::string& load_avg);
29 
31  virtual operator bool() const { return valid; };
33  virtual bool operator!() const { return !valid; };
34 
35  private:
37  Arc::ClientSOAP* client;
39  std::string dtr_full_id;
43  int query_retries;
45  Arc::MCCConfig cfg;
47  Arc::URL endpoint;
49  int timeout;
50 
52  bool valid;
54  static Arc::Logger logger;
55 
57  void CancelDTR();
58 
61  void FillStatus(const Arc::XMLNode& node = Arc::XMLNode());
62 
64  bool SetupDelegation(Arc::XMLNode& op, const Arc::UserConfig& usercfg);
65 
67  void HandleQueryFault(const std::string& err="");
68 
69  };
70 
71 } // namespace DataStaging
72 
73 #endif /* DATADELIVERYREMOTECOMM_H_ */
This class contacts a remote service to make a Delivery request.
Definition: DataDeliveryRemoteComm.h:17
User configuration class
Definition: UserConfig.h:196
Wrapper for LibXML library Tree interface.
Definition: XMLNode.h:61
virtual bool operator!() const
Returns true if service is not processing request or down.
Definition: DataDeliveryRemoteComm.h:33
A logger class.
Definition: Logger.h:493
Represents limits and properties of a DTR transfer. These generally apply to all DTRs.
Definition: DTR.h:91
DataStaging contains all components for data transfer scheduling and execution.
Definition: DataDelivery.h:12
DataDeliveryRemoteComm(DTR_ptr dtr, const TransferParameters &params)
Send the transfer request to the remote service.
Class to represent general URLs.
Definition: URL.h:88
static bool CheckComm(DTR_ptr dtr, std::vector< std::string > &allowed_dirs, std::string &load_avg)
Pings service to find allowed dirs.
virtual void PullStatus()
Read status from service.
This class provides an abstract interface for the Delivery layer.
Definition: DataDeliveryComm.h:27
virtual ~DataDeliveryRemoteComm()
If transfer is still ongoing, sends a cancellation message to the service.