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. |
| 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.
|
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.
|
String |
libraryName()
Returns the library's name,
gcloud-java, as a string. |
String |
libraryVersion()
Returns the library's version as a string.
|
String |
projectId()
Returns the project id.
|
protected boolean |
projectIdRequired()
Returns whether a service requires a project ID.
|
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 AuthCredentials authCredentials()
public RetryParams retryParams()
RetryParams.defaultInstance() is used.public Clock clock()
System.currentTimeMillis() to get
current time.public String applicationName()
gcloud-java/[version].public String libraryName()
gcloud-java, as a string.public String libraryVersion()
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.