net.corda.core.flows

## Class FlowLogicRefFactory

- SingletonSerializeAsToken
- - net.corda.core.flows.FlowLogicRefFactory

- All Implemented Interfaces:
    SerializeAsToken

      public class FlowLogicRefFactory
      extends SingletonSerializeAsToken

  A class for conversion to and from `class FlowLogic` and `class FlowLogicRef` instances.

  Validation of types is performed on the way in and way out in case this object is passed between JVMs which might have differing whitelists.

  TODO: Ways to populate whitelist of "blessed" flows per node/party TODO: Ways to populate argument types whitelist. Per node/party or global? TODO: Align with API related logic for passing in FlowLogic references (FlowRef) TODO: Actual support for AppContext / AttachmentsClassLoader

  See Also:
    `class FlowLogic`, `class FlowLogicRef`

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `FlowLogicRefFactory(java.util.Map<java.lang.String,? extends java.util.Set<java.lang.String>> flowWhitelist)` A class for conversion to and from `class FlowLogic` and `class FlowLogicRef` instances.
    `FlowLogicRefFactory()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `FlowLogicRef` | `create(java.lang.Class<? extends net.corda.core.flows.FlowLogic<?>> type, java.lang.Object args)` Create a `class FlowLogicRef` by matching against the available constructors and the given args.
    `FlowLogicRef` | `createKotlin(java.lang.String flowLogicClassName, java.util.Map<java.lang.String,? extends java.lang.Object> args, java.util.List<? extends net.corda.core.crypto.SecureHash> attachments)` Create a `class FlowLogicRef` for the Kotlin primary constructor of a named `class FlowLogic`
    `FlowLogicRef` | `createKotlin(java.lang.Class<? extends net.corda.core.flows.FlowLogic<?>> type, java.util.Map<java.lang.String,? extends java.lang.Object> args)` Create a `class FlowLogicRef` by trying to find a Kotlin constructor that matches the given args.
    `FlowLogic<?>` | `toFlowLogic(FlowLogicRef ref)`

    - ### Methods inherited from class net.corda.core.serialization.SingletonSerializeAsToken

      `toToken`

    - ### Methods inherited from interface net.corda.core.serialization.SerializeAsToken

      `toToken`

- - ### Constructor Detail

    - #### FlowLogicRefFactory

          public FlowLogicRefFactory(java.util.Map<java.lang.String,? extends java.util.Set<java.lang.String>> flowWhitelist)

      A class for conversion to and from `class FlowLogic` and `class FlowLogicRef` instances.

      Validation of types is performed on the way in and way out in case this object is passed between JVMs which might have differing whitelists.

      TODO: Ways to populate whitelist of "blessed" flows per node/party TODO: Ways to populate argument types whitelist. Per node/party or global? TODO: Align with API related logic for passing in FlowLogic references (FlowRef) TODO: Actual support for AppContext / AttachmentsClassLoader

      See Also:
        `class FlowLogic`, `class FlowLogicRef`

    - #### FlowLogicRefFactory

          public FlowLogicRefFactory()

  - ### Method Detail

    - #### createKotlin

          public FlowLogicRef createKotlin(java.lang.String flowLogicClassName,
                                           java.util.Map<java.lang.String,? extends java.lang.Object> args,
                                           java.util.List<? extends net.corda.core.crypto.SecureHash> attachments)

      Create a `class FlowLogicRef` for the Kotlin primary constructor of a named `class FlowLogic`

      See Also:
        `class FlowLogicRef`, `class FlowLogic`

    - #### create

          public FlowLogicRef create(java.lang.Class<? extends net.corda.core.flows.FlowLogic<?>> type,
                                     java.lang.Object args)

      Create a `class FlowLogicRef` by matching against the available constructors and the given args.

      See Also:
        `class FlowLogicRef`

    - #### createKotlin

          public FlowLogicRef createKotlin(java.lang.Class<? extends net.corda.core.flows.FlowLogic<?>> type,
                                           java.util.Map<java.lang.String,? extends java.lang.Object> args)

      Create a `class FlowLogicRef` by trying to find a Kotlin constructor that matches the given args.

      TODO: Rethink language specific naming.

      See Also:
        `class FlowLogicRef`

    - #### toFlowLogic

          public FlowLogic<?> toFlowLogic(FlowLogicRef ref)