Package hudson.slaves

Class NodeProperty<N extends Node>

    • Field Detail

      • node

        protected transient N extends Node node
    • Constructor Detail

      • NodeProperty

        public NodeProperty()
    • Method Detail

      • setNode

        protected void setNode​(N node)
      • getDescriptor

        public NodePropertyDescriptor getDescriptor()
        Description copied from interface: Describable
        Gets the descriptor for this instance.

        Descriptor is a singleton for every concrete Describable implementation, so if a.getClass() == b.getClass() then by default a.getDescriptor() == b.getDescriptor() as well. (In rare cases a single implementation class may be used for instances with distinct descriptors.)

        Specified by:
        getDescriptor in interface Describable<N extends Node>
      • canTake

        @Deprecated
        public CauseOfBlockage canTake​(Queue.Task task)
        Deprecated.
        Called by the Node to help determine whether or not it should take the given task. Individual properties can return a non-null value here if there is some reason the given task should not be run on its associated node. By default, this method returns null.
        Since:
        1.360
      • canTake

        public CauseOfBlockage canTake​(Queue.BuildableItem item)
        Called by the Node to help determine whether or not it should take the given task. Individual properties can return a non-null value here if there is some reason the given task should not be run on its associated node. By default, this method returns null.
        Since:
        1.413
      • reconfigure

        public NodeProperty<?> reconfigure​(org.kohsuke.stapler.StaplerRequest req,
                                           net.sf.json.JSONObject form)
                                    throws Descriptor.FormException
        Description copied from interface: ReconfigurableDescribable
        When a parent/owner object of a Describable gets a config form submission and instances are recreated, this method is invoked on the existing instance (meaning the 'this' reference points to the existing instance) to create a new instance to be added to the parent/owner object.

        The default implementation of this should be the following:

         return form==null ? null : getDescriptor().newInstance(req, form);
         
        Specified by:
        reconfigure in interface ReconfigurableDescribable<N extends Node>
        Parameters:
        req - The current HTTP request being processed.
        form - JSON fragment that corresponds to this describable object. If the newly submitted form doesn't include a fragment for this describable (meaning the user has de-selected your descriptor), then this argument is null.
        Returns:
        The new instance. To not to create an instance of a describable, return null.
        Throws:
        Descriptor.FormException