Class UnaryMethodHandlerSupplier.RequestNoResponse<ReqT,RespT>
- java.lang.Object
-
- io.helidon.microprofile.grpc.core.AbstractMethodHandlerSupplier.AbstractHandler<ReqT,RespT>
-
- io.helidon.microprofile.grpc.core.UnaryMethodHandlerSupplier.AbstractUnaryHandler<ReqT,RespT>
-
- io.helidon.microprofile.grpc.core.UnaryMethodHandlerSupplier.RequestNoResponse<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:
- UnaryMethodHandlerSupplier
public static class UnaryMethodHandlerSupplier.RequestNoResponse<ReqT,RespT> extends UnaryMethodHandlerSupplier.AbstractUnaryHandler<ReqT,RespT>
A unaryMethodHandler
that calls a handler method of the form.void invoke(ReqT request)
Because the underlying handler returns
void
theStreamObserver.onNext(Object)
method will not be called.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface io.helidon.grpc.core.MethodHandler
MethodHandler.BidirectionalClient, MethodHandler.ClientStreaming, MethodHandler.ServerStreamingClient, MethodHandler.UnaryClient
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
invoke(Method method, Object instance, ReqT request, io.grpc.stub.StreamObserver<RespT> observer)
Invoke the actual unary or server streaming gRPC method handler.Object
unary(Object[] args, MethodHandler.UnaryClient client)
Invoke the client call.-
Methods inherited from class io.helidon.microprofile.grpc.core.UnaryMethodHandlerSupplier.AbstractUnaryHandler
invoke
-
Methods inherited from class io.helidon.microprofile.grpc.core.AbstractMethodHandlerSupplier.AbstractHandler
getGenericResponseType, getRequestType, getResponseType, handleFuture, invoke, invoke, javaMethodName, methodName, setRequestType, setResponseType, type
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.helidon.grpc.core.MethodHandler
bidirectional, clientOnly, clientStreaming, serverStreaming
-
-
-
-
Method Detail
-
invoke
protected void invoke(Method method, Object instance, ReqT request, io.grpc.stub.StreamObserver<RespT> observer) throws InvocationTargetException, IllegalAccessException
Description copied from class:io.helidon.microprofile.grpc.core.AbstractMethodHandlerSupplier.AbstractHandler
Invoke the actual unary or server streaming gRPC method handler.- Specified by:
invoke
in classio.helidon.microprofile.grpc.core.AbstractMethodHandlerSupplier.AbstractHandler<ReqT,RespT>
- Parameters:
method
- theMethod
to invokeinstance
- the service instance to invoke the method onrequest
- the method requestobserver
- the method response observer- Throws:
InvocationTargetException
- if an error occurs invoking the methodIllegalAccessException
- if the method cannot be accessed
-
unary
public Object unary(Object[] args, MethodHandler.UnaryClient client)
Invoke the client call.The call is from a method signature:
RestT invoke(ReqT request);
so the request is inargs[0]
.- Parameters:
args
- the call arguments.client
- theMethodHandler.UnaryClient
instance to forward the call to- Returns:
- the method signature return is
void
so this method always returns null
-
-