NodeInfo

data class NodeInfo(val addresses: List<NetworkHostAndPort>, val legalIdentitiesAndCerts: List<PartyAndCertificate>, val platformVersion: Int, val 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.

Constructors

Link copied to clipboard
constructor(addresses: List<NetworkHostAndPort>, legalIdentitiesAndCerts: List<PartyAndCertificate>, platformVersion: Int, serial: Long)

Properties

Link copied to clipboard

An ordered list of IP addresses/hostnames where the node can be contacted.

Link copied to clipboard

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.

Link copied to clipboard

A non-empty list, where the first identity is assumed to be the default identity of the node.

Link copied to clipboard

An integer representing the set of protocol features the node supports. See the docsite for information on how the platform is versioned.

Link copied to clipboard

An arbitrary number incremented each time the NodeInfo is changed. This is analogous to the same concept in DNS.

Functions

Link copied to clipboard

Returns the party identity of the first identity on the node. Until we have proper handling of multiple identities per node, for tests we use the first identity as special one. TODO: Should be removed after multiple identities are introduced.

Link copied to clipboard

Until we have proper handling of multiple identities per node, for tests we use the first identity as special one. TODO: Should be removed after multiple identities are introduced.

Link copied to clipboard

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.

Link copied to clipboard

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.

Link copied to clipboard

Returns true if name matches one of the identities of this node, else false.

Returns true if party is one of the identities of this node, else false.