RPCClient

class RPCClient<I>(transport: <Error class: unknown class>, rpcConfiguration: CordaRPCClientConfiguration = CordaRPCClientConfiguration.DEFAULT, serializationContext: <Error class: unknown class> = SerializationDefaults.RPC_CLIENT_CONTEXT, haPoolTransportConfigurations: List<<Error class: unknown class>> = emptyList())

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

When haAddressPool RPCClient will perform connectivity failover using parameters specified by CordaRPCClientConfiguration. Whenever status of connection changes registered RPCConnectionListener will be informed about those events.

Constructors

Link copied to clipboard
constructor(hostAndPort: <Error class: unknown class>, sslConfiguration: <Error class: unknown class>? = null, configuration: CordaRPCClientConfiguration = CordaRPCClientConfiguration.DEFAULT, serializationContext: <Error class: unknown class> = SerializationDefaults.RPC_CLIENT_CONTEXT)
constructor(hostAndPort: <Error class: unknown class>, sslConfiguration: <Error class: unknown class>, configuration: CordaRPCClientConfiguration = CordaRPCClientConfiguration.DEFAULT, serializationContext: <Error class: unknown class> = SerializationDefaults.RPC_CLIENT_CONTEXT)
constructor(haAddressPool: List<<Error class: unknown class>>, sslConfiguration: <Error class: unknown class>? = null, configuration: CordaRPCClientConfiguration = CordaRPCClientConfiguration.DEFAULT, serializationContext: <Error class: unknown class> = SerializationDefaults.RPC_CLIENT_CONTEXT)

A way to create RPC connections to a pool of RPC addresses for resiliency

constructor(transport: <Error class: unknown class>, rpcConfiguration: CordaRPCClientConfiguration = CordaRPCClientConfiguration.DEFAULT, serializationContext: <Error class: unknown class> = SerializationDefaults.RPC_CLIENT_CONTEXT, haPoolTransportConfigurations: List<<Error class: unknown class>> = emptyList())

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard

Adds RPCConnectionListener to this RPCClient to be informed about important connectivity events.

Link copied to clipboard
fun start(rpcOpsClass: Class<I>, username: String, password: String, externalTrace: <Error class: unknown class>? = null, impersonatedActor: <Error class: unknown class>? = null, targetLegalIdentity: <Error class: unknown class>? = null): RPCConnection<I>