Encapsulates an @{link Proxy} object and the token for proxy authentication. Following keys are used by the proxy
- transport.proxy.type: HTTP or SOCKS.
- transport.proxy.hostname: host name of the proxy.
- transport.proxy.port: port of the proxy.
- transport.proxy.username: optional, username used to authenticate the proxy.
- transport.proxy.password: optional, password used to authenticate the proxy.
Nested Class Summary
class | GoogleProxy.Builder | Builder for GoogleProxy . |
Constant Summary
String | TRANSPORT_PROXY_HOSTNAME_KEY | configuration key for proxy hostname |
String | TRANSPORT_PROXY_PASSWORD_KEY | configuration key for proxy password |
String | TRANSPORT_PROXY_PORT_KEY | configuration key for proxy port |
String | TRANSPORT_PROXY_TYPE_KEY | configuration key for proxy type |
String | TRANSPORT_PROXY_USERNAME_KEY | configuration key for proxy username |
Public Method Summary
boolean |
equals(Object other)
|
static GoogleProxy |
fromConfiguration()
Creates an
GoogleProxy instance based on proxy configuration. |
HttpRequestInitializer |
getHttpRequestInitializer()
Gets an
HttpRequestInitializer that sets the http header for proxy authorization. |
HttpTransport |
getHttpTransport()
Gets an
HttpTransport that contains the proxy configuration. |
Proxy |
getProxy()
|
int |
hashCode()
|
Inherited Method Summary
Constants
public static final String TRANSPORT_PROXY_HOSTNAME_KEY
configuration key for proxy hostname
public static final String TRANSPORT_PROXY_PASSWORD_KEY
configuration key for proxy password
public static final String TRANSPORT_PROXY_PORT_KEY
configuration key for proxy port
public static final String TRANSPORT_PROXY_TYPE_KEY
configuration key for proxy type
public static final String TRANSPORT_PROXY_USERNAME_KEY
configuration key for proxy username
Public Methods
public boolean equals (Object other)
Parameters
other |
---|
public static GoogleProxy fromConfiguration ()
Creates an GoogleProxy
instance based on proxy configuration.
public HttpRequestInitializer getHttpRequestInitializer ()
Gets an HttpRequestInitializer
that sets the http header for proxy authorization.
public HttpTransport getHttpTransport ()
Gets an HttpTransport
that contains the proxy configuration.
Throws
IOException | |
---|---|
GeneralSecurityException |