Class LogStream

  • All Implemented Interfaces:
    com.github.dockerjava.api.async.ResultCallback<com.github.dockerjava.api.model.Frame>, Closeable, AutoCloseable

    public class LogStream
    extends com.github.dockerjava.api.async.ResultCallback.Adapter<com.github.dockerjava.api.model.Frame>
    • Constructor Detail

      • LogStream

        public LogStream​(DockerScenario scenario,
                         String contName)
                  throws de.mhus.lib.errors.NotFoundException
        Throws:
        de.mhus.lib.errors.NotFoundException
    • Method Detail

      • getOutput

        public de.mhus.lib.core.io.PipedStream getOutput()
      • onStart

        public void onStart​(Closeable closeable)
        Specified by:
        onStart in interface com.github.dockerjava.api.async.ResultCallback<com.github.dockerjava.api.model.Frame>
        Overrides:
        onStart in class com.github.dockerjava.api.async.ResultCallbackTemplate<com.github.dockerjava.api.async.ResultCallback.Adapter<com.github.dockerjava.api.model.Frame>,​com.github.dockerjava.api.model.Frame>
      • onComplete

        public void onComplete()
        Specified by:
        onComplete in interface com.github.dockerjava.api.async.ResultCallback<com.github.dockerjava.api.model.Frame>
        Overrides:
        onComplete in class com.github.dockerjava.api.async.ResultCallbackTemplate<com.github.dockerjava.api.async.ResultCallback.Adapter<com.github.dockerjava.api.model.Frame>,​com.github.dockerjava.api.model.Frame>
      • onNext

        public void onNext​(com.github.dockerjava.api.model.Frame item)
        Specified by:
        onNext in interface com.github.dockerjava.api.async.ResultCallback<com.github.dockerjava.api.model.Frame>
        Overrides:
        onNext in class com.github.dockerjava.api.async.ResultCallback.Adapter<com.github.dockerjava.api.model.Frame>
      • readLineRaw

        public LinkedList<Byte> readLineRaw()
        No UTF8 encoding supported !!!! Use: LinkedList logArray = logStream.readLine(); logArray.removeIf(v -> v == 0); String logStr = new String(MCast.toByteArray(logArray), MString.CHARSET_CHARSET_UTF_8);
        Returns:
        The next line until and inclusive LF \n, also inclusive 0 characters and CR \r
      • readLine

        public String readLine()
      • readAll

        public String readAll()
      • close

        public void close()
                   throws IOException
        Specified by:
        close in interface AutoCloseable
        Specified by:
        close in interface Closeable
        Overrides:
        close in class com.github.dockerjava.api.async.ResultCallbackTemplate<com.github.dockerjava.api.async.ResultCallback.Adapter<com.github.dockerjava.api.model.Frame>,​com.github.dockerjava.api.model.Frame>
        Throws:
        IOException
      • isPrint

        public boolean isPrint()
      • setPrint

        public LogStream setPrint​(boolean print)
      • isClosed

        public boolean isClosed()
      • setCapture

        public LogStream setCapture​(boolean capt)
      • getCaptured

        public String getCaptured()
      • setFilter

        public void setFilter​(LogFilter filter)
      • isCompleted

        public boolean isCompleted()
      • setCompleted

        public void setCompleted​(boolean completed)