Package org.knime.core.webui.node.util
Class NodeCleanUpCallback
java.lang.Object
org.knime.core.webui.node.util.NodeCleanUpCallback
- All Implemented Interfaces:
org.knime.core.node.workflow.NodeStateChangeListener,org.knime.core.node.workflow.WorkflowListener
public final class NodeCleanUpCallback
extends Object
implements org.knime.core.node.workflow.WorkflowListener, org.knime.core.node.workflow.NodeStateChangeListener
Helper to clean-up after a node removal, workflow disposal or (optionally) node state change. Once a clean-up has
been triggered, all the registered listeners (on the node and the workflow) are removed which renders the
NodeCleanUpCallback-instance useless afterwards.
- Author:
- Martin Horn, KNIME GmbH, Konstanz, Germany
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic NodeCleanUpCallback.BuildervoidstateChanged(org.knime.core.node.workflow.NodeStateEvent state) voidworkflowChanged(org.knime.core.node.workflow.WorkflowEvent e)
-
Method Details
-
workflowChanged
public void workflowChanged(org.knime.core.node.workflow.WorkflowEvent e) - Specified by:
workflowChangedin interfaceorg.knime.core.node.workflow.WorkflowListener
-
builder
public static NodeCleanUpCallback.Builder builder(org.knime.core.node.workflow.NodeContainer nc, Runnable onCleanUp) - Parameters:
nc- the node to watchonCleanUp- the callback to call when the node is being disposed.- Returns:
- a new builder instance
-
stateChanged
public void stateChanged(org.knime.core.node.workflow.NodeStateEvent state) - Specified by:
stateChangedin interfaceorg.knime.core.node.workflow.NodeStateChangeListener
-