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, Properties properties)
public ProxyServer(OptionsMetadata optionsMetadata, Properties properties)
Instantiates the ProxyServer from metadata and properties. For use with in-process invocations.
Parameters | |
---|---|
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
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. |
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 |