public class DockerBasedMimickingAlg extends Object implements MimickingAlgorithmManager, ContainerStateObserver
MimickingAlgorithmManager creates a Docker
container for executing the mimicking algorithm and assumes that the
algorithm will send its data via a RabbitMQ queue. The name of the queue is
given as environment variable with the key
Constants.DATA_QUEUE_NAME_KEY. The generated data is written to a
file with the given file name.| Modifier and Type | Field and Description |
|---|---|
private PlatformConnector |
connector
The connector that offers the needed functionality of the Hobbit
platform.
|
private String |
dockerImage
The name of the image containing the mimicking algorithm.
|
private static org.slf4j.Logger |
LOGGER |
private Map<String,SimpleFileReceiver> |
receivers |
| Constructor and Description |
|---|
DockerBasedMimickingAlg(PlatformConnector connector,
String dockerImage) |
| Modifier and Type | Method and Description |
|---|---|
void |
containerStopped(String containerName,
int exitCode) |
void |
generateData(String outputDirectory,
String[] envVariables) |
private static final org.slf4j.Logger LOGGER
private String dockerImage
private PlatformConnector connector
private Map<String,SimpleFileReceiver> receivers
public DockerBasedMimickingAlg(PlatformConnector connector, String dockerImage)
public void generateData(String outputDirectory, String[] envVariables) throws Exception
generateData in interface MimickingAlgorithmManagerExceptionpublic void containerStopped(String containerName, int exitCode)
containerStopped in interface ContainerStateObserverCopyright © 2017–2018. All rights reserved.