public class RepositoryFactoryConfiguration
extends java.lang.Object
RepositoryFactory
.
The only required attribute is the network base url. If the user knows the other values, they
can be provided to allow a better offline capability. If the values are not provided, the RepositoryFactory
will load and cache them using the repositories
RepositoryFactory
,
RepositoryFactoryBase
Constructor and Description |
---|
RepositoryFactoryConfiguration(java.lang.String baseUrl)
It creates a basic configuration with the required base url.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getBaseUrl() |
java.time.Duration |
getEpochAdjustment() |
java.lang.String |
getGenerationHash() |
NetworkCurrencies |
getNetworkCurrencies() |
NetworkType |
getNetworkType() |
void |
setEpochAdjustment(java.time.Duration epochAdjustment) |
void |
setGenerationHash(java.lang.String generationHash) |
void |
setNetworkCurrencies(NetworkCurrencies networkCurrencies) |
void |
setNetworkType(NetworkType networkType) |
RepositoryFactoryConfiguration |
withEpochAdjustment(java.time.Duration epochAdjustment)
Helper method to setup the epochAdjustment when don't want to load it using rest.
|
RepositoryFactoryConfiguration |
withGenerationHash(java.lang.String generationHash)
Helper method to setup the generationHash when don't want to load it using rest.
|
RepositoryFactoryConfiguration |
withNetworkCurrencies(NetworkCurrencies networkCurrencies)
Helper method to setup the
NetworkCurrencies when don't want to load it using rest. |
RepositoryFactoryConfiguration |
withNetworkType(NetworkType networkType)
Helper method to setup the networkType when don't want to load it using rest.
|
public RepositoryFactoryConfiguration(java.lang.String baseUrl)
baseUrl
- the base url.public RepositoryFactoryConfiguration withNetworkType(NetworkType networkType)
networkType
- the networkTypepublic RepositoryFactoryConfiguration withNetworkCurrencies(NetworkCurrencies networkCurrencies)
NetworkCurrencies
when don't want to load it using rest.networkCurrencies
- the NetworkCurrencies
public RepositoryFactoryConfiguration withGenerationHash(java.lang.String generationHash)
generationHash
- the generationHashpublic RepositoryFactoryConfiguration withEpochAdjustment(java.time.Duration epochAdjustment)
epochAdjustment
- the configured epochAdjustmentpublic java.lang.String getBaseUrl()
public NetworkType getNetworkType()
public void setNetworkType(NetworkType networkType)
public java.lang.String getGenerationHash()
public void setGenerationHash(java.lang.String generationHash)
public java.time.Duration getEpochAdjustment()
public void setEpochAdjustment(java.time.Duration epochAdjustment)
public NetworkCurrencies getNetworkCurrencies()
public void setNetworkCurrencies(NetworkCurrencies networkCurrencies)