public final class ServiceDescriptor
extends java.lang.Object
Modifier and Type | Class | Description |
---|---|---|
static class |
ServiceDescriptor.Builder |
A builder for a
ServiceDescriptor . |
Constructor | Description |
---|---|
ServiceDescriptor(java.lang.String name,
MethodDescriptor<?,?>... methods) |
Constructs a new Service Descriptor.
|
ServiceDescriptor(java.lang.String name,
java.util.Collection<MethodDescriptor<?,?>> methods) |
Constructs a new Service Descriptor.
|
Modifier and Type | Method | Description |
---|---|---|
java.util.Collection<MethodDescriptor<?,?>> |
getMethods() |
A collection of
MethodDescriptor instances describing the methods exposed by the
service. |
java.lang.String |
getName() |
Simple name of the service.
|
java.lang.Object |
getSchemaDescriptor() |
Returns the schema descriptor for this service.
|
static ServiceDescriptor.Builder |
newBuilder(java.lang.String name) |
Creates a new builder for a
ServiceDescriptor . |
java.lang.String |
toString() |
public ServiceDescriptor(java.lang.String name, MethodDescriptor<?,?>... methods)
newBuilder(java.lang.String)
instead.name
- The name of the servicemethods
- The methods that are part of the servicepublic ServiceDescriptor(java.lang.String name, java.util.Collection<MethodDescriptor<?,?>> methods)
newBuilder(java.lang.String)
instead.name
- The name of the servicemethods
- The methods that are part of the servicepublic java.lang.String getName()
public java.util.Collection<MethodDescriptor<?,?>> getMethods()
MethodDescriptor
instances describing the methods exposed by the
service.@Nullable @ExperimentalApi("https://github.com/grpc/grpc-java/issues/2222") public java.lang.Object getSchemaDescriptor()
getSchemaDescriptor()
must coordinate. For example, protobuf generated code
sets this value, in order to be consumed by the server reflection service. See also:
io.grpc.protobuf.ProtoFileDescriptorSupplier
.public static ServiceDescriptor.Builder newBuilder(java.lang.String name)
ServiceDescriptor
.public java.lang.String toString()
toString
in class java.lang.Object