Class ChainLink<State,​I,​O>


  • public abstract class ChainLink<State,​I,​O>
    extends java.lang.Object
    • Constructor Detail

      • ChainLink

        public ChainLink()
    • Method Detail

      • getName

        public abstract java.lang.String getName()
      • getStatusBusyMessage

        public abstract java.lang.String getStatusBusyMessage()
        Returns:
        The text that is to be shown when this chainlink is executing, with two postfix dots.
      • generateInput

        protected abstract I generateInput​(State state)
        Returns:
        Gathers all inputs required for the computation
      • executeLink

        protected abstract O executeLink​(I input,
                                         IvMCanceller canceller)
                                  throws java.lang.Exception
        Performs the computation, given the input. Side-effects not allowed; should be thread-safe.
        Parameters:
        input -
        canceller -
        Returns:
        Throws:
        java.lang.Exception
      • processResult

        protected abstract void processResult​(O result,
                                              State state)
        Parameters:
        result -
        state - Processes the result of the computation. Guarantee: if executed, then all inputs are still relevant and have not been replaced.
      • invalidateResult

        protected abstract void invalidateResult​(State state)
        Parameters:
        state - Invalidate the results of this computation.
      • isComplete

        public boolean isComplete()
      • equals

        public boolean equals​(java.lang.Object other)
        Overrides:
        equals in class java.lang.Object
      • cancelAndInvalidateResult

        public void cancelAndInvalidateResult​(State state)
      • execute

        public void execute​(org.processmining.framework.plugin.ProMCanceller globalCanceller,
                            java.util.concurrent.Executor executor,
                            State state,
                            Chain<State> chain)
      • setOnStart

        public void setOnStart​(java.lang.Runnable onStart)
        Sets a callback that is executed on start of execution. Will be executed in the main (gui) thread.
        Parameters:
        onStart -
      • setOnStartStatus

        public void setOnStartStatus​(java.lang.Runnable onStartStatus)
        Sets a callback that is executed on start of execution. Will be executed in the main (gui) thread.
        Parameters:
        onStartStatus -
      • setOnComplete

        public void setOnComplete​(java.lang.Runnable onComplete)
        Sets a callback that is executed on completion of execution. Will be executed in the main (gui) thread.
        Parameters:
        onStart -
      • setOnCompleteStatus

        public void setOnCompleteStatus​(java.lang.Runnable onCompleteStatus)
        Sets a callback that is executed on completion of execution. Will be executed in the main (gui) thread.
        Parameters:
        onStart -
      • setOnException

        public void setOnException​(OnException onException)
      • setOnInvalidate

        public void setOnInvalidate​(java.lang.Runnable onInvalidate)