Package io.servicetalk.grpc.api
Class MethodDescriptors
java.lang.Object
io.servicetalk.grpc.api.MethodDescriptors
Utility methods for
MethodDescriptor
.-
Method Summary
Modifier and TypeMethodDescriptionstatic <Req,
Resp> MethodDescriptor<Req, Resp> newMethodDescriptor
(String httpPath, String javaMethodName, boolean reqIsStreaming, boolean reqIsAsync, Class<Req> reqClass, CharSequence reqContentType, SerializerDeserializer<Req> reqSerializer, ToIntFunction<Req> reqBytesEstimator, boolean respIsStreaming, boolean respIsAsync, Class<Resp> respClass, CharSequence respContentType, SerializerDeserializer<Resp> respSerializer, ToIntFunction<Resp> respBytesEstimator) Create a newMethodDescriptor
.
-
Method Details
-
newMethodDescriptor
public static <Req,Resp> MethodDescriptor<Req,Resp> newMethodDescriptor(String httpPath, String javaMethodName, boolean reqIsStreaming, boolean reqIsAsync, Class<Req> reqClass, CharSequence reqContentType, SerializerDeserializer<Req> reqSerializer, ToIntFunction<Req> reqBytesEstimator, boolean respIsStreaming, boolean respIsAsync, Class<Resp> respClass, CharSequence respContentType, SerializerDeserializer<Resp> respSerializer, ToIntFunction<Resp> respBytesEstimator) Create a newMethodDescriptor
.- Type Parameters:
Req
- The request type.Resp
- The response type.- Parameters:
httpPath
- SeeMethodDescriptor.httpPath()
.javaMethodName
- SeeMethodDescriptor.javaMethodName()
.reqIsStreaming
-ParameterDescriptor.isStreaming()
for the request.reqIsAsync
-ParameterDescriptor.isAsync()
for the request.reqClass
-ParameterDescriptor.parameterClass()
for the request.reqContentType
-SerializerDescriptor.contentType()
for the request.reqSerializer
-SerializerDescriptor.serializer()
for the request.reqBytesEstimator
-SerializerDescriptor.bytesEstimator()
for the request.respIsStreaming
-ParameterDescriptor.isStreaming()
for the response.respIsAsync
-ParameterDescriptor.isAsync()
for the response.respClass
-ParameterDescriptor.parameterClass()
for the response.respContentType
-SerializerDescriptor.contentType()
for the response.respSerializer
-SerializerDescriptor.serializer()
for the response.respBytesEstimator
-SerializerDescriptor.bytesEstimator()
for the response.- Returns:
- A
MethodDescriptor
as described by all parameters.
-