RPCClient
class RPCClient<I : RPCOps>(transport: <Error class: unknown class>, rpcConfiguration: CordaRPCClientConfiguration = CordaRPCClientConfiguration.DEFAULT, serializationContext: SerializationContext = 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: NetworkHostAndPort, sslConfiguration: ClientRpcSslOptions? = null, configuration: CordaRPCClientConfiguration = CordaRPCClientConfiguration.DEFAULT, serializationContext: SerializationContext = SerializationDefaults.RPC_CLIENT_CONTEXT)
constructor(hostAndPort: NetworkHostAndPort, sslConfiguration: <Error class: unknown class>, configuration: CordaRPCClientConfiguration = CordaRPCClientConfiguration.DEFAULT, serializationContext: SerializationContext = SerializationDefaults.RPC_CLIENT_CONTEXT)
constructor(haAddressPool: List<NetworkHostAndPort>, sslConfiguration: ClientRpcSslOptions? = null, configuration: CordaRPCClientConfiguration = CordaRPCClientConfiguration.DEFAULT, serializationContext: SerializationContext = 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: SerializationContext = SerializationDefaults.RPC_CLIENT_CONTEXT, haPoolTransportConfigurations: List<<Error class: unknown class>> = emptyList())
Functions
Link copied to clipboard
Adds RPCConnectionListener to this RPCClient to be informed about important connectivity events.
Link copied to clipboard
Removes RPCConnectionListener from this RPCClient.