public PluginServiceHub extends ServiceHub
A service hub to be used by the class CordaPluginRegistry
class CordaPluginRegistry
ServiceHub.DefaultImpls
Modifier and Type | Method and Description |
---|---|
kotlin.jvm.functions.Function1<net.corda.core.crypto.Party,net.corda.core.flows.FlowLogic> |
getFlowFactory(java.lang.Class<?> markerClass)
Return the flow factory that has been registered with markerClass, or null if no factory is found.
|
void |
registerFlowInitiator(kotlin.reflect.KClass<?> markerClass,
kotlin.jvm.functions.Function1<? super net.corda.core.crypto.Party,? extends net.corda.core.flows.FlowLogic<?>> flowFactory)
Register the flow factory we wish to use when a initiating party attempts to communicate with us. The
registration is done against a marker KClass which is sent in the session handshake by the other party. If this
marker class has been registered then the corresponding factory will be used to create the flow which will
communicate with the other side. If there is no mapping then the session attempt is rejected.
|
getClock, getIdentityService, getKeyManagementService, getLegalIdentityKey, getMyInfo, getNetworkMapCache, getNetworkService, getNotaryIdentityKey, getSchedulerService, getStorageService, getVaultService, invokeFlowAsync, loadState, recordTransactions, toStateAndRef
void registerFlowInitiator(kotlin.reflect.KClass<?> markerClass, kotlin.jvm.functions.Function1<? super net.corda.core.crypto.Party,? extends net.corda.core.flows.FlowLogic<?>> flowFactory)
Register the flow factory we wish to use when a initiating party attempts to communicate with us. The registration is done against a marker KClass which is sent in the session handshake by the other party. If this marker class has been registered then the corresponding factory will be used to create the flow which will communicate with the other side. If there is no mapping then the session attempt is rejected.
markerClass
- The marker KClass present in a session initiation attempt, which is a 1:1 mapping to a Class
using the ::class construct. Conventionally this is a class FlowLogic
subclass, however any class can
be used, with the default being the class of the initiating flow. This enables the registration to be of the
form: registerFlowInitiator(InitiatorFlow::class, ::InitiatedFlow)flowFactory
- The flow factory generating the initiated flow.kotlin.jvm.functions.Function1<net.corda.core.crypto.Party,net.corda.core.flows.FlowLogic> getFlowFactory(java.lang.Class<?> markerClass)
Return the flow factory that has been registered with markerClass, or null if no factory is found.