Class ComputeCredential.Builder (2.1.2)

public static class ComputeCredential.Builder extends Credential.Builder

Beta
Google Compute Engine credential builder.

Implementation is not thread-safe.

Inheritance

java.lang.Object > com.google.api.client.auth.oauth2.Credential.Builder > ComputeCredential.Builder

Constructors

Builder(HttpTransport transport, JsonFactory jsonFactory)

public Builder(HttpTransport transport, JsonFactory jsonFactory)
Parameters
Name Description
transport com.google.api.client.http.HttpTransport

HTTP transport

jsonFactory com.google.api.client.json.JsonFactory

JSON factory

Methods

addRefreshListener(CredentialRefreshListener refreshListener)

public ComputeCredential.Builder addRefreshListener(CredentialRefreshListener refreshListener)
Parameter
Name Description
refreshListener com.google.api.client.auth.oauth2.CredentialRefreshListener
Returns
Type Description
ComputeCredential.Builder
Overrides
com.google.api.client.auth.oauth2.Credential.Builder.addRefreshListener(com.google.api.client.auth.oauth2.CredentialRefreshListener)

build()

public ComputeCredential build()
Returns
Type Description
ComputeCredential
Overrides
com.google.api.client.auth.oauth2.Credential.Builder.build()

setClientAuthentication(HttpExecuteInterceptor clientAuthentication)

public ComputeCredential.Builder setClientAuthentication(HttpExecuteInterceptor clientAuthentication)
Parameter
Name Description
clientAuthentication com.google.api.client.http.HttpExecuteInterceptor
Returns
Type Description
ComputeCredential.Builder
Overrides
com.google.api.client.auth.oauth2.Credential.Builder.setClientAuthentication(com.google.api.client.http.HttpExecuteInterceptor)

setClock(Clock clock)

public ComputeCredential.Builder setClock(Clock clock)
Parameter
Name Description
clock com.google.api.client.util.Clock
Returns
Type Description
ComputeCredential.Builder
Overrides
com.google.api.client.auth.oauth2.Credential.Builder.setClock(com.google.api.client.util.Clock)

setJsonFactory(JsonFactory jsonFactory)

public ComputeCredential.Builder setJsonFactory(JsonFactory jsonFactory)
Parameter
Name Description
jsonFactory com.google.api.client.json.JsonFactory
Returns
Type Description
ComputeCredential.Builder
Overrides
com.google.api.client.auth.oauth2.Credential.Builder.setJsonFactory(com.google.api.client.json.JsonFactory)

setRefreshListeners(Collection<CredentialRefreshListener> refreshListeners)

public ComputeCredential.Builder setRefreshListeners(Collection<CredentialRefreshListener> refreshListeners)
Parameter
Name Description
refreshListeners Collection<com.google.api.client.auth.oauth2.CredentialRefreshListener>
Returns
Type Description
ComputeCredential.Builder
Overrides
com.google.api.client.auth.oauth2.Credential.Builder.setRefreshListeners(java.util.Collection<com.google.api.client.auth.oauth2.CredentialRefreshListener>)

setRequestInitializer(HttpRequestInitializer requestInitializer)

public ComputeCredential.Builder setRequestInitializer(HttpRequestInitializer requestInitializer)
Parameter
Name Description
requestInitializer com.google.api.client.http.HttpRequestInitializer
Returns
Type Description
ComputeCredential.Builder
Overrides
com.google.api.client.auth.oauth2.Credential.Builder.setRequestInitializer(com.google.api.client.http.HttpRequestInitializer)

setTokenServerEncodedUrl(String tokenServerEncodedUrl)

public ComputeCredential.Builder setTokenServerEncodedUrl(String tokenServerEncodedUrl)
Parameter
Name Description
tokenServerEncodedUrl String
Returns
Type Description
ComputeCredential.Builder
Overrides
com.google.api.client.auth.oauth2.Credential.Builder.setTokenServerEncodedUrl(java.lang.String)

setTokenServerUrl(GenericUrl tokenServerUrl)

public ComputeCredential.Builder setTokenServerUrl(GenericUrl tokenServerUrl)
Parameter
Name Description
tokenServerUrl com.google.api.client.http.GenericUrl
Returns
Type Description
ComputeCredential.Builder
Overrides
com.google.api.client.auth.oauth2.Credential.Builder.setTokenServerUrl(com.google.api.client.http.GenericUrl)

setTransport(HttpTransport transport)

public ComputeCredential.Builder setTransport(HttpTransport transport)
Parameter
Name Description
transport com.google.api.client.http.HttpTransport
Returns
Type Description
ComputeCredential.Builder
Overrides
com.google.api.client.auth.oauth2.Credential.Builder.setTransport(com.google.api.client.http.HttpTransport)