class NodeMonitorService : AbstractNodeService
Service which allows external clients to monitor the nodes vault 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.
RegisteredListener |
data class RegisteredListener |
InputStateRefResolveFailed |
class InputStateRefResolveFailed : Exception |
<init> |
NodeMonitorService(services: ServiceHubInternal, smm: StateMachineManager) Service which allows external clients to monitor the nodes vault 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. |
listeners |
val listeners: MutableSet<RegisteredListener> |
smm |
val smm: StateMachineManager |
net |
val net: MessagingServiceInternal |
services |
val services: ServiceHubInternal |
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 vaults, so it has no actual meaning). |
addMessageHandler |
fun <Q : ServiceRequestMessage, R : Any> addMessageHandler(topic: String, handler: (Q) -> R, exceptionConsumer: (Message, Exception) -> Unit): MessageHandlerRegistration 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): MessageHandlerRegistration 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. |
addProtocolHandler |
fun <H : HandshakeMessage, R : Any> addProtocolHandler(topic: String, loggerName: String, protocolFactory: (H) -> ProtocolLogic<R>, onResultFuture: (<ERROR CLASS><R>, H) -> Unit): Unit Register a handler to kick-off a protocol when a HandshakeMessage is received by the node. This performs the necessary steps to enable communication between the two protocols, including calling ProtocolLogic.registerSession. fun <H : HandshakeMessage, R : Any> addProtocolHandler(topic: String, loggerName: String, protocolFactory: (H) -> ProtocolLogic<R>): Unit |
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> |