Package com.yahoo.documentapi
Class DocumentResponse
java.lang.Object
com.yahoo.documentapi.Response
com.yahoo.documentapi.DocumentResponse
The asynchronous response to a document put or get operation.
This is a value object.
- Author:
- Einar M R Rosenvinge
-
Nested Class Summary
Nested classes/interfaces inherited from class com.yahoo.documentapi.Response
Response.Outcome -
Constructor Summary
ConstructorsConstructorDescriptionDocumentResponse(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, com.yahoo.messagebus.Trace trace) Creates a successful response containing a documentDocumentResponse(long requestId, com.yahoo.document.Document document, String textMessage, Response.Outcome outcome) Creates a response containing a textual message and/or a documentDocumentResponse(long requestId, com.yahoo.document.Document document, String textMessage, Response.Outcome outcome, com.yahoo.messagebus.Trace trace) Creates a response containing a textual message and/or a document -
Method Summary
Methods inherited from class com.yahoo.documentapi.Response
getRequestId, getTextMessage, getTrace, outcome
-
Constructor Details
-
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, com.yahoo.document.Document document, com.yahoo.messagebus.Trace trace) Creates a successful response containing a document- Parameters:
document- the Document to encapsulate in the Response
-
DocumentResponse
public DocumentResponse(long requestId, com.yahoo.document.Document document, String textMessage, Response.Outcome outcome) 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 Responseoutcome- the outcome of this operation
-
DocumentResponse
public DocumentResponse(long requestId, com.yahoo.document.Document document, String textMessage, Response.Outcome outcome, com.yahoo.messagebus.Trace trace) 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 Responseoutcome- the outcome of this operation
-
-
Method Details
-
getDocument
public com.yahoo.document.Document getDocument()Returns the document of this response, or null if there is none- Returns:
- the Document, or null
-
isSuccess
public boolean isSuccess()Description copied from class:ResponseReturns whether this response encodes a success or a failure -
hashCode
public int hashCode() -
equals
-
toString
-