public class FrameConsumerResultCallback extends com.github.dockerjava.core.async.ResultCallbackTemplate<FrameConsumerResultCallback,com.github.dockerjava.api.model.Frame>
Constructor and Description |
---|
FrameConsumerResultCallback() |
Modifier and Type | Method and Description |
---|---|
void |
addConsumer(OutputFrame.OutputType outputType,
Consumer<OutputFrame> consumer)
Set this callback to use the specified consumer for the given output type.
|
void |
close() |
CountDownLatch |
getCompletionLatch() |
void |
onError(Throwable throwable) |
void |
onNext(com.github.dockerjava.api.model.Frame frame) |
public void addConsumer(OutputFrame.OutputType outputType, 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(Throwable throwable)
onError
in interface com.github.dockerjava.api.async.ResultCallback<com.github.dockerjava.api.model.Frame>
onError
in class com.github.dockerjava.core.async.ResultCallbackTemplate<FrameConsumerResultCallback,com.github.dockerjava.api.model.Frame>
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
close
in class com.github.dockerjava.core.async.ResultCallbackTemplate<FrameConsumerResultCallback,com.github.dockerjava.api.model.Frame>
IOException
public CountDownLatch getCompletionLatch()
CountDownLatch
that may be used to wait until close()
has been called.Copyright © 2017. All rights reserved.