public class IteratorToListCallbackAdapter extends Object implements Callback<MongoIterator<Document>>
Constructor and Description |
---|
IteratorToListCallbackAdapter(Callback<List<Document>> delegate)
Creates a new IteratorToListCallbackAdapter.
|
Modifier and Type | Method and Description |
---|---|
void |
callback(MongoIterator<Document> result)
Called when the MongoDB operation has completed with the result of the
operation.
|
void |
exception(Throwable thrown)
Called when the operation fails due to an exception.
|
public void callback(MongoIterator<Document> result)
Overridden to collect all of the results and then call the delegate.
callback
in interface Callback<MongoIterator<Document>>
result
- The result of the operation.public void exception(Throwable thrown)
Overridden to forward to the delegate.
exception
in interface Callback<MongoIterator<Document>>
thrown
- The thrown exception.Copyright © 2011–2014 Allanbank Consulting, Inc.. All rights reserved.