public class DockerHelper extends PortMapper implements Initializable, Killable
This basically uses docker.file from the system config to determine which compser file to use and start / stops docker for each test run or staging environment.
Also it provides a PortMapper to map the desired production ports to the
ones provided by the docker containers.
DEFAULT_PRIORITY| Constructor and Description |
|---|
DockerHelper() |
| Modifier and Type | Method and Description |
|---|---|
void |
awaitTermination()
Called after
Stoppable.stopped() has been called to wait until all tasks are fully finished. |
int |
getPriority()
Returns the priority of this element.
|
void |
initialize()
Invoked by the injector once the system is completely initialized.
|
protected Tuple<String,Integer> |
map(String service,
String host,
int port)
Maps the given port for the given service.
|
mapPort, setMapperpublic int getPriority()
PriorizedgetPriority in interface PriorizedgetPriority in interface Killableprotected Tuple<String,Integer> map(String service, String host, int port)
PortMappermap in class PortMapperservice - the service used to identify to container which provides the servicehost - the host to mapport - the port to mappublic void initialize()
throws Exception
InitializableCan be used to perform initial actions where access to dependent parts is required.
initialize in interface InitializableException - in case of any error during the initialization.public void awaitTermination()
KillableStoppable.stopped() has been called to wait until all tasks are fully finished.
This method may block for a certain amount of time to permit the subsystem to shut down properly. However, it should not block infinitely...
awaitTermination in interface KillableCopyright © 2018. All rights reserved.