corda / net.corda.client.rpc.ext / RPCConnectionListener

RPCConnectionListener

interface RPCConnectionListener<I>

A listener that can be attached to MultiRPCClient to be notified about important RPC connectivity events.

Types

ConnectionContext

interface ConnectionContext<I>

Defines context information for events distributed.

Functions

onConnect

abstract fun onConnect(context: ConnectionContext<I>): Unit

This method will be called to inform that RPC connection is established. ConnectionContext.connectionOpt will not be null.

onDisconnect

abstract fun onDisconnect(context: ConnectionContext<I>): Unit

This method will be called to inform about connection loss. Since given RPC client may produce multiple RPCConnections, ConnectionContext.connectionOpt will specify which connection is interrupted.

onPermanentFailure

abstract fun onPermanentFailure(context: ConnectionContext<I>): Unit

This is a terminal notification to inform that: