data class NodeInfo
Information about a network node that acts on behalf of some party. NodeInfos can be found via the network map cache, accessible from a net.corda.core.node.services.NetworkMapCache. They are also available via RPC using the net.corda.core.messaging.CordaRPCOps.networkMapSnapshot method.
NodeInfo(addresses: List<NetworkHostAndPort>, legalIdentitiesAndCerts: List<PartyAndCertificate>, platformVersion: Int, serial: Long)
Information about a network node that acts on behalf of some party. NodeInfos can be found via the network map cache, accessible from a net.corda.core.node.services.NetworkMapCache. They are also available via RPC using the net.corda.core.messaging.CordaRPCOps.networkMapSnapshot method. |
val addresses: List<NetworkHostAndPort>
An ordered list of IP addresses/hostnames where the node can be contacted. |
|
val legalIdentities: List<Party>
An ordered list of legal identities supported by this node. The node will always have at least one, so if you are porting code from earlier versions of Corda that expected a single party per node, just use the first item in the returned list. |
|
val legalIdentitiesAndCerts: List<PartyAndCertificate>
A non-empty list, where the first identity is assumed to be the default identity of the node. |
|
val platformVersion: Int
An integer representing the set of protocol features the node supports. See the docsite for information on how the platform is versioned. |
|
val serial: Long
An arbitrary number incremented each time the NodeInfo is changed. This is analogous to the same concept in DNS. |
fun identityAndCertFromX500Name(name: CordaX500Name): PartyAndCertificate
Get a legal identity and certificate of this node from the X.500 name. This is intended for use in cases where the node is expected to have a matching identity, and will throw an exception if no match is found. |
|
fun identityFromX500Name(name: CordaX500Name): Party
Get a legal identity of this node from the X.500 name. This is intended for use in cases where the node is expected to have a matching identity, and will throw an exception if no match is found. |
|
fun isLegalIdentity(party: Party): Boolean
Returns true if party is one of the identities of this node, else false. fun isLegalIdentity(name: CordaX500Name): Boolean
Returns true if name matches one of the identities of this node, else false. |
fun Any.contextLogger(): <ERROR CLASS>
When called from a companion object, returns the logger for the enclosing class. |