semaine::components::Component Class Reference
#include <Component.h>
List of all members.
Public Member Functions |
virtual | ~Component () |
const std::string | getName () |
virtual void | messageAvailableFrom (Receiver *const source) |
void | run () |
void | requestExit () |
Static Public Attributes |
static const std::string | STATE_STARTING = "starting" |
static const std::string | STATE_READY = "ready" |
static const std::string | STATE_STOPPED = "stopped" |
static const std::string | STATE_FAILURE = "failure" |
static const std::string | STATE_STALLED = "stalled" |
Protected Member Functions |
| Component (const std::string &componentName, bool isInput=false, bool isOutput=false) throw (CMSException) |
| Component (const std::string &componentName, const std::string &cmsUrl, const std::string &cmsUser="", const std::string &cmsPassword="") throw (CMSException) |
| Component (const std::string &componentName, bool isInput, bool isOutput, const std::string &cmsUrl, const std::string &cmsUser, const std::string &cmsPassword) throw (CMSException) |
bool | exitRequested () |
virtual void | act () throw (std::exception) |
virtual void | react (SEMAINEMessage *message) throw (std::exception) |
virtual void | customStartIO () throw (std::exception) |
Protected Attributes |
std::list< Receiver * > | receivers |
std::list< Sender * > | senders |
std::queue< Receiver * > | inputWaiting |
CMSLogger * | log |
bool | _exitRequested |
std::string | state |
MetaMessenger | meta |
int | waitingTime |
bool | isInput |
bool | isOutput |
decaf::util::concurrent::Mutex | mutex |
Detailed Description
The base class for all components. Subclasses need to:
- Author:
- marc
Constructor & Destructor Documentation
semaine::components::Component::~Component |
( |
|
) |
[virtual] |
semaine::components::Component::Component |
( |
const std::string & |
componentName, |
|
|
bool |
isInput = false , |
|
|
bool |
isOutput = false | |
|
) |
| | throw (CMSException) [protected] |
Create a component with the given name. The component communicates with the default CMS server (see IOBase#IOBase()).
- Parameters:
-
| componentName | the component name as it is to be used throughout the system. |
| isInput | whether the component is an input component (optional, defaults to false) |
| isOutput | whether the component is an output component (optional, defaults to false) |
- Exceptions:
-
| JMSException | if the connection to the middleware cannot be established |
semaine::components::Component::Component |
( |
const std::string & |
componentName, |
|
|
const std::string & |
cmsUrl, |
|
|
const std::string & |
cmsUser = "" , |
|
|
const std::string & |
cmsPassword = "" | |
|
) |
| | throw (CMSException) [protected] |
Create a component with the given name. The component is neither an input nor an output component, communicates with the CMS server given in the arguments.
- Parameters:
-
| componentName | the component name as it is to be used throughout the system. |
| cmsUrl | the url where to contact the CMS server. |
| cmsUser | the username to use (optional) |
| cmsPassword | the password to use (optional) |
- Exceptions:
-
| JMSException | if the connection to the middleware cannot be established |
semaine::components::Component::Component |
( |
const std::string & |
componentName, |
|
|
bool |
isInput, |
|
|
bool |
isOutput, |
|
|
const std::string & |
cmsUrl, |
|
|
const std::string & |
cmsUser, |
|
|
const std::string & |
cmsPassword | |
|
) |
| | throw (CMSException) [protected] |
Create a component with the given name. The component communicates with the CMS server given in the arguments.
- Parameters:
-
| componentName | the component name as it is to be used throughout the system. |
| isInput | whether the component is an input component |
| isOutput | whether the component is an output component |
| cmsUrl | the url where to contact the CMS server. |
| cmsUser | the username to use (can be the empty string) |
| cmsPassword | the password to use (can be the empty string) |
- Exceptions:
-
| JMSException | if the connection to the middleware cannot be established |
Member Function Documentation
virtual void semaine::components::Component::act |
( |
|
) |
throw (std::exception) [inline, protected, virtual] |
virtual void semaine::components::Component::customStartIO |
( |
|
) |
throw (std::exception) [inline, protected, virtual] |
bool semaine::components::Component::exitRequested |
( |
|
) |
[protected] |
const std::string semaine::components::Component::getName |
( |
|
) |
[inline] |
virtual void semaine::components::Component::messageAvailableFrom |
( |
Receiver *const |
source |
) |
[virtual] |
virtual void semaine::components::Component::react |
( |
SEMAINEMessage * |
message |
) |
throw (std::exception) [inline, protected, virtual] |
void semaine::components::Component::requestExit |
( |
|
) |
|
void semaine::components::Component::run |
( |
|
) |
|
The main method executed for this Thread.
Member Data Documentation
The documentation for this class was generated from the following files: