de::gsi::bel::utils::Decouple Class Reference

List of all members.

Public Member Functions

 Decouple ()
void addListener (DecoupleListener listener)
void rmListener (DecoupleListener listener)
void stop ()
void trigger ()
void run ()

Detailed Description

Decoupler Thread. Useful to do some job in another thread context. E.g. a receiver thread adds a listener to the decoupler, pushes received messages to a queue and triggers the decoupler. The receiver thread is then again ready to receive. When the decoupler is triggered it calls the listeners dispatch function which reads the queue and does the processing of the message.

Author:
huhmann


Constructor & Destructor Documentation

de::gsi::bel::utils::Decouple::Decouple (  )  [inline]

Creates the decoupler and starts its processing thread.


Member Function Documentation

void de::gsi::bel::utils::Decouple::addListener ( DecoupleListener  listener  )  [inline]

Add to the Decoupler a listener which has to implement the dispatch function.

Parameters:
listener Listener to add.

void de::gsi::bel::utils::Decouple::rmListener ( DecoupleListener  listener  )  [inline]

Remove a listener.

Parameters:
listener The listener to remove.

void de::gsi::bel::utils::Decouple::run (  )  [inline]

The decoupler's working thread. It will call all the listeners' dispatch functions when triggered.

void de::gsi::bel::utils::Decouple::stop (  )  [inline]

Stop the decoupler processing thread.

void de::gsi::bel::utils::Decouple::trigger (  )  [inline]

Trigger the decoupler. It will call the dispatcher of all his listeners.


The documentation for this class was generated from the following file:
Generated on 4 Mar 2014 for utilsjava by  doxygen 1.4.7