Package io.grpc
Class ServerServiceDefinition
- java.lang.Object
-
- io.grpc.ServerServiceDefinition
-
public final class ServerServiceDefinition extends java.lang.Object
Definition of a service to be exposed via a Server.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ServerServiceDefinition.Builder
Builder for constructing Service instances.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ServerServiceDefinition.Builder
builder(ServiceDescriptor serviceDescriptor)
static ServerServiceDefinition.Builder
builder(java.lang.String serviceName)
Convenience that constructs aServiceDescriptor
simultaneously.ServerMethodDefinition<?,?>
getMethod(java.lang.String methodName)
Look up a method by its fully qualified name.java.util.Collection<ServerMethodDefinition<?,?>>
getMethods()
Gets all the methods of service.ServiceDescriptor
getServiceDescriptor()
The descriptor for the service.
-
-
-
Method Detail
-
builder
public static ServerServiceDefinition.Builder builder(java.lang.String serviceName)
Convenience that constructs aServiceDescriptor
simultaneously.
-
builder
public static ServerServiceDefinition.Builder builder(ServiceDescriptor serviceDescriptor)
-
getServiceDescriptor
public ServiceDescriptor getServiceDescriptor()
The descriptor for the service.
-
getMethods
public java.util.Collection<ServerMethodDefinition<?,?>> getMethods()
Gets all the methods of service.
-
getMethod
@Internal public ServerMethodDefinition<?,?> getMethod(java.lang.String methodName)
Look up a method by its fully qualified name.- Parameters:
methodName
- the fully qualified name without leading slash. E.g., "com.foo.Foo/Bar"
-
-