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, waitgetDescription, runprotected static java.net.HttpURLConnection newConnection(java.lang.String url)
throws java.io.IOException,
java.net.MalformedURLException,
java.net.ProtocolException
java.io.IOExceptionjava.net.MalformedURLExceptionjava.net.ProtocolExceptionprotected static java.net.HttpURLConnection newConnection(java.lang.String url,
int readTimeout)
throws java.io.IOException,
java.net.MalformedURLException,
java.net.ProtocolException
java.io.IOExceptionjava.net.MalformedURLExceptionjava.net.ProtocolExceptionprotected 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()
LaunchStepgetMessage in interface LaunchSteppublic int getProgress()
LaunchStepgetProgress in interface LaunchSteppublic LaunchStep.StepState getState()
LaunchStepgetState in interface LaunchSteppublic boolean isIndeterminate()
LaunchStepisIndeterminate in interface LaunchSteppublic static <T> T runLockedAction(LaunchContext context, AbstractLaunchStep step, AbstractLaunchStep.LockedAction<T> action) throws java.lang.Exception
java.lang.Exceptionprotected void setMessagef(java.lang.String bundleKey,
java.lang.Object... formatArgs)
public void setMessage(java.lang.String message)
setMessage in interface LaunchSteppublic void setProgress(int progress)
setProgress in interface LaunchSteppublic void setState(LaunchStep.StepState state)
LaunchStepsetState in interface LaunchSteppublic void setIndeterminate(boolean indeterminate)
setIndeterminate in interface LaunchStepprotected 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 LaunchSteppublic void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
addPropertyChangeListener in interface LaunchSteppublic void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
removePropertyChangeListener in interface LaunchSteppublic void removePropertyChangeListener(java.lang.String propertyName,
java.beans.PropertyChangeListener listener)
removePropertyChangeListener in interface LaunchStep