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 classAntidoteResponse.ExtractionErrorAn exception thrown by response extractors when response type does not match.static interfaceAntidoteResponse.Handler<V>A transformer for all possible cases of Antidote responses.static classAntidoteResponse.MsgCommitRespstatic classAntidoteResponse.MsgErrorRespstatic classAntidoteResponse.MsgGetConnectionDescriptorResponsestatic classAntidoteResponse.MsgOperationRespstatic classAntidoteResponse.MsgReadObjectsRespstatic classAntidoteResponse.MsgStartTransactionRespstatic classAntidoteResponse.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> Vaccept(AntidoteResponse.Handler<V> handler)Handle the response using the given response transformer.static AntidoteResponseof(AntidotePB.ApbCommitResp op)static AntidoteResponseof(AntidotePB.ApbErrorResp op)static AntidoteResponseof(AntidotePB.ApbGetConnectionDescriptorResponse op)static AntidoteResponseof(AntidotePB.ApbOperationResp op)static AntidoteResponseof(AntidotePB.ApbReadObjectsResp op)static AntidoteResponseof(AntidotePB.ApbStartTransactionResp op)static AntidoteResponseof(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.ApbGetConnectionDescriptorResponse 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
-
-