Class ProxyServer (0.19.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)

public ProxyServer(OptionsMetadata optionsMetadata)

Instantiates the ProxyServer from CLI-gathered metadata.

Parameter
NameDescription
optionsMetadataOptionsMetadata

Resulting metadata from CLI.

ProxyServer(OptionsMetadata optionsMetadata, Properties properties)

public ProxyServer(OptionsMetadata optionsMetadata, Properties properties)

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

Parameters
NameDescription
optionsMetadataOptionsMetadata

Resulting metadata from CLI.

propertiesProperties

Properties for specificying 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.

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