Interface FunctionFlowContext<F extends java.lang.Enum<F>>

    • Method Detail

      • getLogger

        java.util.logging.Logger getLogger()
        Obtains the Logger.
        Returns:
        Logger.
      • doFlow

        void doFlow​(int flowIndex,
                    java.lang.Object parameter,
                    FlowCallback callback)

        Similar to doFlow(Enum, Object, FlowCallback) except that allows dynamic instigation of Flow instances.

        In other words, an Enum is not required to define the possible Flow instances available.

        Parameters:
        flowIndex - Index identifying the Flow to instigate.
        parameter - Parameter for the first ManagedFunction of the Flow.
        callback - Optional FlowCallback. May be null.
      • getExecutor

        java.util.concurrent.Executor getExecutor()

        Obtains the Executor to run on another Thread.

        Runnable instances provided to this Executor will always be executed on another Thread. This allows breaking thread stack execution.

        Note that the returned Executor is a singleton per OfficeFloor. Therefore, be careful to not tie up all its Thread instances with blocking / long running Runnable instances. Preference should be to use ManagedFunction instances where appropriate Thread injection can manage execution.

        Returns:
        Executor to run Runnable on another Thread.