forked from docker-java/docker-java
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathResultCallback.java
More file actions
31 lines (23 loc) · 871 Bytes
/
Copy pathResultCallback.java
File metadata and controls
31 lines (23 loc) · 871 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
package com.github.dockerjava.api.async;
import java.io.Closeable;
/**
* Result callback
*/
public interface ResultCallback<A_RES_T> extends Closeable {
class Adapter<A_RES_T> extends ResultCallbackTemplate<Adapter<A_RES_T>, A_RES_T> {
@Override
public void onNext(A_RES_T object) {
}
}
/**
* Called when the async processing starts respectively when the response arrives from the server. The passed {@link Closeable} can be
* used to close/interrupt the processing.
*/
void onStart(Closeable closeable);
/** Called when an async result event occurs */
void onNext(A_RES_T object);
/** Called when an exception occurs while processing */
void onError(Throwable throwable);
/** Called when processing was finished either by reaching the end or by aborting it */
void onComplete();
}