Package apps.startup
Class StartupPauseModel
java.lang.Object
jmri.util.startup.AbstractStartupModel
apps.startup.StartupPauseModel
- All Implemented Interfaces:
StartupModel
Startup action that causes JMRI to pause before triggering the next startup
action.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintgetDelay()Get the delay this action will pause the startup action processing.getName()Return the name of of the model or its controlled object.booleanisValid()Test is model is a valid model.voidPerform the startup action.voidsetDelay(int delay) Set the delay this action will pause the startup action processing.Methods inherited from class jmri.util.startup.AbstractStartupModel
addException, getExceptions, isEnabled, setEnabled, setName, toString
-
Field Details
-
DEFAULT_DELAY
- See Also:
-
-
Constructor Details
-
StartupPauseModel
public StartupPauseModel()
-
-
Method Details
-
getName
Description copied from interface:StartupModelReturn the name of of the model or its controlled object.- Specified by:
getNamein interfaceStartupModel- Overrides:
getNamein classAbstractStartupModel- Returns:
- the name, an empty string, or null
-
isValid
Test is model is a valid model. Invalid models will not be shown or saved by the Startup Actions Preferences panel. The default behavior is to return true ifAbstractStartupModel.getName()returns a non-null, non-empty String.- Specified by:
isValidin interfaceStartupModel- Overrides:
isValidin classAbstractStartupModel- Returns:
- true if duration greater than or equal to 0; false otherwise
-
getDelay
Get the delay this action will pause the startup action processing.- Returns:
- seconds delay
-
setDelay
Set the delay this action will pause the startup action processing.- Parameters:
delay- delay in seconds
-
performAction
Description copied from interface:StartupModelPerform the startup action. The caller is responsible to ensure that this startup model is enabled before calling this method.- Throws:
JmriException- if there is an exception thrown initializing the startup item; the original exception should be available asThrowable.getCause()
-