Template Class IConsumer

Inheritance Relationships

Derived Types

Class Documentation

template<typename T>
class IConsumer

Parent class for for arbitrary consumers.

Template Parameters:

T – Type of the consumed products

Subclassed by urcl::comm::MultiConsumer< T >, urcl::comm::ShellConsumer< T >

Public Functions

inline virtual void setupConsumer()

Set-up functionality of the consumer.

inline virtual void teardownConsumer()

Fully tears down the consumer - by default no difference to stopping it.

inline virtual void stopConsumer()

Stops the consumer.

inline virtual void onTimeout()

Functionality for handling consumer timeouts.

virtual bool consume(std::shared_ptr<T> product) = 0

Consumes a product, utilizing it’s contents.

Parameters:

product – Shared pointer to the product to be consumed.

Returns:

Success of the consumption.