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

RPCConnectionListener

interface RPCConnectionListener<I : RPCOps>

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

Types

ConnectionContext

interface ConnectionContext<I : RPCOps>

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:

Extension Functions

contextLogger

fun Any.contextLogger(): <ERROR CLASS>

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