http-rpc-client / net.corda.v5.httprpc.client / HttpRpcClient

HttpRpcClient

class HttpRpcClient<I : RPCOps> : AutoCloseable

HttpRpcClient is meant to run outside of Corda Node JVM and provide connectivity to a node using the HTTP-RPC protocol. Since Corda Node can expose multiple RPC interfaces through HTTP, it is required to specify which RPCOps interface should be used.

Constructors

<init>

HttpRpcClient(baseAddress: String, rpcOpsClass: Class<I>, clientConfig: HttpRpcClientConfig)
HttpRpcClient(baseAddress: String, rpcOpsClass: Class<I>, clientConfig: HttpRpcClientConfig, healthCheckInterval: Long)

Functions

addConnectionListener

fun addConnectionListener(listener: HttpRpcConnectionListener<I>): Boolean

close

fun close(): Unit

removeConnectionListener

fun removeConnectionListener(listener: HttpRpcConnectionListener<I>): Boolean

start

fun start(): HttpRpcConnection<I>