public class ONSConfigurationHelper
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
(package private) AddressList |
addresses |
private java.lang.String |
nodesVerbatim |
private java.lang.String |
walletFile |
private java.lang.String |
walletPassword |
Constructor and Description |
---|
ONSConfigurationHelper() |
Modifier and Type | Method and Description |
---|---|
void |
addNode(java.lang.String host,
int port)
Adds a host/port tuple.
|
static ONSConfigurationHelper |
create()
Factory method.
|
java.lang.String |
getNodes()
Return a comma-separated list of nodes
|
java.lang.String |
getWalletFile()
Returns the wallet file path.
|
java.lang.String |
getWalletPassword()
Returns the wallet password string
|
static java.lang.String[] |
parseNodeList(java.lang.String nodelist) |
boolean |
removeNode(java.lang.String host,
int port)
Removes the specified host/port tuple
|
void |
setNodes(java.lang.String list)
Sets the node list
|
void |
setWalletFile(java.lang.String walletFile)
Sets the walletfile location used for SSL configuration of the ONS client
|
void |
setWalletPassword(java.lang.String walletPassword)
Sets the wallet password
|
java.lang.String |
toString()
Returns the formatted ONS configuration string.
|
AddressList addresses
private java.lang.String nodesVerbatim
private java.lang.String walletFile
private java.lang.String walletPassword
public static ONSConfigurationHelper create()
public void addNode(java.lang.String host, int port)
host
- A network addressport
- A listen portpublic boolean removeNode(java.lang.String host, int port)
host
- A network addressport
- A listen portpublic java.lang.String getNodes()
public void setNodes(java.lang.String list)
list
- A comma-separated list of nodespublic void setWalletFile(java.lang.String walletFile)
walletFile
- The wallet file pathpublic java.lang.String getWalletFile()
public void setWalletPassword(java.lang.String walletPassword)
walletPassword
- the wallet password in cleartextpublic java.lang.String getWalletPassword()
public java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
public static java.lang.String[] parseNodeList(java.lang.String nodelist)