Class ChainLink<State,I,O>
- java.lang.Object
-
- org.processmining.goaldrivenprocessmining.algorithms.chain.ChainLink<State,I,O>
-
public abstract class ChainLink<State,I,O> extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description ChainLink()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidcancelAndInvalidateResult(State state)booleanequals(java.lang.Object other)voidexecute(org.processmining.framework.plugin.ProMCanceller globalCanceller, java.util.concurrent.Executor executor, State state, Chain<State> chain)protected abstract OexecuteLink(I input, org.processmining.plugins.inductiveVisualMiner.chain.IvMCanceller canceller)Performs the computation, given the input.protected abstract IgenerateInput(State state)abstract java.lang.StringgetName()abstract java.lang.StringgetStatusBusyMessage()protected abstract voidinvalidateResult(State state)booleanisComplete()protected abstract voidprocessResult(O result, State state)voidsetOnComplete(java.lang.Runnable onComplete)Sets a callback that is executed on completion of execution.voidsetOnCompleteStatus(java.lang.Runnable onCompleteStatus)Sets a callback that is executed on completion of execution.voidsetOnException(org.processmining.plugins.inductiveVisualMiner.chain.OnException onException)voidsetOnInvalidate(java.lang.Runnable onInvalidate)voidsetOnStart(java.lang.Runnable onStart)Sets a callback that is executed on start of execution.voidsetOnStartStatus(java.lang.Runnable onStartStatus)Sets a callback that is executed on start of execution.
-
-
-
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, org.processmining.plugins.inductiveVisualMiner.chain.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:
equalsin classjava.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(org.processmining.plugins.inductiveVisualMiner.chain.OnException onException)
-
setOnInvalidate
public void setOnInvalidate(java.lang.Runnable onInvalidate)
-
-