public class HttpTransportFactory
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
HttpTransportFactory.HttpTransportType
Types of HttpTransports the factory can create.
|
| Modifier and Type | Field and Description |
|---|---|
static HttpTransportFactory.HttpTransportType |
DEFAULT_TRANSPORT_TYPE |
| Constructor and Description |
|---|
HttpTransportFactory() |
| Modifier and Type | Method and Description |
|---|---|
static com.google.api.client.http.apache.ApacheHttpTransport |
createApacheHttpTransport(org.apache.http.HttpHost proxy)
Deprecated.
|
static com.google.api.client.http.apache.ApacheHttpTransport |
createApacheHttpTransport(java.net.URI proxyUri,
org.apache.http.auth.Credentials proxyCredentials)
Create an
ApacheHttpTransport for calling Google APIs with an optional HTTP proxy. |
static com.google.api.client.http.HttpTransport |
createHttpTransport(HttpTransportFactory.HttpTransportType type,
java.lang.String proxyAddress)
Create an
HttpTransport based on an type class and an optional HTTP proxy. |
static com.google.api.client.http.HttpTransport |
createHttpTransport(HttpTransportFactory.HttpTransportType type,
java.lang.String proxyAddress,
java.lang.String proxyUsername,
java.lang.String proxyPassword)
Create an
HttpTransport based on an type class and an optional HTTP proxy. |
static com.google.api.client.http.javanet.NetHttpTransport |
createNetHttpTransport(java.net.Proxy proxy)
Deprecated.
|
static com.google.api.client.http.javanet.NetHttpTransport |
createNetHttpTransport(java.net.URI proxyUri,
java.net.PasswordAuthentication proxyAuth)
Create an
NetHttpTransport for calling Google APIs with an optional HTTP proxy. |
static HttpTransportFactory.HttpTransportType |
getTransportTypeOf(java.lang.String typeName)
Deprecated.
|
static com.google.api.client.http.HttpTransport |
newTrustedTransport()
Convenience method equivalent to
com.google.api.client.googleapis.javanet.GoogleNetHttpTransport#newTrustedTransport(). |
public static final HttpTransportFactory.HttpTransportType DEFAULT_TRANSPORT_TYPE
@Deprecated public static HttpTransportFactory.HttpTransportType getTransportTypeOf(@Nullable java.lang.String typeName)
HttpTransportFactory.HttpTransportTypes form names, with default.typeName - The name of the HttpTransportFactory.HttpTransportType type to return. A default will be
used if null or empty.java.lang.IllegalArgumentException - if the name is not an HttpTransportType.public static com.google.api.client.http.HttpTransport createHttpTransport(HttpTransportFactory.HttpTransportType type, @Nullable java.lang.String proxyAddress) throws java.io.IOException
HttpTransport based on an type class and an optional HTTP proxy.type - The type of HttpTransport to use.proxyAddress - The HTTP proxy to use with the transport. Of the form hostname:port. If
empty no proxy will be used.java.lang.IllegalArgumentException - If the proxy address is invalid.java.io.IOException - If there is an issue connecting to Google's Certification server.public static com.google.api.client.http.HttpTransport createHttpTransport(HttpTransportFactory.HttpTransportType type, @Nullable java.lang.String proxyAddress, @Nullable java.lang.String proxyUsername, @Nullable java.lang.String proxyPassword) throws java.io.IOException
HttpTransport based on an type class and an optional HTTP proxy.type - The type of HttpTransport to use.proxyAddress - The HTTP proxy to use with the transport. Of the form hostname:port. If
empty no proxy will be used.proxyUsername - The HTTP proxy username to use with the transport. If empty no proxy
username will be used.proxyPassword - The HTTP proxy password to use with the transport. If empty no proxy
password will be used.java.lang.IllegalArgumentException - If the proxy address is invalid.java.io.IOException - If there is an issue connecting to Google's Certification server.@Deprecated
public static com.google.api.client.http.apache.ApacheHttpTransport createApacheHttpTransport(@Nullable
org.apache.http.HttpHost proxy)
throws java.io.IOException,
java.security.GeneralSecurityException
createApacheHttpTransport(URI, Credentials)ApacheHttpTransport for calling Google APIs with an optional HTTP proxy.proxy - Optional HTTP proxy to use with the transport.java.io.IOException - If there is an issue connecting to Google's certification server.java.security.GeneralSecurityException - If there is a security issue with the keystore.public static com.google.api.client.http.apache.ApacheHttpTransport createApacheHttpTransport(@Nullable
java.net.URI proxyUri,
@Nullable
org.apache.http.auth.Credentials proxyCredentials)
throws java.io.IOException,
java.security.GeneralSecurityException
ApacheHttpTransport for calling Google APIs with an optional HTTP proxy.proxyUri - Optional HTTP proxy URI to use with the transport.proxyCredentials - Optional HTTP proxy credentials to authenticate with the transport
proxy.java.io.IOException - If there is an issue connecting to Google's certification server.java.security.GeneralSecurityException - If there is a security issue with the keystore.@Deprecated
public static com.google.api.client.http.javanet.NetHttpTransport createNetHttpTransport(@Nullable
java.net.Proxy proxy)
throws java.io.IOException,
java.security.GeneralSecurityException
createNetHttpTransport(URI, PasswordAuthentication)NetHttpTransport for calling Google APIs with an optional HTTP proxy.proxy - Optional HTTP proxy to use with the transport.java.io.IOException - If there is an issue connecting to Google's certification server.java.security.GeneralSecurityException - If there is a security issue with the keystore.public static com.google.api.client.http.javanet.NetHttpTransport createNetHttpTransport(@Nullable
java.net.URI proxyUri,
@Nullable
java.net.PasswordAuthentication proxyAuth)
throws java.io.IOException,
java.security.GeneralSecurityException
NetHttpTransport for calling Google APIs with an optional HTTP proxy.proxyUri - Optional HTTP proxy URI to use with the transport.proxyAuth - Optional HTTP proxy credentials to authenticate with the transport proxy.java.io.IOException - If there is an issue connecting to Google's certification server.java.security.GeneralSecurityException - If there is a security issue with the keystore.public static com.google.api.client.http.HttpTransport newTrustedTransport()
throws java.security.GeneralSecurityException,
java.io.IOException
com.google.api.client.googleapis.javanet.GoogleNetHttpTransport#newTrustedTransport().java.security.GeneralSecurityExceptionjava.io.IOExceptionCopyright © 2019. All rights reserved.