ResponseHelper.
Will be removed from this location in a future version.-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> voidDeprecated, for removal: This API element is subject to removal in a future version.Execute aRunnabletask and on completion of the task complete the gRPC request by callingStreamObserver.onNext(Object)using the specified result and then callStreamObserver.onCompleted().static <T> voidDeprecated, for removal: This API element is subject to removal in a future version.Complete a gRPC request based on the result of aCallable.static <T> voidcomplete(io.grpc.stub.StreamObserver<T> observer, CompletionStage<T> future) Deprecated, for removal: This API element is subject to removal in a future version.Complete a gRPC request based on the result of aCompletionStage.static <T> voidcomplete(io.grpc.stub.StreamObserver<T> observer, T value) Deprecated, for removal: This API element is subject to removal in a future version.Complete a gRPC request.static <T> voidcompleteAsync(io.grpc.stub.StreamObserver<T> observer, Runnable task, T result) Deprecated, for removal: This API element is subject to removal in a future version.Asynchronously execute aRunnabletask and on completion of the task complete the gRPC request by callingStreamObserver.onNext(Object)using the specified result and then callStreamObserver.onCompleted().static <T> voidcompleteAsync(io.grpc.stub.StreamObserver<T> observer, Runnable task, T result, Executor executor) Deprecated, for removal: This API element is subject to removal in a future version.Asynchronously execute aRunnabletask and on completion of the task complete the gRPC request by callingStreamObserver.onNext(Object)using the specified result and then callStreamObserver.onCompleted().static <T> voidcompleteAsync(io.grpc.stub.StreamObserver<T> observer, Callable<T> callable) Deprecated, for removal: This API element is subject to removal in a future version.Asynchronously complete a gRPC request based on the result of aCallable.static <T> voidcompleteAsync(io.grpc.stub.StreamObserver<T> observer, Callable<T> callable, Executor executor) Deprecated, for removal: This API element is subject to removal in a future version.Asynchronously complete a gRPC request based on the result of aCallable.static <T> voidcompleteAsync(io.grpc.stub.StreamObserver<T> observer, CompletionStage<T> future) Deprecated, for removal: This API element is subject to removal in a future version.Asynchronously complete a gRPC request based on the result of aCompletionStage.static <T> voidcompleteAsync(io.grpc.stub.StreamObserver<T> observer, CompletionStage<T> future, Executor executor) Deprecated, for removal: This API element is subject to removal in a future version.Asynchronously complete a gRPC request based on the result of aCompletionStage.static <U> BiConsumer<Void, Throwable> completeWithoutResult(io.grpc.stub.StreamObserver<U> observer) Deprecated, for removal: This API element is subject to removal in a future version.Obtain aConsumerthat can be used to complete aStreamObserver.static <T,U> BiConsumer <T, Throwable> completeWithResult(io.grpc.stub.StreamObserver<U> observer) Deprecated, for removal: This API element is subject to removal in a future version.Obtain aConsumerthat can be used to send values to theStreamObserver.onNext(Object)method.static <T> Supplier<T> createSupplier(Callable<T> callable) Deprecated, for removal: This API element is subject to removal in a future version.static <T> Consumer<T> stream(io.grpc.stub.StreamObserver<T> observer, CompletionStage<Void> stage) Deprecated, for removal: This API element is subject to removal in a future version.Obtain aConsumerthat can be used to send values to theStreamObserver.onNext(Object)method until theCompletionStagecompletes then callStreamObserver.onCompleted().static <T> voidDeprecated, for removal: This API element is subject to removal in a future version.static <T> voidDeprecated, for removal: This API element is subject to removal in a future version.static <T> Consumer<T> streamAsync(io.grpc.stub.StreamObserver<T> observer, CompletionStage<Void> stage) Deprecated, for removal: This API element is subject to removal in a future version.Obtain aConsumerthat can be used to send values to theStreamObserver.onNext(Object)method until theCompletionStagecompletes then asynchronously callStreamObserver.onCompleted()using the fork-join thread pool.static <T> Consumer<T> streamAsync(io.grpc.stub.StreamObserver<T> observer, CompletionStage<Void> stage, Executor executor) Deprecated, for removal: This API element is subject to removal in a future version.Obtain aConsumerthat can be used to send values to theStreamObserver.onNext(Object)method until theCompletionStagecompletes then asynchronously callStreamObserver.onCompleted()using the executor thread.static <T> voidstreamAsync(io.grpc.stub.StreamObserver<T> observer, Supplier<Stream<? extends T>> supplier, Executor executor) Deprecated, for removal: This API element is subject to removal in a future version.static <T> voidstreamAsync(io.grpc.stub.StreamObserver<T> observer, Stream<? extends T> stream, Executor executor)
-
Method Details
-
complete
public static <T> void complete(io.grpc.stub.StreamObserver<T> observer, T value) Deprecated, for removal: This API element is subject to removal in a future version.Complete a gRPC request.The request will be completed by calling
StreamObserver.onNext(Object)using the specified value then callingStreamObserver.onCompleted().- Type Parameters:
T- they type of the request result- Parameters:
observer- theStreamObserverto completevalue- the value to use when callingStreamObserver.onNext(Object)
-
complete
Deprecated, for removal: This API element is subject to removal in a future version.Complete a gRPC request based on the result of aCompletionStage.The request will be completed by calling
StreamObserver.onNext(Object)using the result obtained on completion of the specifiedCompletionStageand then callingStreamObserver.onCompleted().If the
CompletionStagecompletes with an error thenStreamObserver.onError(Throwable)will be called.- Type Parameters:
T- they type of the request result- Parameters:
observer- theStreamObserverto completefuture- theCompletionStageto use to obtain the value to use to callStreamObserver.onNext(Object)
-
completeAsync
public static <T> void completeAsync(io.grpc.stub.StreamObserver<T> observer, CompletionStage<T> future) Deprecated, for removal: This API element is subject to removal in a future version.Asynchronously complete a gRPC request based on the result of aCompletionStage.The request will be completed by calling
StreamObserver.onNext(Object)using the result obtained on completion of the specifiedCompletionStageand then callingStreamObserver.onCompleted().If the
CompletionStagecompletes with an error thenStreamObserver.onError(Throwable)will be called.The execution will take place asynchronously on the fork-join thread pool.
- Type Parameters:
T- they type of the request result- Parameters:
observer- theStreamObserverto completefuture- theCompletionStageto use to obtain the value to use to callStreamObserver.onNext(Object)
-
completeAsync
public static <T> void completeAsync(io.grpc.stub.StreamObserver<T> observer, CompletionStage<T> future, Executor executor) Deprecated, for removal: This API element is subject to removal in a future version.Asynchronously complete a gRPC request based on the result of aCompletionStage.The request will be completed by calling
StreamObserver.onNext(Object)using the result obtained on completion of the specifiedCompletionStageand then callingStreamObserver.onCompleted().If the
CompletionStagecompletes with an error thenStreamObserver.onError(Throwable)will be called.- Type Parameters:
T- they type of the request result- Parameters:
observer- theStreamObserverto completefuture- theCompletionStageto use to obtain the value to use to callStreamObserver.onNext(Object)executor- theExecutoron which to execute the asynchronous request completion
-
complete
Deprecated, for removal: This API element is subject to removal in a future version.Complete a gRPC request based on the result of aCallable.The request will be completed by calling
StreamObserver.onNext(Object)using the result obtained on completion of the specifiedCallableand then callingStreamObserver.onCompleted().If the
Callable.call()method throws an exception thenStreamObserver.onError(Throwable)will be called.- Type Parameters:
T- they type of the request result- Parameters:
observer- theStreamObserverto completecallable- theCallableto use to obtain the value to use to callStreamObserver.onNext(Object)
-
completeAsync
Deprecated, for removal: This API element is subject to removal in a future version.Asynchronously complete a gRPC request based on the result of aCallable.The request will be completed by calling
StreamObserver.onNext(Object)using the result obtained on completion of the specifiedCallableand then callingStreamObserver.onCompleted().If the
Callable.call()method throws an exception thenStreamObserver.onError(Throwable)will be called.The execution will take place asynchronously on the fork-join thread pool.
- Type Parameters:
T- they type of the request result- Parameters:
observer- theStreamObserverto completecallable- theCallableto use to obtain the value to use to callStreamObserver.onNext(Object)
-
completeAsync
public static <T> void completeAsync(io.grpc.stub.StreamObserver<T> observer, Callable<T> callable, Executor executor) Deprecated, for removal: This API element is subject to removal in a future version.Asynchronously complete a gRPC request based on the result of aCallable.The request will be completed by calling
StreamObserver.onNext(Object)using the result obtained on completion of the specifiedCallableand then callingStreamObserver.onCompleted().If the
Callable.call()method throws an exception thenStreamObserver.onError(Throwable)will be called. -
complete
Deprecated, for removal: This API element is subject to removal in a future version.Execute aRunnabletask and on completion of the task complete the gRPC request by callingStreamObserver.onNext(Object)using the specified result and then callStreamObserver.onCompleted().If the
Runnable.run()method throws an exception thenStreamObserver.onError(Throwable)will be called.- Type Parameters:
T- they type of the request result- Parameters:
observer- theStreamObserverto completetask- theRunnableto executeresult- the result to pass toStreamObserver.onNext(Object)
-
completeAsync
public static <T> void completeAsync(io.grpc.stub.StreamObserver<T> observer, Runnable task, T result) Deprecated, for removal: This API element is subject to removal in a future version.Asynchronously execute aRunnabletask and on completion of the task complete the gRPC request by callingStreamObserver.onNext(Object)using the specified result and then callStreamObserver.onCompleted().If the
Runnable.run()method throws an exception thenStreamObserver.onError(Throwable)will be called.The task and and request completion will be executed on the fork-join thread pool.
- Type Parameters:
T- they type of the request result- Parameters:
observer- theStreamObserverto completetask- theRunnableto executeresult- the result to pass toStreamObserver.onNext(Object)
-
completeAsync
public static <T> void completeAsync(io.grpc.stub.StreamObserver<T> observer, Runnable task, T result, Executor executor) Deprecated, for removal: This API element is subject to removal in a future version.Asynchronously execute aRunnabletask and on completion of the task complete the gRPC request by callingStreamObserver.onNext(Object)using the specified result and then callStreamObserver.onCompleted().If the
Runnable.run()method throws an exception thenStreamObserver.onError(Throwable)will be called. -
stream
Deprecated, for removal: This API element is subject to removal in a future version.Send the values from aStreamto theStreamObserver.onNext(Object)method until theStreamis exhausted callStreamObserver.onCompleted().If an error occurs whilst streaming results then
StreamObserver.onError(Throwable)will be called.- Type Parameters:
T- they type of the request result- Parameters:
observer- theStreamObserverto completestream- theStreamof results to send toStreamObserver.onNext(Object)
-
streamAsync
public static <T> void streamAsync(io.grpc.stub.StreamObserver<T> observer, Stream<? extends T> stream, Executor executor) Deprecated, for removal: This API element is subject to removal in a future version. -
stream
public static <T> void stream(io.grpc.stub.StreamObserver<T> observer, Supplier<Stream<? extends T>> supplier) Deprecated, for removal: This API element is subject to removal in a future version. -
streamAsync
public static <T> void streamAsync(io.grpc.stub.StreamObserver<T> observer, Supplier<Stream<? extends T>> supplier, Executor executor) Deprecated, for removal: This API element is subject to removal in a future version. -
stream
public static <T> Consumer<T> stream(io.grpc.stub.StreamObserver<T> observer, CompletionStage<Void> stage) Deprecated, for removal: This API element is subject to removal in a future version.Obtain aConsumerthat can be used to send values to theStreamObserver.onNext(Object)method until theCompletionStagecompletes then callStreamObserver.onCompleted().If the
CompletionStagecompletes with an error thenStreamObserver.onError(Throwable)will be called instead ofStreamObserver.onCompleted().- Type Parameters:
T- they type of the request result- Parameters:
observer- theStreamObserverto send values to and complete when theCompletionStagecompletesstage- theCompletionStageto await completion of- Returns:
- a
Consumerthat can be used to send values to theStreamObserver.onNext(Object)method
-
streamAsync
public static <T> Consumer<T> streamAsync(io.grpc.stub.StreamObserver<T> observer, CompletionStage<Void> stage) Deprecated, for removal: This API element is subject to removal in a future version.Obtain aConsumerthat can be used to send values to theStreamObserver.onNext(Object)method until theCompletionStagecompletes then asynchronously callStreamObserver.onCompleted()using the fork-join thread pool.If the
CompletionStagecompletes with an error thenStreamObserver.onError(Throwable)will be called instead ofStreamObserver.onCompleted().- Type Parameters:
T- they type of the request result- Parameters:
observer- theStreamObserverto send values to and complete when theCompletionStagecompletesstage- theCompletionStageto await completion of- Returns:
- a
Consumerthat can be used to send values to theStreamObserver.onNext(Object)method
-
streamAsync
public static <T> Consumer<T> streamAsync(io.grpc.stub.StreamObserver<T> observer, CompletionStage<Void> stage, Executor executor) Deprecated, for removal: This API element is subject to removal in a future version.Obtain aConsumerthat can be used to send values to theStreamObserver.onNext(Object)method until theCompletionStagecompletes then asynchronously callStreamObserver.onCompleted()using the executor thread.If the
CompletionStagecompletes with an error thenStreamObserver.onError(Throwable)will be called instead ofStreamObserver.onCompleted().- Type Parameters:
T- they type of the request result- Parameters:
observer- theStreamObserverto send values to and complete when theCompletionStagecompletesstage- theCompletionStageto await completion ofexecutor- theExecutoron which to execute the asynchronous request completion- Returns:
- a
Consumerthat can be used to send values to theStreamObserver.onNext(Object)method
-
completeWithResult
public static <T,U> BiConsumer<T,Throwable> completeWithResult(io.grpc.stub.StreamObserver<U> observer) Deprecated, for removal: This API element is subject to removal in a future version.Obtain aConsumerthat can be used to send values to theStreamObserver.onNext(Object)method.- Type Parameters:
T- the type of the resultU- the type of the response- Parameters:
observer- theStreamObserverto complete- Returns:
- a
Consumerthat can be used to send values to theStreamObserver.onNext(Object)method
-
completeWithoutResult
public static <U> BiConsumer<Void,Throwable> completeWithoutResult(io.grpc.stub.StreamObserver<U> observer) Deprecated, for removal: This API element is subject to removal in a future version.Obtain aConsumerthat can be used to complete aStreamObserver.- Type Parameters:
U- the type of the response- Parameters:
observer- theStreamObserverto complete- Returns:
- a
Consumerthat can be used to complete aStreamObserver
-
createSupplier
Deprecated, for removal: This API element is subject to removal in a future version.
-
ResponseHelper