public class ProxyServer extends AbstractApiService
The proxy server listens for incoming client connections and starts a new ConnectionHandler for each incoming connection.
Constructors
ProxyServer(OptionsMetadata optionsMetadata)
public ProxyServer(OptionsMetadata optionsMetadata)
Instantiates the ProxyServer from CLI-gathered metadata.
Parameter | |
---|---|
Name | Description |
optionsMetadata | OptionsMetadata Resulting metadata from CLI. |
ProxyServer(OptionsMetadata optionsMetadata, OpenTelemetry openTelemetry)
public ProxyServer(OptionsMetadata optionsMetadata, OpenTelemetry openTelemetry)
Instantiates the ProxyServer from CLI-gathered metadata.
Parameters | |
---|---|
Name | Description |
optionsMetadata | OptionsMetadata Resulting metadata from CLI. |
openTelemetry | io.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 | |
---|---|
Name | Description |
optionsMetadata | OptionsMetadata Resulting metadata from CLI. |
openTelemetry | io.opentelemetry.api.OpenTelemetry The OpenTelemetry to use to collect metrics |
properties | Properties 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()
doStop()
protected void doStop()
getDebugMessages()
public ConcurrentLinkedQueue<WireMessage> getDebugMessages()
Returns | |
---|---|
Type | Description |
ConcurrentLinkedQueue<WireMessage> |
getLocalPort()
public int getLocalPort()
Returns | |
---|---|
Type | Description |
int | the local TCP port that this server is using. |
getNumberOfConnections()
public int getNumberOfConnections()
Returns | |
---|---|
Type | Description |
int | the current number of connections. |
getOpenTelemetry()
public OpenTelemetry getOpenTelemetry()
Returns | |
---|---|
Type | Description |
io.opentelemetry.api.OpenTelemetry |
getOptions()
public OptionsMetadata getOptions()
Returns | |
---|---|
Type | Description |
OptionsMetadata |
getProperties()
public Properties getProperties()
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Type | Description |
String |