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.
Name | Description |
optionsMetadata | OptionsMetadata 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.
Name | Description |
optionsMetadata | OptionsMetadata Resulting metadata from CLI. |
properties | Properties 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
doStart()
protected void doStart()
doStop()
protected void doStop()
getDebugMessages()
public ConcurrentLinkedQueue<WireMessage> getDebugMessages()
Type | Description |
ConcurrentLinkedQueue<WireMessage> |
getLocalPort()
public int getLocalPort()
Type | Description |
int | the local TCP port that this server is using. |
getNumberOfConnections()
public int getNumberOfConnections()
Type | Description |
int | the current number of connections. |
getOptions()
public OptionsMetadata getOptions()
Type | Description |
OptionsMetadata |
getProperties()
public Properties getProperties()
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()
Type | Description |
String |