public class JavaWebStartState extends Object
As an app is enabled, disabled, suspended, or resumed, the state of how Java Web Start should respond is different. What transitions are permitted in each state is also enforced.
Implementation note: I tried recording the valid transitions (action plus
new state) as part of the state value definitions themselves in the enum.
This did not seem to work; in any Transition values for earlier
states, references to states defined later in the enum were null! It's
probably a little cleaner design to keep the states and the set of valid
transitions separate from each other anyway.
| Modifier and Type | Class and Description |
|---|---|
static class |
JavaWebStartState.Action
Possible actions the server can tell us about.
|
| Constructor and Description |
|---|
JavaWebStartState() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
isRunning()
Reports whether the state represents a "running" condition.
|
boolean |
isSuspended()
Reports whether the state represents a "suspended" condition.
|
void |
transition(JavaWebStartState.Action action,
Runnable task)
Records a transition to the new state that is implied by the current
state and the specified action,
executing the associated task as part of the transition (if the
transition is valid).
|
public void transition(JavaWebStartState.Action action, Runnable task)
The specified action must match a valid transition from the current state.
action - the Action the server is notifying us abouttask - the work to performpublic boolean isRunning()
public boolean isSuspended()
Copyright © 2019. All rights reserved.