public final class SingleDocumentCallback extends AbstractReplyCallback<Document>
Reply
into a single document.ERROR_CODE_FIELD, ERROR_MESSAGE_FIELDS
Constructor and Description |
---|
SingleDocumentCallback(Callback<Document> results)
Create a new CursorCallback.
|
Modifier and Type | Method and Description |
---|---|
protected Document |
convert(Reply reply)
Converts the
Reply into the final response type. |
exception, getForwardCallback, handle, isLightWeight
asError, asError, asError, asError, asString, callback, checkForError, toInt, verify
protected Document convert(Reply reply) throws MongoDbException
Reply
into the final response type.
Overridden to construct a MongoIteratorImpl
around the reply.
convert
in class AbstractReplyCallback<Document>
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.