Package com.yahoo.documentapi
Class DocumentResponse
- java.lang.Object
-
- com.yahoo.documentapi.Response
-
- com.yahoo.documentapi.DocumentResponse
-
public class DocumentResponse extends Response
The asynchronous response to a document put or get operation. This is a value object.- Author:
- Einar M R Rosenvinge
-
-
Constructor Summary
Constructors Constructor Description DocumentResponse(long requestId)
Creates a successful responseDocumentResponse(long requestId, com.yahoo.document.Document document)
Creates a successful response containing a documentDocumentResponse(long requestId, com.yahoo.document.Document document, java.lang.String textMessage, boolean success)
Creates a response containing a textual message and/or a documentDocumentResponse(long requestId, java.lang.String textMessage, boolean success)
Creates a response containing a textual message
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object o)
com.yahoo.document.Document
getDocument()
Returns the document of this response, or null if there is noneint
hashCode()
java.lang.String
toString()
-
Methods inherited from class com.yahoo.documentapi.Response
getRequestId, getTextMessage, isSuccess
-
-
-
-
Constructor Detail
-
DocumentResponse
public DocumentResponse(long requestId)
Creates a successful response
-
DocumentResponse
public DocumentResponse(long requestId, com.yahoo.document.Document document)
Creates a successful response containing a document- Parameters:
document
- the Document to encapsulate in the Response
-
DocumentResponse
public DocumentResponse(long requestId, java.lang.String textMessage, boolean success)
Creates a response containing a textual message- Parameters:
textMessage
- the message to encapsulate in the Responsesuccess
- true if the response represents a successful call
-
DocumentResponse
public DocumentResponse(long requestId, com.yahoo.document.Document document, java.lang.String textMessage, boolean success)
Creates a response containing a textual message and/or a document- Parameters:
document
- the Document to encapsulate in the ResponsetextMessage
- the message to encapsulate in the Responsesuccess
- true if the response represents a successful call
-
-