Package jenkins.model

Class NodeListener

java.lang.Object
jenkins.model.NodeListener
All Implemented Interfaces:
ExtensionPoint

public abstract class NodeListener extends Object implements ExtensionPoint
Listen to Node CRUD operations.
Since:
2.8
Author:
ogondza.
  • Constructor Details

    • NodeListener

      public NodeListener()
  • Method Details

    • allowLoad

      @Restricted(org.kohsuke.accmod.restrictions.Beta.class) protected boolean allowLoad(@NonNull Node node)
      Allows to veto node loading.
      Parameters:
      node - the node being loaded. Not yet attached to Jenkins.
      Returns:
      false to veto node loading.
    • onCreated

      protected void onCreated(@NonNull Node node)
      Node is being created.
    • onUpdated

      protected void onUpdated(@NonNull Node oldOne, @NonNull Node newOne)
      Node is being updated.
    • onDeleted

      protected void onDeleted(@NonNull Node node)
      Node is being deleted.
    • fireOnCreated

      public static void fireOnCreated(@NonNull Node node)
      Inform listeners that node is being created.
      Parameters:
      node - A node being created.
    • fireOnUpdated

      public static void fireOnUpdated(@NonNull Node oldOne, @NonNull Node newOne)
      Inform listeners that node is being updated.
      Parameters:
      oldOne - Old configuration.
      newOne - New Configuration.
    • fireOnDeleted

      public static void fireOnDeleted(@NonNull Node node)
      Inform listeners that node is being removed.
      Parameters:
      node - A node being removed.
    • all

      @NonNull public static List<NodeListener> all()
      Get all NodeListeners registered in Jenkins.