#include <MultiThreadedConnector.h>
Inheritance diagram for MultiThreadedConnector:
Definition at line 74 of file MultiThreadedConnector.h.
Public Member Functions | |
MultiThreadedConnector (Source *source, bool reconnect) throw ( Exception ) | |
Constructor based on a Source. | |
MultiThreadedConnector (Source *source, Sink *sink, bool reconnect) throw ( Exception ) | |
Constructor based on a Source and a Sink. | |
MultiThreadedConnector (const MultiThreadedConnector &connector) throw ( Exception ) | |
Copy constructor. | |
virtual | ~MultiThreadedConnector (void) throw ( Exception ) |
Destructor. | |
virtual MultiThreadedConnector & | operator= (const MultiThreadedConnector &connector) throw ( Exception ) |
Assignment operator. | |
virtual bool | open (void) throw ( Exception ) |
Open the connector. | |
virtual unsigned int | transfer (unsigned long bytes, unsigned int bufSize, unsigned int sec, unsigned int usec) throw ( Exception ) |
Transfer a given amount of data from the Source to all the Sinks attached. | |
virtual void | close (void) throw ( Exception ) |
Close the Connector. | |
void | sinkThread (int ixSink) |
This is the function for each thread. | |
Protected Member Functions | |
MultiThreadedConnector (void) throw ( Exception ) | |
Default constructor. | |
Classes | |
class | ThreadData |
Helper class to collect information for starting threads. |
|
Default constructor. Always throws an Exception.
Definition at line 202 of file MultiThreadedConnector.h. |
|
Constructor based on a Source.
Definition at line 220 of file MultiThreadedConnector.h. |
|
Constructor based on a Source and a Sink.
Definition at line 239 of file MultiThreadedConnector.h. |
|
Copy constructor.
Definition at line 96 of file MultiThreadedConnector.cpp. |
|
Destructor.
Definition at line 263 of file MultiThreadedConnector.h. |
|
Close the Connector. The Source and all Sinks are closed.
Reimplemented from Connector. Definition at line 345 of file MultiThreadedConnector.cpp. References Connector::close(), and Connector::numSinks. |
|
Open the connector. Opens the Source and the Sinks if necessary.
Reimplemented from Connector. Definition at line 147 of file MultiThreadedConnector.cpp. References Connector::numSinks, Connector::open(), and Reporter::reportEvent(). |
|
Assignment operator.
Definition at line 119 of file MultiThreadedConnector.cpp. References Connector::operator=(). |
|
This is the function for each thread. This function has to return fast
Definition at line 280 of file MultiThreadedConnector.cpp. References Sink::canWrite(), Sink::close(), Ref< T >::get(), Sink::isOpen(), Sink::open(), Reporter::reportEvent(), Connector::sinks, and Sink::write(). |
|
Transfer a given amount of data from the Source to all the Sinks attached. If an attached Sink closes or encounteres an error during the process, it is detached and the function carries on with the rest of the Sinks. If no Sinks remain, or an error is encountered with the Source, the function returns prematurely.
Reimplemented from Connector. Definition at line 212 of file MultiThreadedConnector.cpp. |