corda / net.corda.client.rpc / RPCConnection

RPCConnection

@DoNotImplement interface RPCConnection<out I : RPCOps> : Closeable

Holds a proxy object implementing I that forwards requests to the RPC server. The server version can be queried via this interface.

Closeable.close may be used to shut down the connection and release associated resources. It is an alias for notifyServerAndClose.

Properties

proxy

abstract val proxy: I

Holds a synthetic class that automatically forwards method calls to the server, and returns the response.

serverProtocolVersion

abstract val serverProtocolVersion: Int

The RPC protocol version reported by the server.

Functions

forceClose

abstract fun forceClose(): Unit

Closes this client without notifying the server.

notifyServerAndClose

abstract fun notifyServerAndClose(): Unit

Closes this client gracefully by sending a notification to the server, so it can immediately clean up resources. If the server is not available this method may block for a short period until it's clear the server is not coming back.

Extension Functions

contextLogger

fun Any.contextLogger(): Logger

When called from a companion object, returns the logger for the enclosing class.

Inheritors

CordaRPCConnection

class CordaRPCConnection : RPCConnection<CordaRPCOps>

This class is essentially just a wrapper for an RPCConnection and can be treated identically.