Class ProxyServer (0.27.0)

public class ProxyServer extends AbstractApiService

The proxy server listens for incoming client connections and starts a new ConnectionHandler for each incoming connection.

Inheritance

java.lang.Object > AbstractApiService > ProxyServer

Constructors

ProxyServer(OptionsMetadata optionsMetadata, OpenTelemetry openTelemetry)

public ProxyServer(OptionsMetadata optionsMetadata, OpenTelemetry openTelemetry)

Instantiates the ProxyServer from CLI-gathered metadata.

Parameters
NameDescription
optionsMetadataOptionsMetadata

Resulting metadata from CLI.

openTelemetryio.opentelemetry.api.OpenTelemetry

The OpenTelemetry to use to collect metrics

ProxyServer(OptionsMetadata optionsMetadata, OpenTelemetry openTelemetry, Properties properties)

public ProxyServer(OptionsMetadata optionsMetadata, OpenTelemetry openTelemetry, Properties properties)

Instantiates the ProxyServer from metadata and properties. For use with in-process invocations.

Parameters
NameDescription
optionsMetadataOptionsMetadata

Resulting metadata from CLI.

openTelemetryio.opentelemetry.api.OpenTelemetry

The OpenTelemetry to use to collect metrics

propertiesProperties

Properties for specifying additional information to JDBC like an external channel provider (see ConnectionOptions in Java Spanner client library for more details on supported properties).

Methods

clearDebugMessages()

public void clearDebugMessages()

doStart()

protected void doStart()
Overrides

doStop()

protected void doStop()
Overrides

getDebugMessages()

public ConcurrentLinkedQueue<WireMessage> getDebugMessages()
Returns
TypeDescription
ConcurrentLinkedQueue<WireMessage>

getLocalPort()

public int getLocalPort()
Returns
TypeDescription
int

the local TCP port that this server is using.

getNumberOfConnections()

public int getNumberOfConnections()
Returns
TypeDescription
int

the current number of connections.

getOpenTelemetry()

public OpenTelemetry getOpenTelemetry()
Returns
TypeDescription
io.opentelemetry.api.OpenTelemetry

getOptions()

public OptionsMetadata getOptions()
Returns
TypeDescription
OptionsMetadata

getProperties()

public Properties getProperties()
Returns
TypeDescription
Properties

the JDBC connection properties that are used by this server

startServer()

public void startServer()

Starts the server by running the thread runnable and setting status.

stopServer()

public void stopServer()

Safely stops the server (iff started), closing specific socket and cleaning up.

toString()

public String toString()
Returns
TypeDescription
String
Overrides