Package eu.antidotedb.client.messages
Class AntidoteRequest<Response>
- java.lang.Object
-
- eu.antidotedb.client.messages.AntidoteMessage
-
- eu.antidotedb.client.messages.AntidoteRequest<Response>
-
- Direct Known Subclasses:
AntidoteRequest.MsgAbortTransaction,AntidoteRequest.MsgCommitTransaction,AntidoteRequest.MsgReadObjects,AntidoteRequest.MsgStartTransaction,AntidoteRequest.MsgStaticReadObjects,AntidoteRequest.MsgStaticUpdateObjects,AntidoteRequest.MsgUpdateObjects
public abstract class AntidoteRequest<Response> extends AntidoteMessage
Requests sent by Antidote on the Protocol Buffer interface.New instance can be created using the methods
of(AntidotePB.ApbReadObjects),of(AntidotePB.ApbUpdateObjects),of(AntidotePB.ApbAbortTransaction),of(AntidotePB.ApbStartTransaction),of(AntidotePB.ApbCommitTransaction),of(AntidotePB.ApbStaticReadObjects)andof(AntidotePB.ApbStaticUpdateObjects).
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classAntidoteRequest.ExtractionErrorAn exception thrown by response extractors when response type does not match.static interfaceAntidoteRequest.Handler<V>A transformer for all possible cases of Antidote requests.static classAntidoteRequest.MsgAbortTransactionstatic classAntidoteRequest.MsgCommitTransactionstatic classAntidoteRequest.MsgReadObjectsstatic classAntidoteRequest.MsgStartTransactionstatic classAntidoteRequest.MsgStaticReadObjectsstatic classAntidoteRequest.MsgStaticUpdateObjectsstatic classAntidoteRequest.MsgUpdateObjects
-
Constructor Summary
Constructors Constructor Description AntidoteRequest()
-
Method Summary
-
-
-
Method Detail
-
of
public static AntidoteRequest.MsgReadObjects of(AntidotePB.ApbReadObjects op)
-
of
public static AntidoteRequest.MsgUpdateObjects of(AntidotePB.ApbUpdateObjects op)
-
of
public static AntidoteRequest.MsgStartTransaction of(AntidotePB.ApbStartTransaction op)
-
of
public static AntidoteRequest.MsgAbortTransaction of(AntidotePB.ApbAbortTransaction op)
-
of
public static AntidoteRequest.MsgCommitTransaction of(AntidotePB.ApbCommitTransaction op)
-
of
public static AntidoteRequest.MsgStaticReadObjects of(AntidotePB.ApbStaticReadObjects op)
-
of
public static AntidoteRequest.MsgStaticUpdateObjects of(AntidotePB.ApbStaticUpdateObjects op)
-
of
public static eu.antidotedb.client.messages.AntidoteRequest.MsgCreateDC of(AntidotePB.ApbCreateDC op)
-
of
public static eu.antidotedb.client.messages.AntidoteRequest.MsgConnectToDCs of(AntidotePB.ApbConnectToDcs op)
-
of
public static eu.antidotedb.client.messages.AntidoteRequest.MsgGetConnectionDescriptor of(AntidotePB.ApbGetConnectionDescriptor op)
-
accept
public abstract <V> V accept(AntidoteRequest.Handler<V> handler)
Handle the request using the given request 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
-
readResponseExtractor
public abstract AntidoteResponse.Handler<Response> readResponseExtractor()
- Returns:
- An extractor for the expected response or null if no response is expected
-
-