corda / net.corda.core.flows / FlowLogicRefFactory

FlowLogicRefFactory

@DoNotImplement interface FlowLogicRefFactory

The public factory interface for creating validated FlowLogicRef instances as part of the scheduling framework.

Typically this would be used from within the nextScheduledActivity method of a QueryableState to specify the flow to run at the scheduled time.

Functions

create

abstract fun create(flowClass: Class<out FlowLogic<*>>, vararg args: Any?): FlowLogicRef

Construct a FlowLogicRef. This is intended for cases where the calling code has the relevant class already and can provide it directly.

abstract fun create(flowClassName: String, vararg args: Any?): FlowLogicRef

Construct a FlowLogicRef. This is intended for cases where the calling code does not want to require the flow class on the classpath for all cases where the calling code is loaded.

toFlowLogic

abstract fun toFlowLogic(ref: FlowLogicRef): FlowLogic<*>

Converts a FlowLogicRef object that was obtained from the calls above into a FlowLogic, after doing some validation to ensure it points to a legitimate flow class.

Extension Functions

contextLogger

fun Any.contextLogger(): Logger

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