11 #ifndef WRENCH_FILETRANSFERTHREADMESSAGE_H
12 #define WRENCH_FILETRANSFERTHREADMESSAGE_H
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"
34 class FileTransferThreadMessage :
public ServiceMessage {
41 FileTransferThreadMessage(std::string name,
double payload) :
42 ServiceMessage(
"FileTransferThreadMessage::" + name, payload) {}
49 class FileTransferThreadNotificationMessage :
public FileTransferThreadMessage {
66 FileTransferThreadNotificationMessage(std::shared_ptr<FileTransferThread> file_transfer_thread,
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),
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),
85 failure_cause(failure_cause) {}
88 std::shared_ptr<FileTransferThread> file_transfer_thread;
93 std::string src_mailbox;
95 std::shared_ptr<FileLocation> src_location;
98 std::string dst_mailbox;
100 std::shared_ptr<FileLocation> dst_location;
103 std::string answer_mailbox_if_read;
105 std::string answer_mailbox_if_write;
107 std::string answer_mailbox_if_copy;
111 std::shared_ptr<FailureCause> failure_cause;
122 #endif //WRENCH_FILETRANSFERTHREADMESSAGE_H