Refactor stream master constructor
Created by: michele-brambilla
Description of work
With this PR the StreamMaster
delegates a new object (the StreamerFactory
) to construct the Streamer
s. Advantages:
-
StreamMaster
is no more a template class - the
AbstractStreamerFactory
let us add stub Streamers that can be used to test theStreamMaster
- the
StreamerBase
class implements all the public methods of theStreamer
butpollAndProcess
. This makes easier test theStreamer
.
The StreamMaster
constructor has changed. Some informations are now collected from MainOpt
rather than constructor arguments.
The Streamer
doesn't handle the sources list: a new object (the SourcesHandler
) is in charge of doing that.
Acceptance Criteria
- The
StreamMaster
can be constructed using different types ofStreamer
Unit Tests
- Added tests for the
StreamerFactory
- Added tests for the
StreamMaster
- Added tests for the
SourceHandler
Code Review (To be filled in by the reviewer only)
-
Is the code of an acceptable quality? -
Do the changes function as described and is it robust?
Nominate for Group Code Review (Anyone can nominate it)
Indicate if you think the code should be reviewed in a Thursday code review session.
-
Recommend for group code review
Also, nominate it on the code_review Slack channel (does someone want to automate this?).