Package eu.antidotedb.client.messages
Class AntidoteResponse
- java.lang.Object
-
- eu.antidotedb.client.messages.AntidoteMessage
-
- eu.antidotedb.client.messages.AntidoteResponse
-
- Direct Known Subclasses:
AntidoteResponse.MsgCommitResp
,AntidoteResponse.MsgErrorResp
,AntidoteResponse.MsgGetConnectionDescriptorResponse
,AntidoteResponse.MsgOperationResp
,AntidoteResponse.MsgReadObjectsResp
,AntidoteResponse.MsgStartTransactionResp
,AntidoteResponse.MsgStaticReadObjectsResp
public abstract class AntidoteResponse extends AntidoteMessage
Responses sent by Antidote on the Protocol Buffer interface.New instance can be created using the methods
of(AntidotePB.ApbErrorResp)
,of(AntidotePB.ApbCommitResp)
,of(AntidotePB.ApbOperationResp)
,of(AntidotePB.ApbReadObjectsResp)
,of(AntidotePB.ApbStartTransactionResp)
andof(AntidotePB.ApbStaticReadObjectsResp)
.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
AntidoteResponse.ExtractionError
An exception thrown by response extractors when response type does not match.static interface
AntidoteResponse.Handler<V>
A transformer for all possible cases of Antidote responses.static class
AntidoteResponse.MsgCommitResp
static class
AntidoteResponse.MsgErrorResp
static class
AntidoteResponse.MsgGetConnectionDescriptorResponse
static class
AntidoteResponse.MsgOperationResp
static class
AntidoteResponse.MsgReadObjectsResp
static class
AntidoteResponse.MsgStartTransactionResp
static class
AntidoteResponse.MsgStaticReadObjectsResp
-
Constructor Summary
Constructors Constructor Description AntidoteResponse()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract <V> V
accept(AntidoteResponse.Handler<V> handler)
Handle the response using the given response transformer.static AntidoteResponse
of(AntidotePB.ApbCommitResp op)
static AntidoteResponse
of(AntidotePB.ApbErrorResp op)
static AntidoteResponse
of(AntidotePB.ApbGetConnectionDescriptorResp op)
static AntidoteResponse
of(AntidotePB.ApbOperationResp op)
static AntidoteResponse
of(AntidotePB.ApbReadObjectsResp op)
static AntidoteResponse
of(AntidotePB.ApbStartTransactionResp op)
static AntidoteResponse
of(AntidotePB.ApbStaticReadObjectsResp op)
-
-
-
Method Detail
-
of
public static AntidoteResponse of(AntidotePB.ApbErrorResp op)
-
of
public static AntidoteResponse of(AntidotePB.ApbOperationResp op)
-
of
public static AntidoteResponse of(AntidotePB.ApbStartTransactionResp op)
-
of
public static AntidoteResponse of(AntidotePB.ApbReadObjectsResp op)
-
of
public static AntidoteResponse of(AntidotePB.ApbCommitResp op)
-
of
public static AntidoteResponse of(AntidotePB.ApbStaticReadObjectsResp op)
-
of
public static AntidoteResponse of(AntidotePB.ApbGetConnectionDescriptorResp op)
-
accept
public abstract <V> V accept(AntidoteResponse.Handler<V> handler)
Handle the response using the given response transformer.- Type Parameters:
V
- the result type of the transformer methods- Parameters:
handler
- the implementation of the handling methods- Returns:
- the result of the matching transformer method
-
-