public class ValidatingReplyCallback extends AbstractReplyCallback<Reply>
ERROR_CODE_FIELD, ERROR_MESSAGE_FIELDS
Constructor and Description |
---|
ValidatingReplyCallback(FutureReplyCallback delegate)
Create a new ValidatingReplyCallback.
|
Modifier and Type | Method and Description |
---|---|
protected Reply |
convert(Reply reply)
Converts the
Reply into the final response type. |
boolean |
isLightWeight()
Returns true if the callback is lightweight and can be safely performed
in the receive thread.
|
exception, getForwardCallback, handle
asError, asError, asError, asError, asString, callback, checkForError, toInt, verify
public ValidatingReplyCallback(FutureReplyCallback delegate)
delegate
- The delegate that we can wait on for the reply.public boolean isLightWeight()
Overridden to return true if the forwardCallback
is a FutureCallback
or to forward the call if
the forwardCallback
is a ReplyCallback
.
Overridden to return true as there is no additional processing.
isLightWeight
in interface ReplyCallback
isLightWeight
in class AbstractReplyCallback<Reply>
protected Reply convert(Reply reply) throws MongoDbException
Reply
into the final response type.
Overridden to return the original reply.
convert
in class AbstractReplyCallback<Reply>
reply
- The reply to convert.MongoDbException
- On a failure converting the reply. Generally, the
AbstractValidatingReplyCallback.verify(Reply)
method should be used to report
errors.Copyright © 2011–2014 Allanbank Consulting, Inc.. All rights reserved.