public static final class ServiceDescriptor.Builder extends Object
ServiceDescriptor
.Modifier and Type | Method and Description |
---|---|
ServiceDescriptor.Builder |
addMethod(MethodDescriptor<?,?> method)
Adds a method to this service.
|
ServiceDescriptor |
build()
Constructs a new
ServiceDescriptor . |
ServiceDescriptor.Builder |
setName(String name)
Sets the name.
|
ServiceDescriptor.Builder |
setSchemaDescriptor(Object schemaDescriptor)
Sets the schema descriptor for this builder.
|
@ExperimentalApi(value="https://github.com/grpc/grpc-java/issues/2666") public ServiceDescriptor.Builder setName(String name)
null
.name
- The name of the service.public ServiceDescriptor.Builder addMethod(MethodDescriptor<?,?> method)
null
.method
- the method to add to the descriptor.public ServiceDescriptor.Builder setSchemaDescriptor(@Nullable Object schemaDescriptor)
ServiceDescriptor.getSchemaDescriptor()
must coordinate. For example, protobuf
generated code sets this value, in order to be consumed by the server reflection service.schemaDescriptor
- an object that describes the service structure. Should be immutable.public ServiceDescriptor build()
ServiceDescriptor
. setName(java.lang.String)
should have been called with a
non-null
value before calling this.