public 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 interface NetworkMapCache
. They are also available via RPC
using the CordaRPCOps.networkMapSnapshot
method.
Constructor and Description |
---|
NodeInfo(java.util.List<net.corda.core.utilities.NetworkHostAndPort> addresses,
java.util.List<net.corda.core.identity.PartyAndCertificate> legalIdentitiesAndCerts,
int platformVersion,
long serial)
Information about a network node that acts on behalf of some party. NodeInfos can be found via the network map
cache, accessible from a
interface NetworkMapCache . They are also available via RPC
using the CordaRPCOps.networkMapSnapshot method. |
Modifier and Type | Method and Description |
---|---|
java.util.List<net.corda.core.utilities.NetworkHostAndPort> |
component1()
An ordered list of IP addresses/hostnames where the node can be contacted.
|
java.util.List<net.corda.core.identity.PartyAndCertificate> |
component2()
A non-empty list,
|
int |
component3()
An integer representing the set of protocol features the node supports.
|
long |
component4()
An arbitrary number incremented each time the NodeInfo is changed.
|
NodeInfo |
copy(java.util.List<net.corda.core.utilities.NetworkHostAndPort> addresses,
java.util.List<net.corda.core.identity.PartyAndCertificate> legalIdentitiesAndCerts,
int platformVersion,
long serial)
Information about a network node that acts on behalf of some party. NodeInfos can be found via the network map
cache, accessible from a
interface NetworkMapCache . They are also available via RPC
using the CordaRPCOps.networkMapSnapshot method. |
boolean |
equals(java.lang.Object p) |
java.util.List<net.corda.core.utilities.NetworkHostAndPort> |
getAddresses()
An ordered list of IP addresses/hostnames where the node can be contacted.
|
java.util.List<net.corda.core.identity.Party> |
getLegalIdentities()
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.
|
java.util.List<net.corda.core.identity.PartyAndCertificate> |
getLegalIdentitiesAndCerts()
A non-empty list,
|
int |
getPlatformVersion()
An integer representing the set of protocol features the node supports.
|
long |
getSerial()
An arbitrary number incremented each time the NodeInfo is changed.
|
int |
hashCode() |
PartyAndCertificate |
identityAndCertFromX500Name(CordaX500Name name)
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.
|
Party |
identityFromX500Name(CordaX500Name name)
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.
|
boolean |
isLegalIdentity(Party party)
Returns true if party is one of the identities of this node, else false.
|
boolean |
isLegalIdentity(CordaX500Name name)
Returns true if name matches one of the identities of this node, else false.
|
java.lang.String |
toString() |
public NodeInfo(java.util.List<net.corda.core.utilities.NetworkHostAndPort> addresses, java.util.List<net.corda.core.identity.PartyAndCertificate> legalIdentitiesAndCerts, int platformVersion, long serial)
Information about a network node that acts on behalf of some party. NodeInfos can be found via the network map
cache, accessible from a interface NetworkMapCache
. They are also available via RPC
using the CordaRPCOps.networkMapSnapshot
method.
addresses
- An ordered list of IP addresses/hostnames where the node can be contacted.legalIdentitiesAndCerts
- A non-empty list, where the first identity is assumed to be the default identity of the node.platformVersion
- An integer representing the set of protocol features the node supports. See the docsite for information on how the platform is versioned.serial
- An arbitrary number incremented each time the NodeInfo is changed. This is analogous to the same concept in DNS.interface NetworkMapCache
,
CordaRPCOps.networkMapSnapshot
public java.util.List<net.corda.core.identity.Party> getLegalIdentities()
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.
public boolean isLegalIdentity(Party party)
Returns true if party is one of the identities of this node, else false.
public boolean isLegalIdentity(CordaX500Name name)
Returns true if name matches one of the identities of this node, else false.
public Party identityFromX500Name(CordaX500Name name)
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.
public PartyAndCertificate identityAndCertFromX500Name(CordaX500Name name)
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.
public java.util.List<net.corda.core.utilities.NetworkHostAndPort> getAddresses()
An ordered list of IP addresses/hostnames where the node can be contacted.
public java.util.List<net.corda.core.identity.PartyAndCertificate> getLegalIdentitiesAndCerts()
A non-empty list,
where the first identity is assumed to be the default identity of the node.
public int getPlatformVersion()
An integer representing the set of protocol features the node supports.
See the docsite for information on how the platform is versioned.
public long getSerial()
An arbitrary number incremented each time the NodeInfo is changed.
This is analogous to the same concept in DNS.
public java.util.List<net.corda.core.utilities.NetworkHostAndPort> component1()
An ordered list of IP addresses/hostnames where the node can be contacted.
public java.util.List<net.corda.core.identity.PartyAndCertificate> component2()
A non-empty list,
where the first identity is assumed to be the default identity of the node.
public int component3()
An integer representing the set of protocol features the node supports.
See the docsite for information on how the platform is versioned.
public long component4()
An arbitrary number incremented each time the NodeInfo is changed.
This is analogous to the same concept in DNS.
public NodeInfo copy(java.util.List<net.corda.core.utilities.NetworkHostAndPort> addresses, java.util.List<net.corda.core.identity.PartyAndCertificate> legalIdentitiesAndCerts, int platformVersion, long serial)
Information about a network node that acts on behalf of some party. NodeInfos can be found via the network map
cache, accessible from a interface NetworkMapCache
. They are also available via RPC
using the CordaRPCOps.networkMapSnapshot
method.
public java.lang.String toString()
public int hashCode()
public boolean equals(java.lang.Object p)