Public Member Functions | |
void | addDataFeed (shared_ptr< DataFeed > dataFeed) |
void | addServiceInterface (shared_ptr< ServiceInterface > serviceInterface) |
DummyService (shared_ptr< ActiveObject > ao, shared_ptr< Entity > entity, shared_ptr< ServiceInstanceDescription > serviceInstanceDescription, shared_ptr< ServiceConfiguration > serviceConfiguration) | |
shared_ptr< ActiveObject > | getActiveObject () |
ActiveObject getter. | |
shared_ptr< DataBox > | getDataBoxForDataFeed (std::string dataFeedName) |
DataBox builder for a specific DataFeed. | |
virtual shared_ptr< Entity > | getEntity () |
Entity getter. | |
virtual shared_ptr < ServiceConfiguration > | getServiceConfiguration () |
ServiceConfiguration getter. | |
virtual shared_ptr < ServiceInstanceDescription > | getServiceInstanceDescription () |
ServiceInstanceDescription getter. | |
virtual std::vector < shared_ptr < ServiceTypeDescription > > | getServiceTypeDescriptions () |
ServiceTypeDescription getter. | |
virtual void | initialize () |
Service initializer method. | |
shared_ptr< ServiceRequest > | makeNewServiceRequest (std::string targetEntityName, std::string targetServiceName, std::string targetServiceInterfaceName) |
Creates a new ServiceRequest. | |
void | registerDataFeedInputHandler (std::string producerEntityName, std::string producerServiceName, std::string dataFeedName, shared_ptr< DataFeedInputHandlerMethodBase > handlerMethod) |
Registers a DataFeedInputHandler. | |
void | registerServiceInterfaceHandlerMethod (std::string serviceInterfaceName, shared_ptr< ServiceInterfaceHandlerMethodBase > handlerMethod) |
Registers a ServiceInterfaceHandler. | |
void | sendServiceRequest (shared_ptr< ServiceRequest > serviceRequest, shared_ptr< ServiceReplyHandlerMethodBase > replyHandlerMethod=shared_ptr< ServiceReplyHandlerMethodBase >()) |
Sends a ServiceRequest. | |
void | sendToDataFeed (std::string dataFeedName, shared_ptr< DataBox > dataBox) |
Method used to send data to a DataFeed. | |
virtual void | update () |
Method that is called regularly by the ServiceUpdateTask. | |
Protected Member Functions | |
void | debug (const std::string &msg) const |
Quickly log a debug message. | |
const shared_ptr< Logger > & | debug () const |
Service Debug Logger getter. | |
void | logger (const std::string &msg) const |
Quickly log a message. | |
const shared_ptr< Logger > & | logger () const |
Service Logger getter. |
Definition at line 50 of file DummyService.hpp.
void Service::addServiceInterface | ( | shared_ptr< ServiceInterface > | serviceInterface | ) | [inherited] |
Definition at line 185 of file Service.cpp.
void mermaid::support::service::Service::debug | ( | const std::string & | msg | ) | const [inline, protected, inherited] |
Quickly log a debug message.
Definition at line 345 of file Service.hpp.
const shared_ptr< Logger > & mermaid::support::service::Service::debug | ( | ) | const [inline, protected, inherited] |
Service Debug Logger getter.
This method returns the Service Debug Logger. Use this logger for debugging purposes only.
Definition at line 341 of file Service.hpp.
shared_ptr< ActiveObject > Service::getActiveObject | ( | ) | [inherited] |
ActiveObject getter.
This method returns the ActiveObject in which the Service is running.
Definition at line 247 of file Service.cpp.
shared_ptr< DataBox > Service::getDataBoxForDataFeed | ( | std::string | dataFeedName | ) | [inherited] |
DataBox builder for a specific DataFeed.
This method builds a DataBox formatted according to the defined data format of the specified DataFeed
dataFeedName | The name of the DataFeed with which this DataBox should be compatible |
Definition at line 324 of file Service.cpp.
shared_ptr< Entity > Service::getEntity | ( | ) | [virtual, inherited] |
shared_ptr< ServiceConfiguration > Service::getServiceConfiguration | ( | ) | [virtual, inherited] |
ServiceConfiguration getter.
This method returns the ServiceConfiguration of the Service.
Definition at line 237 of file Service.cpp.
shared_ptr< ServiceInstanceDescription > Service::getServiceInstanceDescription | ( | ) | [virtual, inherited] |
ServiceInstanceDescription getter.
This method returns the ServiceInstanceDescription of the Service.
Definition at line 232 of file Service.cpp.
std::vector< shared_ptr< ServiceTypeDescription > > Service::getServiceTypeDescriptions | ( | ) | [virtual, inherited] |
ServiceTypeDescription getter.
This method returns the ServiceTypeDescription of the Service.
Definition at line 227 of file Service.cpp.
void DummyService::initialize | ( | ) | [virtual] |
Service initializer method.
Method that will be called when the Service is ready for user initializations.
Implements mermaid::support::service::Service.
Definition at line 46 of file DummyService.cpp.
void mermaid::support::service::Service::logger | ( | const std::string & | msg | ) | const [inline, protected, inherited] |
Quickly log a message.
Definition at line 337 of file Service.hpp.
const shared_ptr< Logger > & mermaid::support::service::Service::logger | ( | ) | const [inline, protected, inherited] |
Service Logger getter.
This method returns the Service Logger. Use this logger for error and reporting purposes only.
Definition at line 333 of file Service.hpp.
shared_ptr< ServiceRequest > Service::makeNewServiceRequest | ( | std::string | targetEntityName, | |
std::string | targetServiceName, | |||
std::string | targetServiceInterfaceName | |||
) | [inherited] |
Creates a new ServiceRequest.
This method is used to build a new ServiceRequest to be sent to the specified target.
targetEntityName | The name of the Entity in which the target Service is located. | |
targetServiceName | The name of the target Service. | |
targetServiceInterfaceName | The name of the ServiceInterface to which the ServiceRequest should be delivered. |
Definition at line 253 of file Service.cpp.
void Service::registerDataFeedInputHandler | ( | std::string | producerEntityName, | |
std::string | producerServiceName, | |||
std::string | dataFeedName, | |||
shared_ptr< DataFeedInputHandlerMethodBase > | handlerMethod | |||
) | [inherited] |
Registers a DataFeedInputHandler.
This method is used to register a DataFeedInputHandler for a specified DataFeed.
producerEntityName | The name of the Entity in which the producer Service is located. | |
producerServiceName | The name of the producer Service. | |
dataFeedName | The name of the DataFeed for which this handler will handle data. | |
handlerMethod | The DataFeedInputHandlerHandlerMethod which points to the handler method to be called upon reception of the data. |
Definition at line 345 of file Service.cpp.
void Service::registerServiceInterfaceHandlerMethod | ( | std::string | serviceInterfaceName, | |
shared_ptr< ServiceInterfaceHandlerMethodBase > | handlerMethod | |||
) | [inherited] |
Registers a ServiceInterfaceHandler.
This method is used to define the handler for a Service's ServiceInterface. The available interfaces are defined in the ServiceTypeDescription XML file.
serviceInterfaceName | The name of the interface for which to register the handler | |
handler | The handler for this ServiceInterface |
Definition at line 213 of file Service.cpp.
void Service::sendServiceRequest | ( | shared_ptr< ServiceRequest > | serviceRequest, | |
shared_ptr< ServiceReplyHandlerMethodBase > | replyHandlerMethod = shared_ptr<ServiceReplyHandlerMethodBase>() | |||
) | [inherited] |
Sends a ServiceRequest.
This method is used to send a ServiceRequest which was previously built using the makeNewServiceRequest method and to define a handler in which he corresponding ServiceReply will be handled.
serviceRequest | The ServiceRequest to be sent (the Service to which it will be delivered was already defined in the makeNewServiceRequest method) | |
replyHandler | The handler for the ServiceReply ServiceRequestFailedException Throws ServiceRequestFailedException whenever it is impossible to send the Service Request. |
Definition at line 266 of file Service.cpp.
void Service::sendToDataFeed | ( | std::string | dataFeedName, | |
shared_ptr< DataBox > | dataBox | |||
) | [inherited] |
Method used to send data to a DataFeed.
This method is used to send data to a DataFeed owned by the Service. The available DataFeed are specified in the ServiceTypeDescription XML file.
dataFeedName | The name of the local DataFeed to which the data is going to be sent. | |
dataBox | DataBox with the data that is going to be sent to the data feed. This DataBox must have been obtained using the getDataBoxForDataFeed method. |
Definition at line 337 of file Service.cpp.
void DummyService::update | ( | ) | [virtual] |
Method that is called regularly by the ServiceUpdateTask.
This method is called by the ServiceUpdateTask at a rate which is defined in the Service instance's ServiceConfiguration
Reimplemented from mermaid::support::service::Service.
Definition at line 53 of file DummyService.cpp.