com.atlassian.jira.startup
Class StartupStateTemplate

java.lang.Object
  extended by com.atlassian.jira.startup.StartupStateTemplate
All Implemented Interfaces:
JiraStartupState
Direct Known Subclasses:
BootstrappingStartupState, DelayedStartupState, RunningStartupState

@ThreadSafe
public abstract class StartupStateTemplate
extends Object
implements JiraStartupState

Template class for JiraStartupState implementations. This class takes care of running and storing the results of all startup checks (just override getStartupChecks().


Constructor Summary
StartupStateTemplate()
           
 
Method Summary
 StartupCheck getFailedStartupCheck()
          Returns the first startup check that failed, or null.
protected abstract  com.google.common.collect.ImmutableList<StartupCheck> getStartupChecks()
          Template method that returns an immutable list of startup checks to perform.
 boolean isStartupChecksPassed()
          Returns a boolean indicating if this startup state's startup checks have all passed.
 void setFailedStartupCheck(StartupCheck failedStartupCheck)
          Sets the first startup check that failed.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.atlassian.jira.startup.JiraStartupState
onJiraStopping, onPluginSystemDelayed, onPluginSystemRestarted, onPluginSystemStarted, onPluginSystemStopped
 

Constructor Detail

StartupStateTemplate

public StartupStateTemplate()
Method Detail

isStartupChecksPassed

public boolean isStartupChecksPassed()
Returns a boolean indicating if this startup state's startup checks have all passed. If the checks have not yet been run, they will be run the first time that this method is called.

Specified by:
isStartupChecksPassed in interface JiraStartupState
Returns:
a boolean indicating if this startup state's startup checks have all passed.

getFailedStartupCheck

public StartupCheck getFailedStartupCheck()
Returns the first startup check that failed, or null. Note that if the startup checks have not yet been run, this method returns null independently of whether the checks would actually fail at this point in time.

Specified by:
getFailedStartupCheck in interface JiraStartupState
Returns:
the first startup check that failed, or null

setFailedStartupCheck

public void setFailedStartupCheck(StartupCheck failedStartupCheck)
Sets the first startup check that failed.

Specified by:
setFailedStartupCheck in interface JiraStartupState
Parameters:
failedStartupCheck - a StartupCheck

getStartupChecks

protected abstract com.google.common.collect.ImmutableList<StartupCheck> getStartupChecks()
Template method that returns an immutable list of startup checks to perform.

Returns:
an ImmutableList


Copyright © 2002-2014 Atlassian. All Rights Reserved.