Builder

public final class Builder extends ConnectionBuilder

The builder for GrpcContainer allows to define a port and services exposed by the container.

Functions

Link copied to clipboard
public GrpcContainer.Builder addService(BindableService service)
Adds a gRPC service to deploy within the container being built.
Link copied to clipboard
Link copied to clipboard
public int getPort()
Obtains the port to be used by the container.
Link copied to clipboard
public ImmutableSet<ServerServiceDefinition> getServices()
Obtains the services already added to the builder.
Link copied to clipboard
public GrpcContainer.Builder removeService(ServerServiceDefinition service)
Removes the previously added gRPC service.
Link copied to clipboard
public ImmutableSet<ServerServiceDefinition> services()
Obtains the services already added to the builder.
Link copied to clipboard
public GrpcContainer.Builder setPort(int ignored)
Does nothing.
Link copied to clipboard
Sets an additional configuration action for the gRPC Server instance, created for this GrpcContainer to run on top of.

Inherited functions

Link copied to clipboard
public final Optional<Integer> port()
Obtains the port of the connection, or empty Optional for in-process connection.
Link copied to clipboard
public final Optional<String> serverName()
Obtains the name of the in-process connection, or empty Optional if the connection is made via a port.