com.atlassian.jira.startup
Interface JiraStartupState

All Known Implementing Classes:
BootstrappingStartupState, RunningStartupState, StartupStateTemplate

public interface JiraStartupState

Interface for JIRA startup states. The startup state contains any startup checks that need to be performed when JIRA is in a given state.

Since:
4.3.1
See Also:
BootstrappingStartupState, RunningStartupState

Method Summary
 StartupCheck getFailedStartupCheck()
          Returns the first StartupCheck that failed, if any.
 boolean isStartupChecksPassed()
          Returns true if this JiraStartupState's prerequisites have been satisfied (i.e.
 void onJiraStopping()
          This method is called when JIRA is being stopped.
 void onPluginSystemRestarted()
          This method is called when the Atlassian Plugins system has been restarted within JIRA.
 void onPluginSystemStarted()
          This method is called when the Atlassian Plugins system has been started within JIRA.
 void onPluginSystemStopped()
          This method is called when the Atlassian Plugins system has been stopped within JIRA.
 void setFailedStartupCheck(StartupCheck startupCheck)
          Sets the first StartupCheck that failed.
 

Method Detail

isStartupChecksPassed

boolean isStartupChecksPassed()
Returns true if this JiraStartupState's prerequisites have been satisfied (i.e. JIRA is "good to go" in this state). In practice this means that JIRA is able to run in this startup state.

Implementations of this method should run any necessary validity/consistency checks the first time it is called, the result of which should be cached.

Returns:
true if JIRA started correctly

getFailedStartupCheck

StartupCheck getFailedStartupCheck()
Returns the first StartupCheck that failed, if any.

Returns:
the first StartupCheck that failed, if any.

setFailedStartupCheck

void setFailedStartupCheck(StartupCheck startupCheck)
Sets the first StartupCheck that failed.

Parameters:
startupCheck - a StartupCheck

onPluginSystemStarted

void onPluginSystemStarted()
                           throws IllegalStateException
This method is called when the Atlassian Plugins system has been started within JIRA.

Throws:
IllegalStateException - if this is not a valid event for this state

onPluginSystemStopped

void onPluginSystemStopped()
                           throws IllegalStateException
This method is called when the Atlassian Plugins system has been stopped within JIRA.

Throws:
IllegalStateException - if this is not a valid event for this state

onPluginSystemRestarted

void onPluginSystemRestarted()
                             throws IllegalStateException
This method is called when the Atlassian Plugins system has been restarted within JIRA.

Throws:
IllegalStateException - if this is not a valid event for this state

onJiraStopping

void onJiraStopping()
This method is called when JIRA is being stopped.

Throws:
IllegalStateException - if this is not a valid event for this state


Copyright © 2002-2012 Atlassian. All Rights Reserved.