private class AsyncQueryBatchCursor.CommandResultSingleResultCallback extends java.lang.Object implements SingleResultCallback<BsonDocument>
Modifier and Type | Field and Description |
---|---|
private SingleResultCallback<java.util.List<T>> |
callback |
private AsyncConnection |
connection |
private ServerCursor |
cursor |
private boolean |
tryNext |
Constructor and Description |
---|
CommandResultSingleResultCallback(AsyncConnection connection,
ServerCursor cursor,
SingleResultCallback<java.util.List<T>> callback,
boolean tryNext) |
Modifier and Type | Method and Description |
---|---|
void |
onResult(BsonDocument result,
java.lang.Throwable t)
Called when the operation completes.
|
private final AsyncConnection connection
private final ServerCursor cursor
private final SingleResultCallback<java.util.List<T>> callback
private final boolean tryNext
CommandResultSingleResultCallback(AsyncConnection connection, ServerCursor cursor, SingleResultCallback<java.util.List<T>> callback, boolean tryNext)
public void onResult(BsonDocument result, java.lang.Throwable t)
SingleResultCallback
onResult
in interface SingleResultCallback<BsonDocument>
result
- the result, which may be null. Always null if e is not null.t
- the throwable, or null if the operation completed normally