public static final class Server.Builder extends ConnectionBuilder
Modifier and Type | Method and Description |
---|---|
Server.Builder |
add(BoundedContextBuilder context)
Adds a builder for a
BoundedContext to be added the server. |
Server |
build()
Creates a new instance of the server.
|
Server.Builder |
include(io.grpc.BindableService service)
Adds a gRPC service to the built server.
|
Server.Builder |
setPort(int port)
Deprecated.
please use
Server.atPort(int) . |
port, serverName
@CanIgnoreReturnValue public Server.Builder add(BoundedContextBuilder context)
BoundedContext
to be added the server.@CanIgnoreReturnValue public Server.Builder include(io.grpc.BindableService service)
By default, the Command, Query, and Subscription services are present in the server. But the users may add any other gRPC services to work alongside the standard ones, e.g. for monitoring, warmup procedures, etc.
@CanIgnoreReturnValue @Deprecated public Server.Builder setPort(int port)
Server.atPort(int)
.public Server build()