Class AbstractDockerInstantiator
java.lang.Object
net.ssehub.easy.instantiation.core.model.defaultInstantiators.AbstractFileInstantiator
net.ssehub.easy.instantiation.docker.instantiators.AbstractDockerInstantiator
- All Implemented Interfaces:
net.ssehub.easy.instantiation.core.model.vilTypes.IVilType
- Direct Known Subclasses:
DockerBuildImage,DockerImageName,DockerLoadImage,DockerLogin,DockerLoginByToken,DockerLogout,DockerPushImage,DockerRemoveImage,DockerSaveImage
public abstract class AbstractDockerInstantiator
extends net.ssehub.easy.instantiation.core.model.defaultInstantiators.AbstractFileInstantiator
Abstract reusable docker instantiator, basic implementation for the individual commands.
- Author:
- Monika Staciwa
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected static com.github.dockerjava.api.DockerClientReturns the docker client instance.(package private) static voidhandleThrowable(Throwable th, net.ssehub.easy.instantiation.core.model.execution.IInstantiatorTracer tracer, String task) Handles a throwable depending onFAIL_ON_ERROR.(package private) static booleanskip()Shall we skip?Methods inherited from class net.ssehub.easy.instantiation.core.model.defaultInstantiators.AbstractFileInstantiator
determineTargetPath, toString
-
Field Details
-
FAIL_ON_ERROR
protected static final boolean FAIL_ON_ERROR -
SKIP_ID
-
DOCKER_HOST
-
-
Constructor Details
-
AbstractDockerInstantiator
public AbstractDockerInstantiator()
-
-
Method Details
-
createClient
protected static com.github.dockerjava.api.DockerClient createClient()Returns the docker client instance.- Returns:
- the docker client instance
-
handleThrowable
static void handleThrowable(Throwable th, net.ssehub.easy.instantiation.core.model.execution.IInstantiatorTracer tracer, String task) throws net.ssehub.easy.instantiation.core.model.common.VilException Handles a throwable depending onFAIL_ON_ERROR.- Parameters:
th- the throwable (may be null for none)tracer- the tracer to informtask- a task description to include into the message- Throws:
net.ssehub.easy.instantiation.core.model.common.VilException- if notFAIL_ON_ERRORandthis given,this turned into aVilException
-
skip
static boolean skip()Shall we skip?- Returns:
truefor skip,falsefor run Docker
-