Class AbstractLaunchStep
- java.lang.Object
-
- com.inductiveautomation.ignition.client.launch.steps.AbstractLaunchStep
-
- All Implemented Interfaces:
LaunchStep
- Direct Known Subclasses:
BaseStep
public abstract class AbstractLaunchStep extends java.lang.Object implements LaunchStep
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
AbstractLaunchStep.LockedAction<T>
-
Nested classes/interfaces inherited from interface com.inductiveautomation.ignition.client.launch.LaunchStep
LaunchStep.StepState
-
-
Field Summary
Fields Modifier and Type Field Description protected java.beans.PropertyChangeSupport
changeSupport
-
Constructor Summary
Constructors Constructor Description AbstractLaunchStep()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
addPropertyChangeListener(java.beans.PropertyChangeListener listener)
void
addPropertyChangeListener(java.lang.String propertyName, java.beans.PropertyChangeListener listener)
protected void
firePropertyChange(java.lang.String propertyName, java.lang.Object oldValue, java.lang.Object newValue)
java.lang.String
getMessage()
When active, this message describes what the step is currently doingint
getProgress()
The current progress (when running), from 0 to 100LaunchStep.StepState
getState()
The current state of this stepprotected abstract java.lang.String
getString(java.lang.String resourceKey)
Abstraction to accommodate different methods of looking up bundle stringsboolean
isIndeterminate()
If this step can currently not calculate its progress, it is considered indeterminateabstract void
log(java.lang.String message, java.lang.Object... args)
Abstraction to accommodate different logging methodsprotected static java.net.HttpURLConnection
newConnection(java.lang.String url)
protected static java.net.HttpURLConnection
newConnection(java.lang.String url, int readTimeout)
void
removePropertyChangeListener(java.beans.PropertyChangeListener listener)
void
removePropertyChangeListener(java.lang.String propertyName, java.beans.PropertyChangeListener listener)
static <T> T
runLockedAction(LaunchContext context, AbstractLaunchStep step, AbstractLaunchStep.LockedAction<T> action)
Runs an action only after obtaining the file lock on resources.lckvoid
setIndeterminate(boolean indeterminate)
void
setMessage(java.lang.String message)
Sets the message to this literal stringvoid
setMessagef(java.lang.String bundleKey, java.lang.Object... formatArgs)
Sets the message after passing the key through the bundle, and the result through String.format()void
setProgress(int progress)
void
setState(LaunchStep.StepState state)
Sets the state of the step-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.inductiveautomation.ignition.client.launch.LaunchStep
getDescription, run
-
-
-
-
Method Detail
-
newConnection
protected static java.net.HttpURLConnection newConnection(java.lang.String url) throws java.io.IOException, java.net.MalformedURLException, java.net.ProtocolException
- Throws:
java.io.IOException
java.net.MalformedURLException
java.net.ProtocolException
-
newConnection
protected static java.net.HttpURLConnection newConnection(java.lang.String url, int readTimeout) throws java.io.IOException, java.net.MalformedURLException, java.net.ProtocolException
- Throws:
java.io.IOException
java.net.MalformedURLException
java.net.ProtocolException
-
getString
protected abstract java.lang.String getString(java.lang.String resourceKey)
Abstraction to accommodate different methods of looking up bundle strings
-
log
public abstract void log(java.lang.String message, java.lang.Object... args)
Abstraction to accommodate different logging methods- Specified by:
log
in interfaceLaunchStep
-
getMessage
public java.lang.String getMessage()
Description copied from interface:LaunchStep
When active, this message describes what the step is currently doing- Specified by:
getMessage
in interfaceLaunchStep
-
getProgress
public int getProgress()
Description copied from interface:LaunchStep
The current progress (when running), from 0 to 100- Specified by:
getProgress
in interfaceLaunchStep
-
getState
public LaunchStep.StepState getState()
Description copied from interface:LaunchStep
The current state of this step- Specified by:
getState
in interfaceLaunchStep
-
isIndeterminate
public boolean isIndeterminate()
Description copied from interface:LaunchStep
If this step can currently not calculate its progress, it is considered indeterminate- Specified by:
isIndeterminate
in interfaceLaunchStep
-
runLockedAction
public static <T> T runLockedAction(LaunchContext context, AbstractLaunchStep step, AbstractLaunchStep.LockedAction<T> action) throws java.lang.Exception
Runs an action only after obtaining the file lock on resources.lck- Throws:
java.lang.Exception
-
setMessagef
public void setMessagef(java.lang.String bundleKey, java.lang.Object... formatArgs)
Sets the message after passing the key through the bundle, and the result through String.format()- Specified by:
setMessagef
in interfaceLaunchStep
-
setMessage
public void setMessage(java.lang.String message)
Sets the message to this literal string- Specified by:
setMessage
in interfaceLaunchStep
-
setProgress
public void setProgress(int progress)
- Specified by:
setProgress
in interfaceLaunchStep
-
setState
public void setState(LaunchStep.StepState state)
Description copied from interface:LaunchStep
Sets the state of the step- Specified by:
setState
in interfaceLaunchStep
-
setIndeterminate
public void setIndeterminate(boolean indeterminate)
- Specified by:
setIndeterminate
in interfaceLaunchStep
-
firePropertyChange
protected void firePropertyChange(java.lang.String propertyName, java.lang.Object oldValue, java.lang.Object newValue)
-
addPropertyChangeListener
public void addPropertyChangeListener(java.lang.String propertyName, java.beans.PropertyChangeListener listener)
- Specified by:
addPropertyChangeListener
in interfaceLaunchStep
-
addPropertyChangeListener
public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
- Specified by:
addPropertyChangeListener
in interfaceLaunchStep
-
removePropertyChangeListener
public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
- Specified by:
removePropertyChangeListener
in interfaceLaunchStep
-
removePropertyChangeListener
public void removePropertyChangeListener(java.lang.String propertyName, java.beans.PropertyChangeListener listener)
- Specified by:
removePropertyChangeListener
in interfaceLaunchStep
-
-