public abstract class AbstractLaunchStep extends java.lang.Object implements LaunchStep
Modifier and Type | Class and Description |
---|---|
static interface |
AbstractLaunchStep.LockedAction<T> |
LaunchStep.StepState
Modifier and Type | Field and Description |
---|---|
protected java.beans.PropertyChangeSupport |
changeSupport |
Constructor and Description |
---|
AbstractLaunchStep() |
Modifier and Type | Method and 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 doing
|
int |
getProgress()
The current progress (when running), from 0 to 100
|
LaunchStep.StepState |
getState()
The current state of this step
|
protected abstract java.lang.String |
getString(java.lang.String resourceKey)
Abstraction to accommodate different methods of looking up bundle strings
|
boolean |
isIndeterminate()
If this step can currently not calculate its progress, it is considered indeterminate
|
protected abstract void |
log(java.lang.String message,
java.lang.Object... args)
Abstraction to accommodate different logging methods
|
protected 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.lck
|
void |
setIndeterminate(boolean indeterminate) |
void |
setMessage(java.lang.String message)
Sets the message to this literal string
|
protected 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()
|
void |
setProgress(int progress) |
void |
setState(LaunchStep.StepState state)
Sets the state of the step
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getDescription, getIcon, run
protected static java.net.HttpURLConnection newConnection(java.lang.String url) throws java.io.IOException, java.net.MalformedURLException, java.net.ProtocolException
java.io.IOException
java.net.MalformedURLException
java.net.ProtocolException
protected static java.net.HttpURLConnection newConnection(java.lang.String url, int readTimeout) throws java.io.IOException, java.net.MalformedURLException, java.net.ProtocolException
java.io.IOException
java.net.MalformedURLException
java.net.ProtocolException
protected abstract java.lang.String getString(java.lang.String resourceKey)
protected abstract void log(java.lang.String message, java.lang.Object... args)
public java.lang.String getMessage()
LaunchStep
getMessage
in interface LaunchStep
public int getProgress()
LaunchStep
getProgress
in interface LaunchStep
public LaunchStep.StepState getState()
LaunchStep
getState
in interface LaunchStep
public boolean isIndeterminate()
LaunchStep
isIndeterminate
in interface LaunchStep
public static <T> T runLockedAction(LaunchContext context, AbstractLaunchStep step, AbstractLaunchStep.LockedAction<T> action) throws java.lang.Exception
java.lang.Exception
protected void setMessagef(java.lang.String bundleKey, java.lang.Object... formatArgs)
public void setMessage(java.lang.String message)
setMessage
in interface LaunchStep
public void setProgress(int progress)
setProgress
in interface LaunchStep
public void setState(LaunchStep.StepState state)
LaunchStep
setState
in interface LaunchStep
public void setIndeterminate(boolean indeterminate)
setIndeterminate
in interface LaunchStep
protected void firePropertyChange(java.lang.String propertyName, java.lang.Object oldValue, java.lang.Object newValue)
public void addPropertyChangeListener(java.lang.String propertyName, java.beans.PropertyChangeListener listener)
addPropertyChangeListener
in interface LaunchStep
public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
addPropertyChangeListener
in interface LaunchStep
public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
removePropertyChangeListener
in interface LaunchStep
public void removePropertyChangeListener(java.lang.String propertyName, java.beans.PropertyChangeListener listener)
removePropertyChangeListener
in interface LaunchStep