public static final class MethodDescriptor.Builder<ReqT,RespT> extends Object
MethodDescriptor
.Modifier and Type | Method and Description |
---|---|
MethodDescriptor<ReqT,RespT> |
build()
Builds the method descriptor.
|
MethodDescriptor.Builder<ReqT,RespT> |
setFullMethodName(String fullMethodName)
Sets the fully qualified (service and method) method name.
|
MethodDescriptor.Builder<ReqT,RespT> |
setIdempotent(boolean idempotent)
Sets whether the method is idempotent.
|
MethodDescriptor.Builder<ReqT,RespT> |
setRequestMarshaller(MethodDescriptor.Marshaller<ReqT> requestMarshaller)
Sets the request marshaller.
|
MethodDescriptor.Builder<ReqT,RespT> |
setResponseMarshaller(MethodDescriptor.Marshaller<RespT> responseMarshaller)
Sets the response marshaller.
|
MethodDescriptor.Builder<ReqT,RespT> |
setSafe(boolean safe)
Sets whether this method is safe.
|
MethodDescriptor.Builder<ReqT,RespT> |
setSampledToLocalTracing(boolean value)
Sets whether RPCs for this method may be sampled into the local tracing store.
|
MethodDescriptor.Builder<ReqT,RespT> |
setSchemaDescriptor(Object schemaDescriptor)
Sets the schema descriptor for this builder.
|
MethodDescriptor.Builder<ReqT,RespT> |
setType(MethodDescriptor.MethodType type)
Sets the method type.
|
public MethodDescriptor.Builder<ReqT,RespT> setRequestMarshaller(MethodDescriptor.Marshaller<ReqT> requestMarshaller)
requestMarshaller
- the marshaller to use.public MethodDescriptor.Builder<ReqT,RespT> setResponseMarshaller(MethodDescriptor.Marshaller<RespT> responseMarshaller)
responseMarshaller
- the marshaller to use.public MethodDescriptor.Builder<ReqT,RespT> setType(MethodDescriptor.MethodType type)
type
- the type of the method.public MethodDescriptor.Builder<ReqT,RespT> setFullMethodName(String fullMethodName)
MethodDescriptor.generateFullMethodName(java.lang.String, java.lang.String)
public MethodDescriptor.Builder<ReqT,RespT> setSchemaDescriptor(@Nullable Object schemaDescriptor)
MethodDescriptor.getSchemaDescriptor()
must coordinate.schemaDescriptor
- an object that describes the service structure. Should be immutable.public MethodDescriptor.Builder<ReqT,RespT> setIdempotent(boolean idempotent)
false
, method is also not safe. Note that implies
calling builder.setIdempotent(false).setIdempotent(true)
will leave isSafe() == false
.public MethodDescriptor.Builder<ReqT,RespT> setSafe(boolean safe)
true
, method is also idempotent. Note that implies calling
builder.setSafe(true).setSafe(false)
will leave isIdempotent() == true
.public MethodDescriptor.Builder<ReqT,RespT> setSampledToLocalTracing(boolean value)
@CheckReturnValue public MethodDescriptor<ReqT,RespT> build()