Class ClientStreamingMethodHandlerSupplier.ClientStreamingStream<ReqT,RespT> 
java.lang.Object
io.helidon.microprofile.grpc.core.ClientStreamingMethodHandlerSupplier.AbstractClientStreamingHandler<ReqT,RespT>
 
io.helidon.microprofile.grpc.core.ClientStreamingMethodHandlerSupplier.ClientStreamingStream<ReqT,RespT> 
- Type Parameters:
 ReqT- the request typeRespT- the response type
- All Implemented Interfaces:
 io.grpc.stub.ServerCalls.BidiStreamingMethod<ReqT,,RespT> io.grpc.stub.ServerCalls.ClientStreamingMethod<ReqT,,RespT> io.grpc.stub.ServerCalls.ServerStreamingMethod<ReqT,,RespT> io.grpc.stub.ServerCalls.UnaryMethod<ReqT,,RespT> MethodHandler<ReqT,RespT> 
- Enclosing class:
 ClientStreamingMethodHandlerSupplier
public static class ClientStreamingMethodHandlerSupplier.ClientStreamingStream<ReqT,RespT> 
extends ClientStreamingMethodHandlerSupplier.AbstractClientStreamingHandler<ReqT,RespT> 
A client side only client streaming 
MethodHandler that
 streams requests from a stream.
 
     CompletionStage<RespT> invoke(Stream<ReqT> observer)
 - 
Nested Class Summary
Nested classes/interfaces inherited from interface io.helidon.grpc.core.MethodHandler
MethodHandler.BidirectionalClient, MethodHandler.ClientStreaming, MethodHandler.ServerStreamingClient, MethodHandler.UnaryClient - 
Method Summary
Modifier and TypeMethodDescriptionbooleanDetermine whether this is a client side only handler.clientStreaming(Object[] args, MethodHandler.ClientStreaming client) Handle a bi-directional client call.protected Class<?> getGenericResponseType(Type type) Obtain the generic type of aTypeClass<?> Obtain the request type.Class<?> Obtain the response type.protected VoidhandleFuture(RespT response, Throwable thrown, io.grpc.stub.StreamObserver<RespT> observer) Complete aStreamObserver.io.grpc.stub.StreamObserver<ReqT> protected io.grpc.stub.StreamObserver<ReqT> Invoke the actual client streaming or bi-directional gRPC method handler.voidObtain the name of the underlying Java method that this handler maps to.protected StringObtain the gRPC method name.protected voidsetRequestType(Class<?> requestType) Set the request type to use if noGrpc.RequestTypeannotation is present on the annotated method.protected voidsetResponseType(Class<?> responseType) Set the response type to use if noGrpc.ResponseTypeannotation is present on the annotated method.final io.grpc.MethodDescriptor.MethodTypetype()Obtain thegRPC method tyoethat thisMethodHandlerhandles.Methods inherited from class io.helidon.microprofile.grpc.core.ClientStreamingMethodHandlerSupplier.AbstractClientStreamingHandler
invokeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.helidon.grpc.core.MethodHandler
bidirectional, serverStreaming, unary 
- 
Method Details
- 
clientOnly
public boolean clientOnly()Description copied from interface:MethodHandlerDetermine whether this is a client side only handler.- Returns:
 trueif this handler can only be used on the client
 - 
invoke
protected io.grpc.stub.StreamObserver<ReqT> invoke(Method method, Object instance, io.grpc.stub.StreamObserver<RespT> observer) throws InvocationTargetException, IllegalAccessException Invoke the actual client streaming or bi-directional gRPC method handler.- Parameters:
 method- theMethodto invokeinstance- the service instance to invoke the method onobserver- the method response observer- Returns:
 - the 
StreamObserverto receive requests from the client - Throws:
 InvocationTargetException- if an error occurs invoking the methodIllegalAccessException- if the method cannot be accessed
 - 
clientStreaming
Description copied from interface:MethodHandlerHandle a bi-directional client call.- Parameters:
 args- the call arguments.client- theMethodHandler.ClientStreaminginstance to forward the call to.- Returns:
 - the call result
 
 - 
type
public final io.grpc.MethodDescriptor.MethodType type()Description copied from interface:MethodHandlerObtain thegRPC method tyoethat thisMethodHandlerhandles.- Specified by:
 typein interfaceMethodHandler<ReqT,RespT> - Returns:
 - the 
gRPC method typethat thisMethodHandlerhandles 
 - 
invoke
- Specified by:
 invokein interfaceMethodHandler<ReqT,RespT> - Specified by:
 invokein interfaceio.grpc.stub.ServerCalls.ServerStreamingMethod<ReqT,RespT> - Specified by:
 invokein interfaceio.grpc.stub.ServerCalls.UnaryMethod<ReqT,RespT> 
 - 
invoke
- Specified by:
 invokein interfaceMethodHandler<ReqT,RespT> - Specified by:
 invokein interfaceio.grpc.stub.ServerCalls.BidiStreamingMethod<ReqT,RespT> - Specified by:
 invokein interfaceio.grpc.stub.ServerCalls.ClientStreamingMethod<ReqT,RespT> 
 - 
getRequestType
Description copied from interface:MethodHandlerObtain the request type.- Specified by:
 getRequestTypein interfaceMethodHandler<ReqT,RespT> - Returns:
 - the request type
 
 - 
setRequestType
Set the request type to use if noGrpc.RequestTypeannotation is present on the annotated method.- Parameters:
 requestType- the request type
 - 
getResponseType
Description copied from interface:MethodHandlerObtain the response type.- Specified by:
 getResponseTypein interfaceMethodHandler<ReqT,RespT> - Returns:
 - the response type
 
 - 
javaMethodName
Description copied from interface:MethodHandlerObtain the name of the underlying Java method that this handler maps to.- Specified by:
 javaMethodNamein interfaceMethodHandler<ReqT,RespT> - Returns:
 - the name of the underlying Java method that this handler maps to
 
 - 
setResponseType
Set the response type to use if noGrpc.ResponseTypeannotation is present on the annotated method.- Parameters:
 responseType- the response type
 - 
methodName
Obtain the gRPC method name.- Returns:
 - the gRPC method name
 
 - 
handleFuture
protected Void handleFuture(RespT response, Throwable thrown, io.grpc.stub.StreamObserver<RespT> observer) Complete aStreamObserver.- Parameters:
 response- the response valuethrown- an error that may have occurredobserver- theStreamObserverto complete- Returns:
 - always returns 
Void(i.e.null) 
 - 
getGenericResponseType
Obtain the generic type of aTypeTypically used to obtain the generic type of a
StreamObserverbut could be used to obtain the generic type of other classes.If the type passed in is a
Classthen it has no generic component so the Object Class will be returned. Typically this would be due to a declaration such asStreamObserver observer
instead of a generic declaration such asStreamObserver<String> observer
.- Parameters:
 type- the type to obtain the generic type from- Returns:
 - the generic type of a 
Type 
 
 -