ResponseHelper
.
Will be removed from this location in a future version.-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> void
Deprecated, for removal: This API element is subject to removal in a future version.Execute aRunnable
task and on completion of the task complete the gRPC request by callingStreamObserver.onNext(Object)
using the specified result and then callStreamObserver.onCompleted()
.static <T> void
Deprecated, 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> void
complete
(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> 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.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 aRunnable
task and on completion of the task complete the gRPC request by callingStreamObserver.onNext(Object)
using the specified result and then callStreamObserver.onCompleted()
.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 aRunnable
task and on completion of the task complete the gRPC request by callingStreamObserver.onNext(Object)
using the specified result and then callStreamObserver.onCompleted()
.static <T> void
completeAsync
(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> 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
.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
.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
.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 aConsumer
that 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 aConsumer
that 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 aConsumer
that can be used to send values to theStreamObserver.onNext(Object)
method until theCompletionStage
completes then callStreamObserver.onCompleted()
.static <T> void
Deprecated, for removal: This API element is subject to removal in a future version.static <T> void
Deprecated, 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 aConsumer
that can be used to send values to theStreamObserver.onNext(Object)
method until theCompletionStage
completes 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 aConsumer
that can be used to send values to theStreamObserver.onNext(Object)
method until theCompletionStage
completes then asynchronously callStreamObserver.onCompleted()
using the executor thread.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.static <T> void
streamAsync
(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
- theStreamObserver
to 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 specifiedCompletionStage
and then callingStreamObserver.onCompleted()
.If the
CompletionStage
completes with an error thenStreamObserver.onError(Throwable)
will be called.- Type Parameters:
T
- they type of the request result- Parameters:
observer
- theStreamObserver
to completefuture
- theCompletionStage
to 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 specifiedCompletionStage
and then callingStreamObserver.onCompleted()
.If the
CompletionStage
completes 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
- theStreamObserver
to completefuture
- theCompletionStage
to 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 specifiedCompletionStage
and then callingStreamObserver.onCompleted()
.If the
CompletionStage
completes with an error thenStreamObserver.onError(Throwable)
will be called.- Type Parameters:
T
- they type of the request result- Parameters:
observer
- theStreamObserver
to completefuture
- theCompletionStage
to use to obtain the value to use to callStreamObserver.onNext(Object)
executor
- theExecutor
on 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 specifiedCallable
and 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
- theStreamObserver
to completecallable
- theCallable
to 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 specifiedCallable
and 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
- theStreamObserver
to completecallable
- theCallable
to 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 specifiedCallable
and 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 aRunnable
task 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
- theStreamObserver
to completetask
- theRunnable
to 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 aRunnable
task 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
- theStreamObserver
to completetask
- theRunnable
to 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 aRunnable
task 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 aStream
to theStreamObserver.onNext(Object)
method until theStream
is 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
- theStreamObserver
to completestream
- theStream
of 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 aConsumer
that can be used to send values to theStreamObserver.onNext(Object)
method until theCompletionStage
completes then callStreamObserver.onCompleted()
.If the
CompletionStage
completes with an error thenStreamObserver.onError(Throwable)
will be called instead ofStreamObserver.onCompleted()
.- Type Parameters:
T
- they type of the request result- Parameters:
observer
- theStreamObserver
to send values to and complete when theCompletionStage
completesstage
- theCompletionStage
to await completion of- Returns:
- a
Consumer
that 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 aConsumer
that can be used to send values to theStreamObserver.onNext(Object)
method until theCompletionStage
completes then asynchronously callStreamObserver.onCompleted()
using the fork-join thread pool.If the
CompletionStage
completes with an error thenStreamObserver.onError(Throwable)
will be called instead ofStreamObserver.onCompleted()
.- Type Parameters:
T
- they type of the request result- Parameters:
observer
- theStreamObserver
to send values to and complete when theCompletionStage
completesstage
- theCompletionStage
to await completion of- Returns:
- a
Consumer
that 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 aConsumer
that can be used to send values to theStreamObserver.onNext(Object)
method until theCompletionStage
completes then asynchronously callStreamObserver.onCompleted()
using the executor thread.If the
CompletionStage
completes with an error thenStreamObserver.onError(Throwable)
will be called instead ofStreamObserver.onCompleted()
.- Type Parameters:
T
- they type of the request result- Parameters:
observer
- theStreamObserver
to send values to and complete when theCompletionStage
completesstage
- theCompletionStage
to await completion ofexecutor
- theExecutor
on which to execute the asynchronous request completion- Returns:
- a
Consumer
that 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 aConsumer
that 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
- theStreamObserver
to complete- Returns:
- a
Consumer
that 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 aConsumer
that can be used to complete aStreamObserver
.- Type Parameters:
U
- the type of the response- Parameters:
observer
- theStreamObserver
to complete- Returns:
- a
Consumer
that can be used to complete aStreamObserver
-
createSupplier
Deprecated, for removal: This API element is subject to removal in a future version.
-
ResponseHelper