com.r3corda.node.services / NotaryChangeService

# NotaryChangeService

`class NotaryChangeService : AbstractNodeService`

A service that monitors the network for requests for changing the notary of a state, and immediately runs the NotaryChangeProtocol if the auto-accept criteria are met.

### Constructors

<init> | `NotaryChangeService(net: MessagingService, smm: StateMachineManager, networkMapCache: NetworkMapCache)` A service that monitors the network for requests for changing the notary of a state, and immediately runs the NotaryChangeProtocol if the auto-accept criteria are met.

### Properties

smm | `val smm: StateMachineManager`

### Inherited Properties

net | `val net: MessagingService`
networkMapCache | `val networkMapCache: NetworkMapCache`

### 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.