Class BidirectionalMethodHandlerSupplier.AbstractServerStreamingHandler<ReqT,RespT> 
java.lang.Object
io.helidon.microprofile.grpc.core.BidirectionalMethodHandlerSupplier.AbstractServerStreamingHandler<ReqT,RespT> 
- Type Parameters:
- ReqT- the request type
- RespT- 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> 
- Direct Known Subclasses:
- BidirectionalMethodHandlerSupplier.BidiStreaming
- Enclosing class:
- BidirectionalMethodHandlerSupplier
public abstract static class BidirectionalMethodHandlerSupplier.AbstractServerStreamingHandler<ReqT,RespT> 
extends Object
A base class for bi-directional streaming 
MethodHandlers.- 
Nested Class SummaryNested classes/interfaces inherited from interface io.helidon.grpc.core.MethodHandlerMethodHandler.BidirectionalClient, MethodHandler.ClientStreaming, MethodHandler.ServerStreamingClient, MethodHandler.UnaryClient
- 
Method SummaryModifier and TypeMethodDescriptionprotected 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 abstract io.grpc.stub.StreamObserver<ReqT> Invoke the actual client streaming or bi-directional gRPC method handler.protected voidInvoke the actual unary or server streaming 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 java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.helidon.grpc.core.MethodHandlerbidirectional, clientOnly, clientStreaming, serverStreaming, unary
- 
Method Details- 
invokeprotected void invoke(Method method, Object instance, ReqT request, io.grpc.stub.StreamObserver<RespT> observer) Invoke the actual unary or server streaming gRPC method handler.- Parameters:
- method- the- Methodto invoke
- instance- the service instance to invoke the method on
- request- the method request
- observer- the method response observer
 
- 
typepublic final io.grpc.MethodDescriptor.MethodType type()Description copied from interface:MethodHandlerObtain thegRPC method tyoethat thisMethodHandlerhandles.- Specified by:
- typein interface- MethodHandler<ReqT,- RespT> 
- Returns:
- the gRPC method typethat thisMethodHandlerhandles
 
- 
invoke- Specified by:
- invokein interface- MethodHandler<ReqT,- RespT> 
- Specified by:
- invokein interface- io.grpc.stub.ServerCalls.ServerStreamingMethod<ReqT,- RespT> 
- Specified by:
- invokein interface- io.grpc.stub.ServerCalls.UnaryMethod<ReqT,- RespT> 
 
- 
invoke- Specified by:
- invokein interface- MethodHandler<ReqT,- RespT> 
- Specified by:
- invokein interface- io.grpc.stub.ServerCalls.BidiStreamingMethod<ReqT,- RespT> 
- Specified by:
- invokein interface- io.grpc.stub.ServerCalls.ClientStreamingMethod<ReqT,- RespT> 
 
- 
invokeprotected abstract 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- the- Methodto invoke
- instance- the service instance to invoke the method on
- observer- the method response observer
- Returns:
- the StreamObserverto receive requests from the client
- Throws:
- InvocationTargetException- if an error occurs invoking the method
- IllegalAccessException- if the method cannot be accessed
 
- 
getRequestTypeDescription copied from interface:MethodHandlerObtain the request type.- Specified by:
- getRequestTypein interface- MethodHandler<ReqT,- RespT> 
- Returns:
- the request type
 
- 
setRequestTypeSet the request type to use if noGrpc.RequestTypeannotation is present on the annotated method.- Parameters:
- requestType- the request type
 
- 
getResponseTypeDescription copied from interface:MethodHandlerObtain the response type.- Specified by:
- getResponseTypein interface- MethodHandler<ReqT,- RespT> 
- Returns:
- the response type
 
- 
javaMethodNameDescription copied from interface:MethodHandlerObtain the name of the underlying Java method that this handler maps to.- Specified by:
- javaMethodNamein interface- MethodHandler<ReqT,- RespT> 
- Returns:
- the name of the underlying Java method that this handler maps to
 
- 
setResponseTypeSet the response type to use if noGrpc.ResponseTypeannotation is present on the annotated method.- Parameters:
- responseType- the response type
 
- 
methodNameObtain the gRPC method name.- Returns:
- the gRPC method name
 
- 
handleFutureprotected Void handleFuture(RespT response, Throwable thrown, io.grpc.stub.StreamObserver<RespT> observer) Complete aStreamObserver.- Parameters:
- response- the response value
- thrown- an error that may have occurred
- observer- the- StreamObserverto complete
- Returns:
- always returns Void(i.e.null)
 
- 
getGenericResponseTypeObtain 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
 
 
-