WRENCH  1.10
Cyberinfrastructure Simulation Workbench
Overview Installation Getting Started WRENCH 101 WRENCH 102
FileTransferThreadMessage.h
1 
11 #ifndef WRENCH_FILETRANSFERTHREADMESSAGE_H
12 #define WRENCH_FILETRANSFERTHREADMESSAGE_H
13 
14 
15 #include <memory>
16 
17 #include <wrench/services/ServiceMessage.h>
18 #include <wrench/workflow/failure_causes/FailureCause.h>
19 #include <wrench/services/file_registry/FileRegistryService.h>
20 #include <wrench/simulation/SimulationTimestampTypes.h>
21 #include <wrench/simulation/Simulation.h>
22 #include <wrench/simulation/SimulationOutput.h>
23 #include "wrench/services/storage/storage_helpers/FileTransferThread.h"
24 
25 namespace wrench {
26 
27  /***********************/
29  /***********************/
30 
34  class FileTransferThreadMessage : public ServiceMessage {
35  protected:
41  FileTransferThreadMessage(std::string name, double payload) :
42  ServiceMessage("FileTransferThreadMessage::" + name, payload) {}
43  };
44 
45 
49  class FileTransferThreadNotificationMessage : public FileTransferThreadMessage {
50  public:
66  FileTransferThreadNotificationMessage(std::shared_ptr<FileTransferThread> file_transfer_thread,
67  WorkflowFile *file,
68  std::string src_mailbox,
69  std::shared_ptr<FileLocation> src_location,
70  std::string dst_mailbox,
71  std::shared_ptr<FileLocation> dst_location,
72  std::string answer_mailbox_if_read,
73  std::string answer_mailbox_if_write,
74  std::string answer_mailbox_if_copy,
75  bool success, std::shared_ptr<FailureCause> failure_cause) :
76  FileTransferThreadMessage("FileTransferThreadNotificationMessage", 0),
77  file_transfer_thread(file_transfer_thread),
78  file(file),
79  src_mailbox(src_mailbox), src_location(src_location),
80  dst_mailbox(dst_mailbox), dst_location(dst_location),
81  answer_mailbox_if_read(answer_mailbox_if_read),
82  answer_mailbox_if_write(answer_mailbox_if_write),
83  answer_mailbox_if_copy(answer_mailbox_if_copy),
84  success(success),
85  failure_cause(failure_cause) {}
86 
88  std::shared_ptr<FileTransferThread> file_transfer_thread;
90  WorkflowFile *file;
91 
93  std::string src_mailbox;
95  std::shared_ptr<FileLocation> src_location;
96 
98  std::string dst_mailbox;
100  std::shared_ptr<FileLocation> dst_location;
101 
103  std::string answer_mailbox_if_read;
105  std::string answer_mailbox_if_write;
107  std::string answer_mailbox_if_copy;
109  bool success;
111  std::shared_ptr<FailureCause> failure_cause;
112  };
113 
114 
115  /***********************/
117  /***********************/
118 
119 };
120 
121 
122 #endif //WRENCH_FILETRANSFERTHREADMESSAGE_H
wrench
Definition: Alarm.cpp:20