Package io.servicetalk.grpc.api
Interface GrpcServiceFactory.ServerBinder
-
- Enclosing class:
- GrpcServiceFactory<Filter extends Service,Service extends GrpcService,FilterFactory extends GrpcServiceFilterFactory<Filter,Service>>
public static interface GrpcServiceFactory.ServerBinder
A utility to bind an HTTP service for gRPC with an appropriate programming model.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Single<ServerContext>
bind(HttpService service)
Binds anHttpService
to the associated server.Single<ServerContext>
bindBlocking(BlockingHttpService service)
Binds aBlockingHttpService
to the associated server.Single<ServerContext>
bindBlockingStreaming(BlockingStreamingHttpService service)
Binds aBlockingStreamingHttpService
to the associated server.Single<ServerContext>
bindStreaming(StreamingHttpService service)
Binds aStreamingHttpService
to the associated server.
-
-
-
Method Detail
-
bind
Single<ServerContext> bind(HttpService service)
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
Single<ServerContext> bindStreaming(StreamingHttpService service)
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
Single<ServerContext> bindBlocking(BlockingHttpService service)
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
Single<ServerContext> bindBlockingStreaming(BlockingStreamingHttpService service)
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.
-
-