Package org.hobbit.core.mimic
Class DockerBasedMimickingAlg
java.lang.Object
org.hobbit.core.mimic.DockerBasedMimickingAlg
- All Implemented Interfaces:
ContainerStateObserver,MimickingAlgorithmManager
public class DockerBasedMimickingAlg
extends Object
implements MimickingAlgorithmManager, ContainerStateObserver
This implementation of a
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.- Author:
- Michael Röder (roeder@informatik.uni-leipzig.de)
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate PlatformConnectorThe connector that offers the needed functionality of the Hobbit platform.private StringThe name of the image containing the mimicking algorithm.private static final org.slf4j.Loggerprivate Map<String,SimpleFileReceiver> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcontainerStopped(String containerName, int exitCode) voidgenerateData(String outputDirectory, String[] envVariables)
-
Field Details
-
LOGGER
private static final org.slf4j.Logger LOGGER -
dockerImage
The name of the image containing the mimicking algorithm. -
connector
The connector that offers the needed functionality of the Hobbit platform. -
receivers
-
-
Constructor Details
-
DockerBasedMimickingAlg
-
-
Method Details
-
generateData
- Specified by:
generateDatain interfaceMimickingAlgorithmManager- Throws:
Exception
-
containerStopped
- Specified by:
containerStoppedin interfaceContainerStateObserver
-