Package com.google.api.gax.rpc
Class BatchedRequestIssuer<ResponseT>
- java.lang.Object
-
- com.google.api.gax.rpc.BatchedRequestIssuer<ResponseT>
-
public final class BatchedRequestIssuer<ResponseT> extends java.lang.ObjectBatchedRequestIssuer receives a response or an exception and waits to set the given batchedFuture until sendResult() is called.This class is designed to be used by generated code.
-
-
Constructor Summary
Constructors Constructor Description BatchedRequestIssuer(BatchedFuture<ResponseT> batchedFuture, long messageCount)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description longgetMessageCount()voidsendResult()Sends back the result that was stored by either setResponse or setExceptionvoidsetException(java.lang.Throwable throwable)Set the exception to set on the batched future.voidsetResponse(ResponseT response)Set the response to set on the batched future.
-
-
-
Constructor Detail
-
BatchedRequestIssuer
public BatchedRequestIssuer(BatchedFuture<ResponseT> batchedFuture, long messageCount)
-
-
Method Detail
-
getMessageCount
public long getMessageCount()
-
setResponse
public void setResponse(ResponseT response)
Set the response to set on the batched future. If this is called, setException cannot be called.
-
setException
public void setException(java.lang.Throwable throwable)
Set the exception to set on the batched future. If this is called, setResponse cannot be called.
-
sendResult
public void sendResult()
Sends back the result that was stored by either setResponse or setException
-
-