Constructor and Description |
---|
Builder()
Creates new builder instance with the defaults initialized.
|
Modifier and Type | Method and Description |
---|---|
TokenIO |
build()
Builds and returns a new
TokenIO instance. |
TokenIOAsync |
buildAsync()
Builds and returns a new
TokenIOAsync instance. |
TokenIO.Builder |
connectTo(TokenIO.TokenCluster cluster)
Sets Token cluster to connect to.
|
TokenIO.Builder |
devKey(java.lang.String devKey)
Sets the developer key to be used with the SDK.
|
TokenIO.Builder |
hostName(java.lang.String hostName)
Sets the host name of the Token Gateway Service to connect to.
|
TokenIO.Builder |
port(int port)
Sets the port of the Token Gateway Service to connect to.
|
TokenIO.Builder |
timeout(long timeoutMs)
Sets timeoutMs that is used for the RPC calls.
|
TokenIO.Builder |
withBrowserFactory(BrowserFactory browserFactory)
Sets the browser factory to be used with the SDK.
|
TokenIO.Builder |
withCryptoEngine(CryptoEngineFactory cryptoEngineFactory)
Sets the crypto engine to be used with the SDK.
|
TokenIO.Builder |
withKeyStore(KeyStore keyStore)
Sets the keystore to be used with the SDK.
|
TokenIO.Builder |
withSslConfig(io.token.rpc.SslConfig sslConfig)
Sets configuration parameters for tls client.
|
public Builder()
public TokenIO.Builder hostName(java.lang.String hostName)
hostName
- host name, e.g. 'api.token.io'public TokenIO.Builder port(int port)
port
- port numberpublic TokenIO.Builder connectTo(TokenIO.TokenCluster cluster)
cluster
- TokenIO.TokenCluster
instance.public TokenIO.Builder timeout(long timeoutMs)
timeoutMs
- RPC call timeoutMspublic TokenIO.Builder withKeyStore(KeyStore keyStore)
keyStore
- the keystore to be usedpublic TokenIO.Builder withCryptoEngine(CryptoEngineFactory cryptoEngineFactory)
cryptoEngineFactory
- the crypto engine factory to usepublic TokenIO.Builder withSslConfig(io.token.rpc.SslConfig sslConfig)
sslConfig
- tls configuration to usepublic TokenIO.Builder devKey(java.lang.String devKey)
devKey
- developer keypublic TokenIO.Builder withBrowserFactory(BrowserFactory browserFactory)
browserFactory
- browser factorypublic TokenIOAsync buildAsync()
TokenIOAsync
instance.TokenIO
instance