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 interfaceAbstractLaunchStep.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.PropertyChangeSupportchangeSupport
-
Constructor Summary
Constructors Constructor Description AbstractLaunchStep()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidaddPropertyChangeListener(java.beans.PropertyChangeListener listener)voidaddPropertyChangeListener(java.lang.String propertyName, java.beans.PropertyChangeListener listener)protected voidfirePropertyChange(java.lang.String propertyName, java.lang.Object oldValue, java.lang.Object newValue)java.lang.StringgetMessage()When active, this message describes what the step is currently doingintgetProgress()The current progress (when running), from 0 to 100LaunchStep.StepStategetState()The current state of this stepprotected abstract java.lang.StringgetString(java.lang.String resourceKey)Abstraction to accommodate different methods of looking up bundle stringsbooleanisIndeterminate()If this step can currently not calculate its progress, it is considered indeterminateabstract voidlog(java.lang.String message, java.lang.Object... args)Abstraction to accommodate different logging methodsprotected static java.net.HttpURLConnectionnewConnection(java.lang.String url)protected static java.net.HttpURLConnectionnewConnection(java.lang.String url, int readTimeout)voidremovePropertyChangeListener(java.beans.PropertyChangeListener listener)voidremovePropertyChangeListener(java.lang.String propertyName, java.beans.PropertyChangeListener listener)static <T> TrunLockedAction(LaunchContext context, AbstractLaunchStep step, AbstractLaunchStep.LockedAction<T> action)Runs an action only after obtaining the file lock on resources.lckvoidsetIndeterminate(boolean indeterminate)voidsetMessage(java.lang.String message)Sets the message to this literal stringvoidsetMessagef(java.lang.String bundleKey, java.lang.Object... formatArgs)Sets the message after passing the key through the bundle, and the result through String.format()voidsetProgress(int progress)voidsetState(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.IOExceptionjava.net.MalformedURLExceptionjava.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.IOExceptionjava.net.MalformedURLExceptionjava.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:
login interfaceLaunchStep
-
getMessage
public java.lang.String getMessage()
Description copied from interface:LaunchStepWhen active, this message describes what the step is currently doing- Specified by:
getMessagein interfaceLaunchStep
-
getProgress
public int getProgress()
Description copied from interface:LaunchStepThe current progress (when running), from 0 to 100- Specified by:
getProgressin interfaceLaunchStep
-
getState
public LaunchStep.StepState getState()
Description copied from interface:LaunchStepThe current state of this step- Specified by:
getStatein interfaceLaunchStep
-
isIndeterminate
public boolean isIndeterminate()
Description copied from interface:LaunchStepIf this step can currently not calculate its progress, it is considered indeterminate- Specified by:
isIndeterminatein 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:
setMessagefin interfaceLaunchStep
-
setMessage
public void setMessage(java.lang.String message)
Sets the message to this literal string- Specified by:
setMessagein interfaceLaunchStep
-
setProgress
public void setProgress(int progress)
- Specified by:
setProgressin interfaceLaunchStep
-
setState
public void setState(LaunchStep.StepState state)
Description copied from interface:LaunchStepSets the state of the step- Specified by:
setStatein interfaceLaunchStep
-
setIndeterminate
public void setIndeterminate(boolean indeterminate)
- Specified by:
setIndeterminatein 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:
addPropertyChangeListenerin interfaceLaunchStep
-
addPropertyChangeListener
public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
- Specified by:
addPropertyChangeListenerin interfaceLaunchStep
-
removePropertyChangeListener
public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
- Specified by:
removePropertyChangeListenerin interfaceLaunchStep
-
removePropertyChangeListener
public void removePropertyChangeListener(java.lang.String propertyName, java.beans.PropertyChangeListener listener)- Specified by:
removePropertyChangeListenerin interfaceLaunchStep
-
-