public final class ConnectionManager
extends java.lang.Object
HttpConnection
objects used by API service| Modifier and Type | Method and Description |
|---|---|
void |
configureCustomSslContext(javax.net.ssl.SSLContext sslContext) |
HttpConnection |
getConnection() |
HttpConnection |
getConnection(HttpConfiguration httpConfig)
Overloaded method used factory to load GoogleAppEngineSpecific connection
|
static ConnectionManager |
getInstance()
Singleton accessor method
|
public static ConnectionManager getInstance()
ConnectionManager singleton objectpublic HttpConnection getConnection()
public HttpConnection getConnection(HttpConfiguration httpConfig)
httpConfig - HttpConfiguration objectHttpConnection objectpublic void configureCustomSslContext(javax.net.ssl.SSLContext sslContext)
sslContext - an custom SSLContext to set to all new connections.
If null, the default SSLContext will be recovered each new connection.
// On application startup...
public static void main(String[] args) {
SSLContext sslContext = SSLContext.getDefault();
// Or provide your custom context.
ConnectionManager.getInstance().configureCustomSslContext(sslContext);
// Now all connections will use this ssl context except if the authentication method is with certificate credential.
}