public final class Session
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private com.google.api.client.auth.oauth2.Credential |
credential
Authentification credentials.
|
protected static Session |
EMPTY
Instance that is used for representing non valid session.
|
private com.google.api.client.http.HttpTransport |
transport
HTTP transport client.
|
Modifier | Constructor and Description |
---|---|
protected |
Session(com.google.api.client.http.HttpTransport transport,
com.google.api.client.auth.oauth2.Credential credential)
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
protected com.google.api.client.http.HttpRequestFactory |
createRequestFactory()
Creates and returns a
HttpTransport instance that is configured with OAuth token. |
protected boolean |
isPresent()
Indicates if this session is valid or not.
|
private final com.google.api.client.auth.oauth2.Credential credential
private final com.google.api.client.http.HttpTransport transport
protected static final Session EMPTY
protected Session(com.google.api.client.http.HttpTransport transport, com.google.api.client.auth.oauth2.Credential credential)
transport
- HTTP transport client.credential
- Authentification credentials.protected boolean isPresent()
EMPTY
session, false otherwise.protected com.google.api.client.http.HttpRequestFactory createRequestFactory()
HttpTransport
instance that is configured with OAuth token.