public static class NetworkMapCache.DefaultImpls
A network map contains lists of nodes on the network along with information about their identity keys, services they provide and host names or IP addresses where they can be connected to. The cache wraps around a map fetched from an authoritative service, and adds easy lookup of the data stored within it. Generally it would be initialised with a specified network map service, which it fetches data from and then subscribes to updates of.
Modifier and Type | Method and Description |
---|---|
static Party |
getAnyNotary(NetworkMapCache $this,
ServiceType type)
Returns a notary identity advertised by any of the nodes on the network (chosen at random)
|
static NodeInfo |
getNodeByLegalName(NetworkMapCache $this,
java.lang.String name)
Look up the node info for a legal name.
|
static java.util.List<net.corda.core.node.NodeInfo> |
getNodesByAdvertisedServiceIdentityKey(NetworkMapCache $this,
CompositeKey compositeKey)
Look up all nodes advertising the service owned by compositeKey
|
static java.util.List<net.corda.core.node.NodeInfo> |
getNodesWithService(NetworkMapCache $this,
ServiceType serviceType)
Get the collection of nodes which advertise a specific service.
|
static Party |
getNotary(NetworkMapCache $this,
java.lang.String name)
Gets a notary identity by the given name.
|
static java.util.List<net.corda.core.node.NodeInfo> |
getNotaryNodes(NetworkMapCache $this)
A list of nodes that advertise a notary service
|
static NodeInfo |
getRecommended(NetworkMapCache $this,
ServiceType type,
Contract contract,
net.corda.core.crypto.Party party)
Get a recommended node that advertises a service, and is suitable for the specified contract and parties.
Implementations might understand, for example, the correct regulator to use for specific contracts/parties,
or the appropriate oracle for a contract.
|
static java.util.List<net.corda.core.node.NodeInfo> |
getRegulatorNodes(NetworkMapCache $this)
A list of nodes that advertise a regulatory service. Identifying the correct regulator for a trade is outside
the scope of the network map service, and this is intended solely as a sanity check on configuration stored
elsewhere.
|
static boolean |
isNotary(NetworkMapCache $this,
Party party)
Checks whether a given party is an advertised notary identity
|
static boolean |
isValidatingNotary(NetworkMapCache $this,
Party party)
Checks whether a given party is an advertised validating notary identity
|
public static java.util.List<net.corda.core.node.NodeInfo> getNotaryNodes(NetworkMapCache $this)
A list of nodes that advertise a notary service
public static java.util.List<net.corda.core.node.NodeInfo> getRegulatorNodes(NetworkMapCache $this)
A list of nodes that advertise a regulatory service. Identifying the correct regulator for a trade is outside the scope of the network map service, and this is intended solely as a sanity check on configuration stored elsewhere.
public static java.util.List<net.corda.core.node.NodeInfo> getNodesWithService(NetworkMapCache $this, ServiceType serviceType)
Get the collection of nodes which advertise a specific service.
public static NodeInfo getRecommended(NetworkMapCache $this, ServiceType type, Contract contract, net.corda.core.crypto.Party party)
Get a recommended node that advertises a service, and is suitable for the specified contract and parties. Implementations might understand, for example, the correct regulator to use for specific contracts/parties, or the appropriate oracle for a contract.
public static NodeInfo getNodeByLegalName(NetworkMapCache $this, java.lang.String name)
Look up the node info for a legal name.
public static java.util.List<net.corda.core.node.NodeInfo> getNodesByAdvertisedServiceIdentityKey(NetworkMapCache $this, CompositeKey compositeKey)
Look up all nodes advertising the service owned by compositeKey
public static Party getNotary(NetworkMapCache $this, java.lang.String name)
Gets a notary identity by the given name.
public static Party getAnyNotary(NetworkMapCache $this, ServiceType type)
Returns a notary identity advertised by any of the nodes on the network (chosen at random)
type
- Limits the result to notaries of the specified type (optional)public static boolean isNotary(NetworkMapCache $this, Party party)
Checks whether a given party is an advertised notary identity
public static boolean isValidatingNotary(NetworkMapCache $this, Party party)
Checks whether a given party is an advertised validating notary identity