Issue #3488 Create an EmbeddedSever extracting code from Main class and adding a builder pattern
Descriptions of the changes in this PR:
Motivation
Is enough common for project to start an embedded version of BK using such classes. Instead of rewrite every time boilerplate code the full server instantiation can be extracted from Main class creating a public API to create BookieService from configurations and/or provided component instances.
Changes
I've took code from Main class and refactored into a builder as EmbeddedServer class. Just providing the configuration to the builder produces the same server that Main class was generating. Added multiple builder properties to permit to inject custom implementations for various components. "Injected" component lifecycle is responsability of the implementor (ie.: if you provide specific instances you need to remember to start and/or stop such instances accordingly)
Master Issue: #3488
rerun failure checks
LGTM. There are couple of failing tests on the CI, on the first glance seem to be related to the change. Please take a look.
@diegosalvi have a look at failing tests on the CI
@diegosalvi PTAL
rerun failure checks
Finally checks all green