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.
<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. |
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. |
config |
val config: NodeSSLConfiguration |
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. |
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 Strictly for dev only automatically construct a server certificate/private key signed from the CA certs in Node resources. Then provision KeyStores into certificates folder under node path. |
parseKeyFromQueueName |
fun parseKeyFromQueueName(name: String): PublicKey |
tcpTransport |
fun tcpTransport(direction: ConnectionDirection, host: String, port: Int): <ERROR CLASS> |