public abstract class GoogleApiProxyFactory extends Object
| Modifier and Type | Field and Description |
|---|---|
protected com.google.common.eventbus.EventBus |
eventBus |
| Modifier | Constructor and Description |
|---|---|
protected |
GoogleApiProxyFactory(Map<String,String> credential,
com.google.common.eventbus.EventBus eventBus)
Create factory instance.
|
| Modifier and Type | Method and Description |
|---|---|
com.google.api.client.http.HttpRequestInitializer |
authorize(Collection<String> scopes,
String userAccount,
String prefix)
Creates the thread-safe Google-specific implementation of the OAuth 2.0.
|
String |
getApiKey(String prefix)
Returns value set by
GoogleApiCredential.setApiKey(String)
or defined by property file. |
String |
getApplicationName(String prefix)
Returns value set by
GoogleApiCredential.setApplicationName(String)
or defined by property file. |
String |
getClientId(String prefix)
Returns value set by
GoogleApiCredential.setClientId(String)
or defined by property file. |
String |
getEndpointUrl(String prefix)
Returns value set by
GoogleApiCredential.setEndpointUrl(String)
or defined by property file. |
String |
getFileName(String prefix)
Returns value set by
GoogleApiCredential.setFileName(String)
or defined by property file. |
com.google.api.client.http.HttpTransport |
getHttpTransport()
Returns singleton instance of the HTTP transport.
|
com.google.api.client.json.JsonFactory |
getJsonFactory()
Returns singleton instance of the JSON factory.
|
int |
getNumberOfRetries(String prefix)
Returns value set by
GoogleApiCredential.setNumberOfRetries(int)
or defined by property file. |
String |
getProjectId(String prefix)
Returns value set by
GoogleApiCredential.setProjectId(String)
or defined by property file. |
String |
getServiceAccountEmail(String prefix)
Returns value set by
GoogleApiCredential.setServiceAccountEmail(String)
or defined by property file. |
URL |
getServiceAccountPrivateKeyP12Resource(String prefix) |
InputStream |
getServiceAccountPrivateKeyP12Stream(String prefix) |
boolean |
isCredentialOn(String prefix)
Returns value set by
GoogleApiCredential.setCredentialOn(boolean)
or defined by property file. |
public final com.google.api.client.http.HttpTransport getHttpTransport()
throws GeneralSecurityException,
IOException
GeneralSecurityExceptionIOExceptionpublic final com.google.api.client.json.JsonFactory getJsonFactory()
public String getProjectId(@Nullable String prefix)
GoogleApiCredential.setProjectId(String)
or defined by property file.
If specific credential wouldn't not be found, default will be returned.prefix - the prefix used to identify specific credential or null for defaultMissingResourceException - if default credential was requested and haven't been foundpublic String getClientId(@Nullable String prefix)
GoogleApiCredential.setClientId(String)
or defined by property file.
If specific credential wouldn't not be found, default will be returned.prefix - the prefix used to identify specific credential or null for defaultMissingResourceException - if default credential was requested and haven't been foundpublic final String getServiceAccountEmail(@Nullable String prefix)
GoogleApiCredential.setServiceAccountEmail(String)
or defined by property file.
If specific credential wouldn't not be found, default will be returned.prefix - the prefix used to identify specific credential or null for defaultMissingResourceException - if default credential was requested and haven't been foundpublic final String getApplicationName(@Nullable String prefix)
GoogleApiCredential.setApplicationName(String)
or defined by property file.
If specific credential wouldn't not be found, default will be returned.prefix - the prefix used to identify specific credential or null for defaultMissingResourceException - if default credential was requested and haven't been foundpublic final String getFileName(@Nullable String prefix)
GoogleApiCredential.setFileName(String)
or defined by property file.
If specific credential wouldn't not be found, default will be returned.prefix - the prefix used to identify specific credential or null for defaultMissingResourceException - if default credential was requested and haven't been foundpublic final String getApiKey(@Nullable String prefix)
GoogleApiCredential.setApiKey(String)
or defined by property file.
If specific credential wouldn't not be found, default will be returned.prefix - the prefix used to identify specific credential or null for defaultMissingResourceException - if default credential was requested and haven't been foundpublic final String getEndpointUrl(@Nullable String prefix)
GoogleApiCredential.setEndpointUrl(String)
or defined by property file.
If specific credential wouldn't not be found, default will be returned.prefix - the prefix used to identify specific credential or null for defaultMissingResourceException - if default credential was requested and haven't been foundpublic int getNumberOfRetries(@Nullable String prefix)
GoogleApiCredential.setNumberOfRetries(int)
or defined by property file.
If specific credential wouldn't not be found, default will be returned.prefix - the prefix used to identify specific credential or null for defaultpublic final boolean isCredentialOn(@Nullable String prefix)
GoogleApiCredential.setCredentialOn(boolean)
or defined by property file.
If specific credential wouldn't not be found, default will be returned.prefix - the prefix used to identify specific credential or null for defaultpublic com.google.api.client.http.HttpRequestInitializer authorize(Collection<String> scopes, String userAccount, String prefix) throws GeneralSecurityException, IOException
scopes - the space-separated OAuth scopes to use with the the service account flow
or null for none.userAccount - the email address. If you want to impersonate a user account, specify the email address.
Useful for domain-wide delegation.GeneralSecurityException, - IOExceptionGeneralSecurityExceptionIOExceptionpublic URL getServiceAccountPrivateKeyP12Resource(String prefix)
public InputStream getServiceAccountPrivateKeyP12Stream(String prefix)
Copyright © 2016 Comvai - TurnOnline.biz. All rights reserved.