com.r3corda.node.services.network / InMemoryNetworkMapService

InMemoryNetworkMapService

class InMemoryNetworkMapService : NetworkMapService, AbstractNodeService


Constructors

<init> InMemoryNetworkMapService(net: MessagingService, home: NodeRegistration, cache: NetworkMapCache)

Properties

cache val cache: NetworkMapCache
maxSizeRegistrationRequestBytes val maxSizeRegistrationRequestBytes: Int

Maximum credible size for a registration request. Generally requests are around 500-600 bytes, so this gives a 10 times overhead.

maxUnacknowledgedUpdates val maxUnacknowledgedUpdates: Int

Maximum number of unacknowledged updates to send to a node before automatically unregistering them for updates

nodes val nodes: List<NodeInfo>

Inherited Properties

net val net: MessagingService
networkMapCache val networkMapCache: NetworkMapCache

Functions

getUnacknowledgedCount fun getUnacknowledgedCount(subscriber: SingleMessageRecipient): Int?
notifySubscribers fun notifySubscribers(wireReg: WireNodeRegistration): Unit
processAcknowledge fun processAcknowledge(req: UpdateAcknowledge): Unit
processFetchAllRequest fun processFetchAllRequest(req: FetchMapRequest): FetchMapResponse
processQueryRequest fun processQueryRequest(req: QueryIdentityRequest): QueryIdentityResponse
processRegistrationChangeRequest fun processRegistrationChangeRequest(req: RegistrationRequest): RegistrationResponse
processSubscriptionRequest fun processSubscriptionRequest(req: SubscribeRequest): SubscribeResponse

Inherited Functions

addMessageHandler fun <Q : ServiceRequestMessage, R : Any> addMessageHandler(topic: String, handler: (Q) -> R, exceptionConsumer: (Message, Exception) -> Unit): Unit

Register a handler for a message topic. In comparison to using net.addMessageHandler() this manages a lot of common boilerplate code. Exceptions are caught and passed to the provided consumer. If you just want a simple acknowledgement response with no content, use com.r3corda.core.messaging.Ack.

fun <Q : ServiceRequestMessage, R : Any> addMessageHandler(topic: String, handler: (Q) -> R): Unit

Register a handler for a message topic. In comparison to using net.addMessageHandler() this manages a lot of common boilerplate code. Exceptions are propagated to the messaging layer. If you just want a simple acknowledgement response with no content, use com.r3corda.core.messaging.Ack.