public class NodeInfo extends JSONParsable
Modifier and Type | Class and Description |
---|---|
static class |
NodeInfo.NodeNetwork
Enumeration of available Node networks the LND node can be connected to.
|
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
nodeAddress |
protected NodeInfo.NodeNetwork |
nodeNetwork |
protected java.lang.Integer |
nodePort |
protected java.lang.String |
publicKeyInfo |
Constructor and Description |
---|
NodeInfo()
Empty Constructor
|
NodeInfo(javax.json.JsonObject jsonObject)
JSON Parseable constructor
|
NodeInfo(java.lang.String connectString)
Constructor populating data from connect string
|
NodeInfo(java.lang.String publicKeyInfo,
java.lang.String nodeAddress,
java.lang.Integer nodePort)
Default Constructor
|
NodeInfo(java.lang.String publicKeyInfo,
java.lang.String nodeAddress,
java.lang.Integer nodePort,
NodeInfo.NodeNetwork nodeNetwork)
Default Constructor
|
Modifier and Type | Method and Description |
---|---|
void |
convertToJson(javax.json.JsonObjectBuilder jsonObjectBuilder)
Method that should set the objects property to Json representation.
|
java.lang.String |
getConnectString() |
java.lang.String |
getNodeAddress() |
NodeInfo.NodeNetwork |
getNodeNetwork() |
java.lang.Integer |
getNodePort() |
java.lang.String |
getPublicKeyInfo() |
void |
parseJson(javax.json.JsonObject jsonObject)
Method to read all properties from a JsonObject into this value object.
|
void |
setConnectString(java.lang.String connectString)
Setter using connect string.
|
void |
setNodeAddress(java.lang.String nodeAddress) |
void |
setNodeNetwork(NodeInfo.NodeNetwork nodeNetwork) |
void |
setNodePort(java.lang.Integer nodePort) |
void |
setPublicKeyInfo(java.lang.String publicKeyInfo) |
add, addB58, addNotRequired, addNotRequiredB58, getBoolean, getBooleanIfSet, getByteArrayFromB58, getByteArrayFromB58IfSet, getByteArrayFromB64, getByteArrayFromB64IfSet, getByteArrayFromHex, getByteArrayFromHexIfSet, getDate, getDateIfSet, getDouble, getDoubleIfSet, getInt, getIntIfSet, getJsonArray, getJsonArrayIfSet, getJsonObject, getJsonObjectIfSet, getLong, getLongIfSet, getString, getStringIfSet, toJson, toJsonAsString, toString
protected java.lang.String publicKeyInfo
protected java.lang.String nodeAddress
protected java.lang.Integer nodePort
protected NodeInfo.NodeNetwork nodeNetwork
public NodeInfo()
public NodeInfo(java.lang.String publicKeyInfo, java.lang.String nodeAddress, java.lang.Integer nodePort)
publicKeyInfo
- the public key info of the lightning handlers node. (Optional)nodeAddress
- address information to the lightning handlers node. (Optional)nodePort
- port the node is listening on for channel connections. (Optional)public NodeInfo(java.lang.String publicKeyInfo, java.lang.String nodeAddress, java.lang.Integer nodePort, NodeInfo.NodeNetwork nodeNetwork)
publicKeyInfo
- the public key info of the lightning handlers node. (Optional)nodeAddress
- address information to the lightning handlers node. (Optional)nodePort
- port the node is listening on for channel connections. (Optional)nodeNetwork
- indicator which the network the LND node is connected to (UNKNOWN is default). (Optional)public NodeInfo(java.lang.String connectString) throws InternalErrorException
connectString
- the full connect string with publicKeyInfo@nodeaddress:port, where port is optional.InternalErrorException
- if given connect string was invalid.public NodeInfo(javax.json.JsonObject jsonObject) throws javax.json.JsonException
jsonObject
- the json object to parsejavax.json.JsonException
public java.lang.String getPublicKeyInfo()
public void setPublicKeyInfo(java.lang.String publicKeyInfo)
publicKeyInfo
- the public key info of the lightning handlers node. (Optional)public java.lang.String getNodeAddress()
public void setNodeAddress(java.lang.String nodeAddress)
nodeAddress
- address information to the lightning handlers node. (Optional)public java.lang.Integer getNodePort()
public void setNodePort(java.lang.Integer nodePort)
nodePort
- port the node is listening on for channel connections. (Optional)public NodeInfo.NodeNetwork getNodeNetwork()
public void setNodeNetwork(NodeInfo.NodeNetwork nodeNetwork)
nodeNetwork
- indicator which the network the LND node is connected to (UNKNOWN is default).public java.lang.String getConnectString()
public void setConnectString(java.lang.String connectString) throws InternalErrorException
connectString
- the full connect string with publicKeyInfo@nodeaddress:port, where port is optional.InternalErrorException
- if given connect string was invalid.public void convertToJson(javax.json.JsonObjectBuilder jsonObjectBuilder) throws javax.json.JsonException
convertToJson
in class JSONParsable
jsonObjectBuilder
- the json object build to use to set key/values in jsonjavax.json.JsonException
- if problems occurred converting object to JSON.public void parseJson(javax.json.JsonObject jsonObject) throws javax.json.JsonException
parseJson
in class JSONParsable
jsonObject
- the json object to read key and values from and set object properties.javax.json.JsonException
- if problems occurred converting object from JSON.