com.r3corda.node.services.monitor / WalletMonitorService

WalletMonitorService

class WalletMonitorService : AbstractNodeService

Service which allows external clients to monitor the wallet service and state machine manager, as well as trigger actions within the node. The service also sends requests for user input back to clients, for example to enter additional information while a protocol runs, or confirm an action.

This is intended to enable a range of tools from end user UI to ops tools which monitor health across a number of nodes.





Types

RegisteredListener data class RegisteredListener

Exceptions

InputStateRefResolveFailed class InputStateRefResolveFailed : Exception

Constructors

<init> WalletMonitorService(net: MessagingService, smm: StateMachineManager, services: ServiceHub)

Service which allows external clients to monitor the wallet service and state machine manager, as well as trigger actions within the node. The service also sends requests for user input back to clients, for example to enter additional information while a protocol runs, or confirm an action.

Properties

listeners val listeners: MutableSet<RegisteredListener>
services val services: ServiceHub
smm val smm: StateMachineManager

Inherited Properties

net val net: MessagingService
networkMapCache val networkMapCache: NetworkMapCache

Functions

processDeregisterRequest fun processDeregisterRequest(req: DeregisterRequest): Unit

Process a request from a monitor to remove them from the subscribers.

processRegisterRequest fun processRegisterRequest(req: RegisterRequest): Unit

Process a request from a monitor to add them to the subscribers. This includes hooks to authenticate the request, but currently all requests pass (and theres no access control on wallets, so it has no actual meaning).

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.

Companion Object Properties

DEREGISTER_TOPIC val DEREGISTER_TOPIC: String
IN_EVENT_TOPIC val IN_EVENT_TOPIC: String
OUT_EVENT_TOPIC val OUT_EVENT_TOPIC: String
REGISTER_TOPIC val REGISTER_TOPIC: String
STATE_TOPIC val STATE_TOPIC: String
logger val logger: <ERROR CLASS>