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
    Modifier and Type
    Field
    Description
    private static final String
     
    protected static final boolean
     
    protected static final String
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected static com.github.dockerjava.api.DockerClient
    Returns the docker client instance.
    (package private) static void
    handleThrowable(Throwable th, net.ssehub.easy.instantiation.core.model.execution.IInstantiatorTracer tracer, String task)
    Handles a throwable depending on FAIL_ON_ERROR.
    (package private) static boolean
    Shall we skip?

    Methods inherited from class net.ssehub.easy.instantiation.core.model.defaultInstantiators.AbstractFileInstantiator

    determineTargetPath, toString

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • FAIL_ON_ERROR

      protected static final boolean FAIL_ON_ERROR
    • SKIP_ID

      protected static final String SKIP_ID
    • DOCKER_HOST

      private static final String 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 on FAIL_ON_ERROR.
      Parameters:
      th - the throwable (may be null for none)
      tracer - the tracer to inform
      task - a task description to include into the message
      Throws:
      net.ssehub.easy.instantiation.core.model.common.VilException - if not FAIL_ON_ERROR and th is given, th is turned into a VilException
    • skip

      static boolean skip()
      Shall we skip?
      Returns:
      true for skip, false for run Docker