public class FrameConsumerResultCallback extends com.github.dockerjava.api.async.ResultCallbackTemplate<FrameConsumerResultCallback,com.github.dockerjava.api.model.Frame>
| Constructor and Description |
|---|
FrameConsumerResultCallback() |
| Modifier and Type | Method and Description |
|---|---|
void |
addConsumer(OutputFrame.OutputType outputType,
java.util.function.Consumer<OutputFrame> consumer)
Set this callback to use the specified consumer for the given output type.
|
void |
close() |
java.util.concurrent.CountDownLatch |
getCompletionLatch() |
void |
onError(java.lang.Throwable throwable) |
void |
onNext(com.github.dockerjava.api.model.Frame frame) |
public void addConsumer(OutputFrame.OutputType outputType, java.util.function.Consumer<OutputFrame> consumer)
outputType - the output type to configureconsumer - the consumer to use for that output typepublic void onNext(com.github.dockerjava.api.model.Frame frame)
public void onError(java.lang.Throwable throwable)
onError in interface com.github.dockerjava.api.async.ResultCallback<com.github.dockerjava.api.model.Frame>onError in class com.github.dockerjava.api.async.ResultCallbackTemplate<FrameConsumerResultCallback,com.github.dockerjava.api.model.Frame>public void close()
throws java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in class com.github.dockerjava.api.async.ResultCallbackTemplate<FrameConsumerResultCallback,com.github.dockerjava.api.model.Frame>java.io.IOExceptionpublic java.util.concurrent.CountDownLatch getCompletionLatch()
CountDownLatch that may be used to wait until close() has been called.