com.r3corda.client / CordaRPCClient

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.



Constructors

<init> CordaRPCClient(host: <ERROR CLASS>, certificatesPath: Path)

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.

Properties

host val host: <ERROR CLASS>
myID var myID: Int

An ID that we used to identify this connection on the server side: kind of like a local port number but it persists for the lifetime of this process and survives short TCP connection interruptions. Is -1 until start is called.

Inherited Properties

config val config: NodeSSLConfiguration

Functions

close fun close(): Unit

Shuts down the client and lets the server know it can free the used resources (in a nice way)

proxy fun proxy(timeout: Duration? = null, minVersion: Int = 0): CordaRPCOps

Returns a fresh proxy that lets you invoke RPCs on the server. Calls on it block, and if the server throws an exception then it will be rethrown on the client. Proxies are thread safe but only one RPC can be in flight at once. If youd like to perform multiple RPCs in parallel, use this function multiple times to get multiple proxies.

start fun start(): Unit

Opens the connection to the server and registers a JVM shutdown hook to cleanly disconnect.

Inherited Functions

checkStorePasswords fun checkStorePasswords(): Unit

Returns nothing if the keystore was opened OK or throws if not. Useful to check the password, as unfortunately Artemis tends to bury the exception when the password is wrong.

configureWithDevSSLCertificate fun configureWithDevSSLCertificate(): Unit
parseKeyFromQueueName fun parseKeyFromQueueName(name: String): PublicKey
tcpTransport fun tcpTransport(direction: ConnectionDirection, host: String, port: Int): <ERROR CLASS>