Service.h
void setProperties(std::map< std::string, std::string > default_property_values, std::map< std::string, std::string > overriden_property_values)
Set default and user-defined properties.
Definition: Service.cpp:269
void setProperty(std::string, std::string)
Set a property of the Service.
Definition: Service.cpp:41
void setMessagePayload(std::string, std::string)
Set a message payload of the Service.
Definition: Service.cpp:55
std::map< std::string, std::string > property_list
The service's property list.
Definition: Service.h:104
double getMessagePayloadValueAsDouble(std::string)
Get a message payload of the Service as a double.
Definition: Service.cpp:132
A service that can be added to the simulation and that can be used by a WMS when executing a workflow...
Definition: Service.h:26
DOWN state: the service has been shutdown and/or has terminated.
Definition: Service.h:39
std::string getMessagePayloadValueAsString(std::string)
Get a message payload of the Service as a string.
Definition: Service.cpp:93
UP state: the service has been started and is still running.
Definition: Service.h:37
std::string getHostname()
Get the name of the host on which the service is / will be running.
Definition: Service.cpp:245
void setMessagePayloads(std::map< std::string, std::string > default_messagepayload_values, std::map< std::string, std::string > overriden_messagepayload_values)
Set default and user-defined message payloads.
Definition: Service.cpp:287
void serviceSanityCheck()
Check whether the service is properly configured and running.
Definition: Service.cpp:305
Service(std::string hostname, std::string process_name_prefix, std::string mailbox_name_prefix)
Constructor.
Definition: Service.cpp:31
std::string getPropertyValueAsString(std::string)
Get a property of the Service as a string.
Definition: Service.cpp:78
std::string hostname
The name of the host on which the daemon is running.
Definition: S4U_Daemon.h:47
virtual void stop()
Synchronously stop the service (does nothing if the service is already stopped)
Definition: Service.cpp:200
void setNetworkTimeoutValue(double value)
Sets the service's network timeout value.
Definition: Service.cpp:324
void setStateToDown()
Set the state of the service to DOWN.
Definition: Service.cpp:260
double getPropertyValueAsDouble(std::string)
Get a property of the Service as a double.
Definition: Service.cpp:109
double network_timeout
The time (in seconds) after which a service that doesn't send back a reply (control) message causes a...
Definition: Service.h:119
bool isUp()
Returns true if the service is UP, false otherwise.
Definition: Service.cpp:253
bool getPropertyValueAsBoolean(std::string)
Get a property of the Service as a boolean.
Definition: Service.cpp:157
std::map< std::string, std::string > messagepayload_list
The service's messagepayload list.
Definition: Service.h:107
double getNetworkTimeoutValue()
Returns the service's network timeout value.
Definition: Service.cpp:315
A generic "running daemon" abstraction that serves as a basis for all simulated processes.
Definition: S4U_Daemon.h:32
void start(std::shared_ptr< Service > this_service, bool daemonize, bool auto_restart)
Start the service.
Definition: Service.cpp:184
Definition: TerminalOutput.cpp:15