Package io.grpc
Interface BindableService
-
- All Known Implementing Classes:
ChannelzGrpc.ChannelzImplBase,ChannelzService,ChannelzService,CsdsService,HealthGrpc.HealthImplBase,LoadBalancerGrpc.LoadBalancerImplBase,OrcaServiceImpl,ProtoReflectionService,ProtoReflectionServiceV1,ServerReflectionGrpc.ServerReflectionImplBase,ServerReflectionGrpc.ServerReflectionImplBase
public interface BindableServiceProvides a way to bind instance of service implementation to server.It is used by service's abstract class generated by compiler (eg.: RouteGuideGrpc.RouteGuideImplBase for RouteGuide service) and lets implementation classes to be bind to server.
class RouteGuideService extends RouteGuideGrpc.RouteGuideImplBase { // ... } Server server = ServerBuilder.forPort(1234).addService(new RouteGuideService()).build();
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ServerServiceDefinitionbindService()CreatesServerServiceDefinitionobject for current instance of service implementation.
-
-
-
Method Detail
-
bindService
ServerServiceDefinition bindService()
CreatesServerServiceDefinitionobject for current instance of service implementation.- Returns:
- ServerServiceDefinition object.
-
-