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 
35  protected:
41  FileTransferThreadMessage(std::string name, double payload) :
42  ServiceMessage("FileTransferThreadMessage::" + name, payload) {}
43  };
44 
45 
50  public:
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),
78  file(file),
86 
88  std::shared_ptr<FileTransferThread> file_transfer_thread;
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 
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::FileTransferThreadNotificationMessage::answer_mailbox_if_write
std::string answer_mailbox_if_write
If this was a file write, the mailbox to which an answer should be send.
Definition: FileTransferThreadMessage.h:105
wrench::SimulationMessage::name
std::string name
The message name.
Definition: SimulationMessage.h:37
wrench::FileTransferThreadMessage
Top-level class for messages received/sent by a DataCommunicationThread.
Definition: FileTransferThreadMessage.h:34
wrench::FileTransferThreadNotificationMessage::failure_cause
std::shared_ptr< FailureCause > failure_cause
The failure cause is case of a failure.
Definition: FileTransferThreadMessage.h:111
wrench::FileTransferThreadNotificationMessage::file
WorkflowFile * file
File that was being communicated.
Definition: FileTransferThreadMessage.h:90
wrench::FileTransferThreadNotificationMessage::FileTransferThreadNotificationMessage
FileTransferThreadNotificationMessage(std::shared_ptr< FileTransferThread > file_transfer_thread, WorkflowFile *file, std::string src_mailbox, std::shared_ptr< FileLocation > src_location, std::string dst_mailbox, std::shared_ptr< FileLocation > dst_location, std::string answer_mailbox_if_read, std::string answer_mailbox_if_write, std::string answer_mailbox_if_copy, bool success, std::shared_ptr< FailureCause > failure_cause)
Constructor.
Definition: FileTransferThreadMessage.h:66
wrench::ServiceMessage
Top-level class for messages received/sent by a Service.
Definition: ServiceMessage.h:27
wrench
Definition: Alarm.cpp:20
wrench::FileTransferThreadNotificationMessage::dst_location
std::shared_ptr< FileLocation > dst_location
Destination location (or nullptr if source wasn't a location)
Definition: FileTransferThreadMessage.h:100
wrench::FileTransferThreadNotificationMessage::answer_mailbox_if_copy
std::string answer_mailbox_if_copy
If this was a file copy, the mailbox to which an answer should be send.
Definition: FileTransferThreadMessage.h:107
wrench::SimulationMessage::payload
double payload
The message size in bytes.
Definition: SimulationMessage.h:39
wrench::FileTransferThreadNotificationMessage::src_mailbox
std::string src_mailbox
Source mailbox (or "" if source wasn't a mailbox)
Definition: FileTransferThreadMessage.h:93
wrench::FileTransferThreadMessage::FileTransferThreadMessage
FileTransferThreadMessage(std::string name, double payload)
Constructor.
Definition: FileTransferThreadMessage.h:41
wrench::FileTransferThreadNotificationMessage::file_transfer_thread
std::shared_ptr< FileTransferThread > file_transfer_thread
File transfer thread that sent this message.
Definition: FileTransferThreadMessage.h:88
wrench::FileTransferThreadNotificationMessage::success
bool success
Whether the transfer succeeded or not.
Definition: FileTransferThreadMessage.h:109
wrench::FileTransferThreadNotificationMessage::dst_mailbox
std::string dst_mailbox
Destination mailbox (or "" if destination wasn't a mailbox)
Definition: FileTransferThreadMessage.h:98
wrench::FileTransferThreadNotificationMessage::src_location
std::shared_ptr< FileLocation > src_location
Source location (or nullptr if source wasn't a location)
Definition: FileTransferThreadMessage.h:95
wrench::FileTransferThreadNotificationMessage
A message sent to by a FileTransferThread to report on success/failure of the transfer.
Definition: FileTransferThreadMessage.h:49
wrench::WorkflowFile
A data file used/produced by a WorkflowTask in a Workflow.
Definition: WorkflowFile.h:26
wrench::FileTransferThreadNotificationMessage::answer_mailbox_if_read
std::string answer_mailbox_if_read
If this was a file read, the mailbox to which an answer should be send.
Definition: FileTransferThreadMessage.h:103