public class LogContainerCmdImpl extends AbstrDockerCmd<LogContainerCmd,InputStream> implements LogContainerCmd
LogContainerCmd.Exec
execution
Constructor and Description |
---|
LogContainerCmdImpl(LogContainerCmd.Exec exec,
String containerId) |
Modifier and Type | Method and Description |
---|---|
InputStream |
exec()
Its the responsibility of the caller to consume and/or close the
InputStream to prevent
connection leaks. |
String |
getContainerId() |
int |
getTail() |
boolean |
hasFollowStreamEnabled() |
boolean |
hasStderrEnabled() |
boolean |
hasStdoutEnabled() |
boolean |
hasTimestampsEnabled() |
String |
toString() |
LogContainerCmd |
withContainerId(String containerId) |
LogContainerCmd |
withFollowStream() |
LogContainerCmd |
withFollowStream(boolean followStream) |
LogContainerCmd |
withStdErr() |
LogContainerCmd |
withStdErr(boolean stderr) |
LogContainerCmd |
withStdOut() |
LogContainerCmd |
withStdOut(boolean stdout) |
LogContainerCmd |
withTail(int tail) |
LogContainerCmd |
withTailAll() |
LogContainerCmd |
withTimestamps() |
LogContainerCmd |
withTimestamps(boolean timestamps) |
close
public LogContainerCmdImpl(LogContainerCmd.Exec exec, String containerId)
public String getContainerId()
getContainerId
in interface LogContainerCmd
public int getTail()
getTail
in interface LogContainerCmd
public boolean hasFollowStreamEnabled()
hasFollowStreamEnabled
in interface LogContainerCmd
public boolean hasTimestampsEnabled()
hasTimestampsEnabled
in interface LogContainerCmd
public boolean hasStdoutEnabled()
hasStdoutEnabled
in interface LogContainerCmd
public boolean hasStderrEnabled()
hasStderrEnabled
in interface LogContainerCmd
public LogContainerCmd withContainerId(String containerId)
withContainerId
in interface LogContainerCmd
public LogContainerCmd withFollowStream()
withFollowStream
in interface LogContainerCmd
public LogContainerCmd withFollowStream(boolean followStream)
withFollowStream
in interface LogContainerCmd
public LogContainerCmd withTimestamps()
withTimestamps
in interface LogContainerCmd
public LogContainerCmd withTimestamps(boolean timestamps)
withTimestamps
in interface LogContainerCmd
public LogContainerCmd withStdOut()
withStdOut
in interface LogContainerCmd
public LogContainerCmd withStdOut(boolean stdout)
withStdOut
in interface LogContainerCmd
public LogContainerCmd withStdErr()
withStdErr
in interface LogContainerCmd
public LogContainerCmd withStdErr(boolean stderr)
withStdErr
in interface LogContainerCmd
public LogContainerCmd withTailAll()
withTailAll
in interface LogContainerCmd
public LogContainerCmd withTail(int tail)
withTail
in interface LogContainerCmd
public InputStream exec() throws NotFoundException
LogContainerCmd
InputStream
to prevent
connection leaks.exec
in interface DockerCmd<InputStream>
exec
in interface LogContainerCmd
exec
in class AbstrDockerCmd<LogContainerCmd,InputStream>
NotFoundException
- No such containerCopyright © 2015. All Rights Reserved.