Package hudson

Class TcpSlaveAgentListener.TcpSlaveAgentListenerRescheduler

  • All Implemented Interfaces:
    ExtensionPoint, Runnable
    Enclosing class:

    public static class TcpSlaveAgentListener.TcpSlaveAgentListenerRescheduler
    extends AperiodicWork
    Reschedules the TcpSlaveAgentListener on demand. Disables itself after running.
    • Constructor Detail

      • TcpSlaveAgentListenerRescheduler

        public TcpSlaveAgentListenerRescheduler()
      • TcpSlaveAgentListenerRescheduler

        public TcpSlaveAgentListenerRescheduler​(Thread originThread,
                                                Throwable cause)
    • Method Detail

      • setOriginThread

        public void setOriginThread​(Thread originThread)
      • setCause

        public void setCause​(Throwable cause)
      • setActive

        public void setActive​(boolean active)
      • getRecurrencePeriod

        public long getRecurrencePeriod()
        Description copied from class: AperiodicWork
        Gets the number of milliseconds between successive executions.

        Jenkins calls this method every time the timer task is scheduled.

        Specified by:
        getRecurrencePeriod in class AperiodicWork
      • getNewInstance

        public AperiodicWork getNewInstance()
        Description copied from class: AperiodicWork
        Gets new instance of task to be executed. Method should return new instance each time, as there no check, if previously scheduled task already finished. Returning same instance could lead to throwing IllegalStateException (especially in case of AsyncAperiodicWork) and therefore scheduling of next tasks will be broken.
        Specified by:
        getNewInstance in class AperiodicWork
        AperiodicWork - timer task instance to be executed
      • schedule

        public static void schedule​(Thread originThread,
                                    Throwable cause)
      • schedule

        public static void schedule​(Thread originThread,
                                    Throwable cause,
                                    long approxDelay)