Package com.google.protobuf

# Class Descriptors.ServiceDescriptor

java.lang.Object
com.google.protobuf.Descriptors.GenericDescriptor
com.google.protobuf.Descriptors.ServiceDescriptor

Enclosing class:
  `Descriptors`

public static final class Descriptors.ServiceDescriptor extends Descriptors.GenericDescriptor
Describes a service type.

## Method Summary

Modifier and Type
Method
Description
`Descriptors.MethodDescriptor`
`findMethodByName(String name)`
Find a method by name.
`Descriptors.FileDescriptor`
`getFile()`
Get the `Descriptors.FileDescriptor` containing this descriptor.
`String`
`getFullName()`
Get the type's fully-qualified name.
`int`
`getIndex()`
Get the index of this descriptor within its parent.
`List<Descriptors.MethodDescriptor>`
`getMethods()`
Get a list of methods for this service.
`String`
`getName()`
Get the type's unqualified name.
`DescriptorProtos.ServiceOptions`
`getOptions()`
Get the `ServiceOptions`, defined in `descriptor.proto`.
`DescriptorProtos.ServiceDescriptorProto`
`toProto()`
Convert the descriptor to its protocol message representation.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Method Details

### getIndex

public int getIndex()
Get the index of this descriptor within its parent. * @see Descriptors.Descriptor#getIndex()

### toProto

public DescriptorProtos.ServiceDescriptorProto toProto()
Convert the descriptor to its protocol message representation.

Specified by:
  `toProto` in class `Descriptors.GenericDescriptor`

### getName

public String getName()
Get the type's unqualified name.

Specified by:
  `getName` in class `Descriptors.GenericDescriptor`

### getFullName

public String getFullName()
Get the type's fully-qualified name.

Specified by:
  `getFullName` in class `Descriptors.GenericDescriptor`
See Also:
  - `Descriptors.Descriptor.getFullName()`

### getFile

public Descriptors.FileDescriptor getFile()
Get the `Descriptors.FileDescriptor` containing this descriptor.

Specified by:
  `getFile` in class `Descriptors.GenericDescriptor`

### getOptions

public DescriptorProtos.ServiceOptions getOptions()
Get the `ServiceOptions`, defined in `descriptor.proto`.

### getMethods

public List<Descriptors.MethodDescriptor> getMethods()
Get a list of methods for this service.

### findMethodByName

public Descriptors.MethodDescriptor findMethodByName(String name)
Find a method by name.

Parameters:
  `name` - the unqualified name of the method such as "Foo"
Returns:
  the method's descriptor, or `null` if not found