ServiceT - the service subclassServiceRpcT - the spi-layer class corresponding to the serviceOptionsT - the ServiceOptions subclass corresponding to the servicepublic abstract class ServiceOptions<ServiceT extends Service<OptionsT>,ServiceRpcT,OptionsT extends ServiceOptions<ServiceT,ServiceRpcT,OptionsT>> extends Object implements Serializable
| Modifier and Type | Class and Description |
|---|---|
protected static class |
ServiceOptions.Builder<ServiceT extends Service<OptionsT>,ServiceRpcT,OptionsT extends ServiceOptions<ServiceT,ServiceRpcT,OptionsT>,B extends ServiceOptions.Builder<ServiceT,ServiceRpcT,OptionsT,B>>
Builder for
ServiceOptions. |
static class |
ServiceOptions.DefaultHttpTransportFactory |
static interface |
ServiceOptions.HttpTransportFactory
A base interface for all
HttpTransport factories. |
| Modifier | Constructor and Description |
|---|---|
protected |
ServiceOptions(Class<? extends ServiceFactory<ServiceT,OptionsT>> serviceFactoryClass,
Class<? extends ServiceRpcFactory<ServiceRpcT,OptionsT>> rpcFactoryClass,
ServiceOptions.Builder<ServiceT,ServiceRpcT,OptionsT,?> builder) |
| Modifier and Type | Method and Description |
|---|---|
protected static String |
appEngineAppId() |
protected static String |
appEngineProjectId() |
String |
applicationName()
Returns the application's name as a string in the format
gcloud-java/[version]. |
AuthCredentials |
authCredentials()
Returns the authentication credentials.
|
protected boolean |
baseEquals(ServiceOptions<?,?,?> other) |
protected int |
baseHashCode() |
Clock |
clock()
Returns the service's clock.
|
int |
connectTimeout()
Returns the timeout in milliseconds to establish a connection.
|
protected String |
defaultHost() |
protected String |
defaultProject() |
protected RetryParams |
defaultRetryParams()
Some services may have different backoff requirements listed in their SLAs.
|
protected abstract ServiceRpcFactory<ServiceRpcT,OptionsT> |
defaultRpcFactory() |
protected abstract ServiceFactory<ServiceT,OptionsT> |
defaultServiceFactory() |
protected static String |
googleCloudProjectId() |
String |
host()
Returns the service host.
|
com.google.api.client.http.HttpRequestInitializer |
httpRequestInitializer()
Returns a request initializer responsible for initializing requests according to service
options.
|
ServiceOptions.HttpTransportFactory |
httpTransportFactory()
Returns the transport factory.
|
String |
projectId()
Returns the project id.
|
protected boolean |
projectIdRequired()
Returns whether a service requires a project ID.
|
int |
readTimeout()
Returns the timeout in milliseconds to read from an established connection.
|
RetryParams |
retryParams()
Returns configuration parameters for request retries.
|
ServiceRpcT |
rpc() |
protected abstract Set<String> |
scopes() |
ServiceT |
service() |
protected static String |
serviceAccountProjectId() |
abstract <B extends ServiceOptions.Builder<ServiceT,ServiceRpcT,OptionsT,B>> |
toBuilder() |
protected ServiceOptions(Class<? extends ServiceFactory<ServiceT,OptionsT>> serviceFactoryClass, Class<? extends ServiceRpcFactory<ServiceRpcT,OptionsT>> rpcFactoryClass, ServiceOptions.Builder<ServiceT,ServiceRpcT,OptionsT,?> builder)
protected boolean projectIdRequired()
protected static String appEngineAppId()
protected String defaultHost()
protected String defaultProject()
protected static String googleCloudProjectId()
protected static String appEngineProjectId()
protected static String serviceAccountProjectId()
public ServiceT service()
public ServiceRpcT rpc()
public String projectId()
public String host()
public ServiceOptions.HttpTransportFactory httpTransportFactory()
public AuthCredentials authCredentials()
public RetryParams retryParams()
RetryParams.defaultInstance() is used.public com.google.api.client.http.HttpRequestInitializer httpRequestInitializer()
public int connectTimeout()
public int readTimeout()
public Clock clock()
System.currentTimeMillis() to get
current time.public String applicationName()
gcloud-java/[version].protected int baseHashCode()
protected boolean baseEquals(ServiceOptions<?,?,?> other)
protected abstract ServiceFactory<ServiceT,OptionsT> defaultServiceFactory()
protected abstract ServiceRpcFactory<ServiceRpcT,OptionsT> defaultRpcFactory()
public abstract <B extends ServiceOptions.Builder<ServiceT,ServiceRpcT,OptionsT,B>> B toBuilder()
protected RetryParams defaultRetryParams()
RetryParams.Copyright © 2016 Google. All rights reserved.