Class AbstractCouchbaseResponse
- java.lang.Object
-
- com.couchbase.client.core.message.AbstractCouchbaseResponse
-
- All Implemented Interfaces:
CouchbaseMessage
,CouchbaseResponse
- Direct Known Subclasses:
AbstractKeyValueResponse
,AddNodeResponse
,AddServiceResponse
,AnalyticsHandler.KeepAliveResponse
,AnalyticsHandlerV2.KeepAliveResponse
,BucketConfigResponse
,BucketsConfigResponse
,BucketStreamingResponse
,CloseBucketResponse
,ClusterConfigResponse
,DiagnosticsResponse
,DisconnectResponse
,FlushResponse
,GenericAnalyticsResponse
,GenericQueryResponse
,GetClusterConfigResponse
,GetConfigProviderResponse
,GetDesignDocumentResponse
,GetDesignDocumentsResponse
,GetSearchIndexResponse
,GetUsersResponse
,InsertBucketResponse
,OpenBucketResponse
,PingResponse
,PingResponse
,PingResponse
,PingResponse
,QueryHandler.KeepAliveResponse
,QueryHandlerV2.KeepAliveResponse
,RawAnalyticsResponse
,RawQueryResponse
,RemoveBucketResponse
,RemoveDesignDocumentResponse
,RemoveNodeResponse
,RemoveSearchIndexResponse
,RemoveServiceResponse
,RemoveUserResponse
,RestApiResponse
,SearchHandler.KeepAliveResponse
,SearchQueryResponse
,SeedNodesResponse
,UpdateBucketResponse
,UpsertDesignDocumentResponse
,UpsertSearchIndexResponse
,UpsertUserResponse
,ViewHandler.KeepAliveResponse
,ViewQueryResponse
public abstract class AbstractCouchbaseResponse extends Object implements CouchbaseResponse
The default representation of aCouchbaseResponse
.- Since:
- 1.0
- Author:
- Michael Nitschinger
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractCouchbaseResponse(ResponseStatus status, CouchbaseRequest request)
Sets the required properties for the response.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long
creationTime()
Returns the time in nanoseconds when the message was created.CouchbaseRequest
request()
Stub method implementation which needs to be overridden by all responses that support cloning.ResponseStatus
status()
The typesafe status of the response.ResponseStatusDetails
statusDetails()
If set, provides more detailed information into the response status than the always availableResponseStatus
enum.void
statusDetails(ResponseStatusDetails statusDetails)
Set the status details if not set previously.String
toString()
-
-
-
Constructor Detail
-
AbstractCouchbaseResponse
protected AbstractCouchbaseResponse(ResponseStatus status, CouchbaseRequest request)
Sets the required properties for the response.- Parameters:
status
- the status of the response.
-
-
Method Detail
-
status
public ResponseStatus status()
Description copied from interface:CouchbaseResponse
The typesafe status of the response.- Specified by:
status
in interfaceCouchbaseResponse
- Returns:
- the status.
-
statusDetails
public ResponseStatusDetails statusDetails()
Description copied from interface:CouchbaseResponse
If set, provides more detailed information into the response status than the always availableResponseStatus
enum.- Specified by:
statusDetails
in interfaceCouchbaseResponse
- Returns:
- null or the
ResponseStatusDetails
.
-
statusDetails
public void statusDetails(ResponseStatusDetails statusDetails)
Description copied from interface:CouchbaseResponse
Set the status details if not set previously.- Specified by:
statusDetails
in interfaceCouchbaseResponse
- Parameters:
statusDetails
- the details to be set.
-
request
public CouchbaseRequest request()
Stub method implementation which needs to be overridden by all responses that support cloning.- Specified by:
request
in interfaceCouchbaseResponse
- Returns:
- a fresh request.
-
creationTime
public long creationTime()
Description copied from interface:CouchbaseMessage
Returns the time in nanoseconds when the message was created.- Specified by:
creationTime
in interfaceCouchbaseMessage
- Returns:
- the creation time in nanoseconds.
-
-