Package io.grpc
Class ServerServiceDefinition
- java.lang.Object
-
- io.grpc.ServerServiceDefinition
-
public final class ServerServiceDefinition extends 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β(String serviceName)
Convenience that constructs aServiceDescriptor
simultaneously.ServerMethodDefinition<?,β?>
getMethodβ(String methodName)
Look up a method by its fully qualified name.Collection<ServerMethodDefinition<?,β?>>
getMethods()
Gets all the methods of service.ServiceDescriptor
getServiceDescriptor()
The descriptor for the service.
-
-
-
Method Detail
-
builder
public static ServerServiceDefinition.Builder builderβ(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 Collection<ServerMethodDefinition<?,β?>> getMethods()
Gets all the methods of service.
-
getMethod
@Internal public ServerMethodDefinition<?,β?> getMethodβ(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"
-
-