net.corda.node.services.messaging

Package net.corda.node.services.messaging

Types

ArtemisMessagingComponent abstract class ArtemisMessagingComponent : SingletonSerializeAsToken

The base class for Artemis services that defines shared data structures and transport configuration

ArtemisMessagingServer class ArtemisMessagingServer : ArtemisMessagingComponent

This class configures and manages an Apache Artemis message queue broker.

ClassSerializer object ClassSerializer
ClientRPCRequestMessage data class ClientRPCRequestMessage

The contents of an RPC request message, separated from the MQ layer.

CordaRPCClient class CordaRPCClient : Closeable, ArtemisMessagingComponent

An RPC client connects to the specified server and allows you to make calls to the server that perform various useful tasks. See the documentation for proxy or review the docsite to learn more about how this API works.

CordaRPCClientImpl class CordaRPCClientImpl

Core RPC engine implementation, to learn how to use RPC you should be looking at CordaRPCClient.

MarshalledObservation data class MarshalledObservation

Used in the RPC wire protocol to wrap an observation with the handle of the observable its intended for.

NodeMessagingClient class NodeMessagingClient : ArtemisMessagingComponent, MessagingServiceInternal

This class implements the MessagingService API using Apache Artemis, the successor to their ActiveMQ product. Artemis is a message queue broker and here we run a client connecting to the specified broker instance ArtemisMessagingServer. Its primarily concerned with peer-to-peer messaging.

RPCDispatcher abstract class RPCDispatcher

Intended to service transient clients only (not p2p nodes) for short-lived, transient request/response pairs. If you need robustness, this is the wrong system. If you dont want a response, this is probably the wrong system (you could just send a message). If you want complex customisation of how requests/responses are handled, this is probably the wrong system.

Annotations

RPCSinceVersion annotation class RPCSinceVersion

Records the protocol version in which this RPC was added.

Exceptions

PermissionException class PermissionException : RuntimeException
RPCException open class RPCException : RuntimeException

Thrown to indicate a fatal error in the RPC system itself, as opposed to an error generated by the invoked method.

Properties

CURRENT_RPC_USER val CURRENT_RPC_USER: ThreadLocal<User>

This is available to RPC implementations to query the validated User that is calling it. Each user has a set of permissions theyre entitled to which can be used to control access.

rpcLog val rpcLog: <ERROR CLASS>

Global RPC logger

Functions

createRPCKryo fun createRPCKryo(observableSerializer: <ERROR CLASS><<ERROR CLASS><Any>>? = null): <ERROR CLASS>
requirePermission fun requirePermission(permission: String): Unit

Helper method which checks that the current RPC user is entitled for the given permission. Throws a PermissionException otherwise.