public class LogRequestor extends Thread implements LogGetHandle
Thread.State, Thread.UncaughtExceptionHandlerMAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY| Constructor and Description |
|---|
LogRequestor(org.apache.http.client.HttpClient client,
UrlBuilder urlBuilder,
String containerId,
LogCallback callback)
Create a helper object for requesting log entries synchronously (
fetchLogs()) or asynchronously (Thread.start(). |
| Modifier and Type | Method and Description |
|---|---|
void |
fetchLogs()
Get logs and feed a callback with the content
|
void |
finish() |
DockerAccessException |
getException() |
boolean |
isError() |
void |
run() |
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yieldpublic LogRequestor(org.apache.http.client.HttpClient client,
UrlBuilder urlBuilder,
String containerId,
LogCallback callback)
fetchLogs()) or asynchronously (Thread.start().client - HTTP client to use for requesting the docker hosturlBuilder - builder that creates docker urlscontainerId - container for which to fetch the hostcallback - callback to call for each line receivedpublic void fetchLogs()
public void finish()
finish in interface LogGetHandlepublic boolean isError()
isError in interface LogGetHandlepublic DockerAccessException getException()
getException in interface LogGetHandleCopyright © 2016. All Rights Reserved.