@Beta
public final class StoredCredential
extends java.lang.Object
implements java.io.Serializable
Beta DataStoreFactory.
Implementation is thread safe.
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
DEFAULT_DATA_STORE_ID
Default data store ID.
|
| Constructor and Description |
|---|
StoredCredential() |
StoredCredential(Credential credential) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object other) |
java.lang.String |
getAccessToken()
Returns the access token or
null for none. |
static com.google.api.client.util.store.DataStore<StoredCredential> |
getDefaultDataStore(com.google.api.client.util.store.DataStoreFactory dataStoreFactory)
Returns the stored credential data store using the ID
DEFAULT_DATA_STORE_ID. |
java.lang.Long |
getExpirationTimeMilliseconds()
Returns the expected expiration time in milliseconds or
null for none. |
java.lang.String |
getRefreshToken()
Returns the refresh token or
null for none. |
int |
hashCode() |
StoredCredential |
setAccessToken(java.lang.String accessToken)
Sets the access token or
null for none. |
StoredCredential |
setExpirationTimeMilliseconds(java.lang.Long expirationTimeMilliseconds)
Sets the expected expiration time in milliseconds or
null for none. |
StoredCredential |
setRefreshToken(java.lang.String refreshToken)
Sets the refresh token or
null for none. |
java.lang.String |
toString() |
public static final java.lang.String DEFAULT_DATA_STORE_ID
public StoredCredential()
public StoredCredential(Credential credential)
credential - existing credential to copy frompublic java.lang.String getAccessToken()
null for none.public StoredCredential setAccessToken(java.lang.String accessToken)
null for none.public java.lang.Long getExpirationTimeMilliseconds()
null for none.public StoredCredential setExpirationTimeMilliseconds(java.lang.Long expirationTimeMilliseconds)
null for none.public java.lang.String getRefreshToken()
null for none.public StoredCredential setRefreshToken(java.lang.String refreshToken)
null for none.public java.lang.String toString()
toString in class java.lang.Objectpublic boolean equals(java.lang.Object other)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic static com.google.api.client.util.store.DataStore<StoredCredential> getDefaultDataStore(com.google.api.client.util.store.DataStoreFactory dataStoreFactory) throws java.io.IOException
DEFAULT_DATA_STORE_ID.dataStoreFactory - data store factoryjava.io.IOExceptionCopyright © 2011-2018 Google. All Rights Reserved.