Server

public final class Server

Exposes one or more Bounded Contexts using CommandService, QueryService and SubscriptionService.

Types

Link copied to clipboard
public final class Builder extends ConnectionBuilder
The builder for the server.

Functions

Link copied to clipboard
public static Server.Builder atPort(int port)
Initiates creating a server exposed at the passed port.
Link copied to clipboard
public void awaitTermination()
Waits for the server to become terminated.
Link copied to clipboard
Obtains the CommandService exposed by this server.
Link copied to clipboard
public static Server.Builder inProcess(String serverName)
Initiates creating an in-process server exposed with the given name.
Link copied to clipboard
Creates a new builder for the server.
Link copied to clipboard
public int port()
Always returns zero.
Link copied to clipboard
Obtains the QueryService exposed by this server.
Link copied to clipboard
public void shutdown()
Initiates an orderly shutdown in which existing calls continue but new calls are rejected.
Link copied to clipboard
public void shutdownAndWait()
Initiates a forceful shutdown in which preexisting and new calls are rejected.
Link copied to clipboard
public void start()
Starts the server.
Link copied to clipboard
Obtains the SubscriptionService exposed by this server.