public static final class DOFDomain.Config.Builder
extends java.lang.Object
DOFDomain.Config
.Constructor and Description |
---|
Builder(DOFCredentials credentials)
Create a new Builder object.
|
Builder(DOFCredentials credentials,
DOFDomain.State state)
Create a new Builder object from a State object.
|
Builder(DOFDomain.Config config)
Create a new Builder object from a existing Config.
|
Modifier and Type | Method and Description |
---|---|
DOFDomain.Config |
build()
Build the
DOFDomain.Config . |
DOFDomain.Config.Builder |
setCredentials(DOFCredentials credentials)
Set the credentials.
|
DOFDomain.Config.Builder |
setDiscoverRemote(boolean isDiscoverRemote)
Set whether to discover related remote domains or not.
|
DOFDomain.Config.Builder |
setMaxSilence(int maxSilence)
Set the max silence.
|
DOFDomain.Config.Builder |
setName(java.lang.String name)
Set the name of the domain.
|
DOFDomain.Config.Builder |
setRetryPeriod(int retryPeriod)
Set the retry period.
|
public Builder(DOFCredentials credentials)
credentials
- The credentials to use for the DOFDomain. Must not be null.public Builder(DOFCredentials credentials, DOFDomain.State state)
credentials
- The credentials to use for the DOFDomain. Must not be null.state
- The state of a previous DOFDomain to use for the new DOFDomain. Must not be null.public Builder(DOFDomain.Config config)
config
- The existing configuration. This must not be null.public DOFDomain.Config.Builder setName(java.lang.String name)
name
- The domain name. null means you want the domain named automatically (domain1, domain2, etc.)public DOFDomain.Config.Builder setCredentials(DOFCredentials credentials)
credentials
- The credentials to use for the DOFDomain. Must not be null.public DOFDomain.Config.Builder setMaxSilence(int maxSilence)
DOFDomain.DEFAULT_MAX_SILENCE
. This is the minimum
refresh rate. Domain's credentials are re-validated periodically. If it fails to be validated, then
associated connections may be closed. If this is set to a value smaller than the retryPeriod, the
retryPeriod will be set to this value as well.maxSilence
- The max silence. Must be greater than 0.DOFDomain
public DOFDomain.Config.Builder setRetryPeriod(int retryPeriod)
DOFDomain.DEFAULT_RETRY_PERIOD
. This is the minimum
time to wait for trying to authorize the domain again. If this is set to a value larger than the maxSilence, the
maxSilence will be set to this value as well.retryPeriod
- The retry period. Must be greater than 0.DOFDomain
public DOFDomain.Config.Builder setDiscoverRemote(boolean isDiscoverRemote)
isDiscoverRemote
- True if domain discovery should be done.public DOFDomain.Config build()
DOFDomain.Config
.