public class ReplyArrayCallback extends AbstractReplyCallback<MongoIterator<Element>>
| Modifier and Type | Field and Description |
|---|---|
static String |
DEFAULT_NAME
The default name for the values array.
|
ERROR_CODE_FIELD, ERROR_MESSAGE_FIELDS| Constructor and Description |
|---|
ReplyArrayCallback(Callback<MongoIterator<Element>> results)
Create a new ReplyDocumentCallback.
|
ReplyArrayCallback(String name,
Callback<MongoIterator<Element>> results)
Create a new ReplyDocumentCallback.
|
| Modifier and Type | Method and Description |
|---|---|
protected MongoDbException |
asError(Reply reply)
Creates an exception from the
Reply. |
protected MongoIterator<Element> |
convert(Reply reply)
Converts the
Reply into the final response type. |
exception, getForwardCallback, handle, isLightWeightasError, asError, asError, asString, callback, checkForError, toInt, verifypublic static final String DEFAULT_NAME
public ReplyArrayCallback(Callback<MongoIterator<Element>> results)
results - The callback to notify of the reply document.public ReplyArrayCallback(String name, Callback<MongoIterator<Element>> results)
name - The name of the array element in the reply document.results - The callback to notify of the reply document.protected MongoDbException asError(Reply reply)
Reply.
Creates an exception if the Reply has less than or more than a
single reply document.
asError in class AbstractValidatingReplyCallbackreply - The raw reply.protected MongoIterator<Element> convert(Reply reply) throws MongoDbException
Reply into the final response type.
Overridden to return the reply document.
convert in class AbstractReplyCallback<MongoIterator<Element>>reply - The reply to convert.MongoDbException - On a failure converting the reply. Generally, the
AbstractValidatingReplyCallback.verify(Reply) method should be used to report
errors.AbstractReplyCallback.convert(Reply)Copyright © 2011–2014 Allanbank Consulting, Inc.. All rights reserved.