Package io.servicetalk.grpc.api
Interface GrpcServiceFactory.ServerBinder
- Enclosing class:
- GrpcServiceFactory<Service extends GrpcService>
public static interface GrpcServiceFactory.ServerBinder
A utility to bind an HTTP service for gRPC with an
appropriate programming model.
-
Method Summary
Modifier and TypeMethodDescriptionbind
(HttpService service) Binds anHttpService
to the associated server.bindBlocking
(BlockingHttpService service) Binds aBlockingHttpService
to the associated server.Binds aBlockingStreamingHttpService
to the associated server.bindStreaming
(StreamingHttpService service) Binds aStreamingHttpService
to the associated server.
-
Method Details
-
bind
Binds anHttpService
to the associated server.If the underlying protocol (eg. TCP) supports it this will result in a socket bind/listen on
address
.- Parameters:
service
-HttpService
to bind.- Returns:
- A
Single
that completes when the server is successfully started or terminates with an error if the server could not be started.
-
bindStreaming
Binds aStreamingHttpService
to the associated server.If the underlying protocol (eg. TCP) supports it this will result in a socket bind/listen on
address
.- Parameters:
service
-StreamingHttpService
to bind.- Returns:
- A
Single
that completes when the server is successfully started or terminates with an error if the server could not be started.
-
bindBlocking
Binds aBlockingHttpService
to the associated server.If the underlying protocol (eg. TCP) supports it this will result in a socket bind/listen on
address
.- Parameters:
service
-BlockingHttpService
to bind.- Returns:
- A
Single
that completes when the server is successfully started or terminates with an error if the server could not be started.
-
bindBlockingStreaming
Binds aBlockingStreamingHttpService
to the associated server.If the underlying protocol (eg. TCP) supports it this will result in a socket bind/listen on
address
.- Parameters:
service
-BlockingStreamingHttpService
to bind.- Returns:
- A
Single
that completes when the server is successfully started or terminates with an error if the server could not be started.
-