ServiceT - the service subclassServiceRpcT - the spi-layer class corresponding to the serviceOptionsT - the ServiceOptions subclass corresponding to the serviceB - the ServiceOptions builderprotected abstract static class ServiceOptions.Builder<ServiceT extends Service<OptionsT>,ServiceRpcT,OptionsT extends ServiceOptions<ServiceT,ServiceRpcT,OptionsT>,B extends ServiceOptions.Builder<ServiceT,ServiceRpcT,OptionsT,B>> extends Object
ServiceOptions.| Modifier | Constructor and Description |
|---|---|
protected |
ServiceOptions.Builder() |
protected |
ServiceOptions.Builder(ServiceOptions<ServiceT,ServiceRpcT,OptionsT> options) |
| Modifier and Type | Method and Description |
|---|---|
B |
authCredentials(AuthCredentials authCredentials)
Sets the service authentication credentials.
|
protected abstract ServiceOptions<ServiceT,ServiceRpcT,OptionsT> |
build() |
B |
clock(Clock clock)
Sets the service's clock.
|
B |
connectTimeout(int connectTimeout)
Sets the timeout in milliseconds to establish a connection.
|
B |
host(String host)
Sets service host.
|
B |
httpTransportFactory(ServiceOptions.HttpTransportFactory httpTransportFactory)
Sets the transport factory.
|
B |
projectId(String projectId)
Sets project id.
|
B |
readTimeout(int readTimeout)
Sets the timeout in milliseconds to read data from an established connection.
|
B |
retryParams(RetryParams retryParams)
Sets configuration parameters for request retries.
|
protected B |
self() |
B |
serviceFactory(ServiceFactory<ServiceT,OptionsT> serviceFactory)
Sets the service factory.
|
B |
serviceRpcFactory(ServiceRpcFactory<ServiceRpcT,OptionsT> serviceRpcFactory)
Sets the factory for rpc services.
|
protected ServiceOptions.Builder()
protected ServiceOptions.Builder(ServiceOptions<ServiceT,ServiceRpcT,OptionsT> options)
protected abstract ServiceOptions<ServiceT,ServiceRpcT,OptionsT> build()
protected B self()
public B serviceFactory(ServiceFactory<ServiceT,OptionsT> serviceFactory)
public B clock(Clock clock)
Clock will be
replaced by Java8's java.time.Clock.clock - the clock to setpublic B httpTransportFactory(ServiceOptions.HttpTransportFactory httpTransportFactory)
public B authCredentials(AuthCredentials authCredentials)
public B retryParams(RetryParams retryParams)
RetryParams.defaultInstance() is used. To disable retries, supply
RetryParams.noRetries() here.public B serviceRpcFactory(ServiceRpcFactory<ServiceRpcT,OptionsT> serviceRpcFactory)
public B connectTimeout(int connectTimeout)
connectTimeout - connection timeout in milliseconds. 0 for an infinite timeout, a
negative number for the default value (20000).public B readTimeout(int readTimeout)
readTimeout - read timeout in milliseconds. 0 for an infinite timeout, a negative number
for the default value (20000).Copyright © 2016 Google. All rights reserved.