components::ioservice::IOTestWriteService Class Reference

Inheritance diagram for components::ioservice::IOTestWriteService:
Inheritance graph
[legend]
Collaboration diagram for components::ioservice::IOTestWriteService:
Collaboration graph
[legend]

List of all members.

Public Member Functions

void addDataFeed (shared_ptr< DataFeed > dataFeed)
void addServiceInterface (shared_ptr< ServiceInterface > serviceInterface)
shared_ptr< ActiveObjectgetActiveObject ()
 ActiveObject getter.
shared_ptr< DataBoxgetDataBoxForDataFeed (std::string dataFeedName)
 DataBox builder for a specific DataFeed.
virtual shared_ptr< EntitygetEntity ()
 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.
 IOTestWriteService (shared_ptr< ActiveObject > ao, shared_ptr< Entity > entity, shared_ptr< ServiceInstanceDescription > serviceInstanceDescription, shared_ptr< ServiceConfiguration > serviceConfiguration)
shared_ptr< ServiceRequestmakeNewServiceRequest (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.

Detailed Description

Definition at line 56 of file IOTestWriteService.hpp.


Member Function Documentation

void Service::addServiceInterface ( shared_ptr< ServiceInterface serviceInterface  )  [inherited]
Todo:
Make these methods protected.

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.

Author:
Joao Reis

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.

Returns:
Service Logger.
Author:
Joao Reis

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.

Returns:
ActiveObject in which the Service is running.
Author:
Marco Barbosa

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

Parameters:
dataFeedName The name of the DataFeed with which this DataBox should be compatible
Returns:
A DataBox correctly formatted for the specified DataFeed..
Author:
Marco Barbosa

Definition at line 324 of file Service.cpp.

shared_ptr< Entity > Service::getEntity (  )  [virtual, inherited]

Entity getter.

This method returns the Entity to which the Service belongs.

Returns:
Entity to which the Service belongs.
Author:
Marco Barbosa

Definition at line 242 of file Service.cpp.

shared_ptr< ServiceConfiguration > Service::getServiceConfiguration (  )  [virtual, inherited]

ServiceConfiguration getter.

This method returns the ServiceConfiguration of the Service.

Returns:
ServiceConfiguration of the Service
Author:
Marco Barbosa

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.

Returns:
ServiceInstanceDescription of the Service
Author:
Marco Barbosa

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.

Returns:
ServiceTypeDescription of the Service.
Author:
Marco Barbosa

Definition at line 227 of file Service.cpp.

void IOTestWriteService::initialize (  )  [virtual]

Service initializer method.

Method that will be called when the Service is ready for user initializations.

Author:
Marco Barbosa

Implements mermaid::support::service::Service.

Definition at line 52 of file IOTestWriteService.cpp.

void mermaid::support::service::Service::logger ( const std::string &  msg  )  const [inline, protected, inherited]

Quickly log a message.

Author:
Joao Reis

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.

Returns:
Service Logger.
Author:
Joao Reis

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.

Parameters:
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.
Returns:
A ServiceRequest configured to be sent to the specified target ServiceInterface
Author:
Marco Barbosa

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.

Parameters:
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.
Author:
Marco Barbosa

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.

Parameters:
serviceInterfaceName The name of the interface for which to register the handler
handler The handler for this ServiceInterface
Author:
Marco Barbosa

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.

Parameters:
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.
Author:
Marco Barbosa

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.

Parameters:
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.
Author:
Marco Barbosa

Definition at line 337 of file Service.cpp.

void IOTestWriteService::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

Author:
Marco Barbosa + Nelson Ramos

Reimplemented from mermaid::support::service::Service.

Definition at line 68 of file IOTestWriteService.cpp.

Generated on Fri Mar 4 22:15:41 2011 for MeRMaID::support by  doxygen 1.6.3