com.atlassian.theplugin.commons
Interface SchedulableChecker

All Known Implementing Classes:
BambooStatusChecker

public interface SchedulableChecker


Method Summary
 boolean canSchedule()
          Provides info whether the component should be scheduled - ie.
 long getInterval()
          Preferred scheduling interval in milliseconds.
 java.lang.String getName()
           
 java.util.TimerTask newTimerTask()
          Create a new instance of TimerTask for this component so it can be used for (re)scheduling in Timer
 void resetListenersState()
          Resets state of registered listeners (sets state to default/empty)
 

Method Detail

newTimerTask

java.util.TimerTask newTimerTask()
Create a new instance of TimerTask for this component so it can be used for (re)scheduling in Timer

Returns:
new instance of TimerTask

canSchedule

boolean canSchedule()
Provides info whether the component should be scheduled - ie. if there is any work for it to be done on timer.

Returns:
true when this component wants to be scheduled.

getInterval

long getInterval()
Preferred scheduling interval in milliseconds.

Will be used for Timer.schedule(java.util.TimerTask, long).

Returns:
Preferred scheduling interval in milliseconds.

resetListenersState

void resetListenersState()
Resets state of registered listeners (sets state to default/empty)


getName

java.lang.String getName()
Returns:
name of the checker which can be used for example in UI


Copyright © 2008-2009 Atlassian Pty Ltd. All Rights Reserved.