1 | private static final Set commands = new HashSet();↵ | | 1 | private static final Set commands = new HashSet();↵
|
|
2 | static {↵ | | 2 | static {↵
|
3 | commands.add(ActionNames.ACTION_START);↵ | | 3 | commands.add(ActionNames.ACTION_START);↵
|
4 | commands.add(ActionNames.ACTION_STOP);↵ | | 4 | commands.add(ActionNames.ACTION_STOP);↵
|
5 | commands.add(ActionNames.ACTION_SHUTDOWN);↵ | | 5 | commands.add(ActionNames.ACTION_SHUTDOWN);↵
|
6 | }↵ | | 6 | }↵
|
|
7 | private StandardJMeterEngine engine;↵ | | 7 | private StandardJMeterEngine engine;↵
|
|
8 | /**↵ | | 8 | /**↵
|
9 | * Constructor for the Start object.↵ | | 9 | * Constructor for the Start object.↵
|
10 | */↵ | | 10 | */↵
|
11 | public Start() {↵ | | 11 | public ReportStart() {↵
|
12 | }↵ | | 12 | }↵
|
|
13 | /**↵ | | 13 | /**↵
|
14 | * Gets the ActionNames attribute of the Start object.↵ | | 14 | * Gets the ActionNames attribute of the Start object.↵
|
15 | * ↵ | | 15 | * ↵
|
16 | * @return the ActionNames value↵ | | 16 | * @return the ActionNames value↵
|
17 | */↵ | | 17 | */↵
|
18 | public Set getActionNames() {↵ | | 18 | public Set getActionNames() {↵
|
19 | return commands;↵ | | 19 | return commands;↵
|
20 | }↵ | | 20 | }↵
|
|
21 | public void doAction(ActionEvent e) {↵ | | 21 | public void doAction(ActionEvent e) {↵
|
22 | if (e.getActionCommand().equals(ActionNames.ACTION_START)) {↵ | | 22 | if (e.getActionCommand().equals(ActionNames.ACTION_START)) {↵
|
23 | popupShouldSave(e);↵ | | 23 | popupShouldSave(e);↵
|
24 | startEngine();↵ | | 24 | startEngine();↵
|
25 | } else if (e.getActionCommand().equals(ActionNames.ACTION_STOP)) {↵ | | 25 | } else if (e.getActionCommand().equals(ActionNames.ACTION_STOP)) {↵
|
26 | if (engine != null) {↵ | | 26 | if (engine != null) {↵
|
27 | GuiPackage.getInstance().getMainFrame().showStoppingMessage("");↵ | | 27 | ReportGuiPackage.getInstance().getMainFrame().showStoppingMessage("");↵
|
28 | engine.stopTest();↵ | | 28 | engine.stopTest();↵
|
29 | engine = null;↵ | | 29 | engine = null;↵
|
30 | }↵ | | 30 | }↵
|
31 | } else if (e.getActionCommand().equals(ActionNames.ACTION_SHUTDOWN)) {↵ | | 31 | } else if (e.getActionCommand().equals(ActionNames.ACTION_SHUTDOWN)) {↵
|
32 | if (engine != null) {↵ | | 32 | if (engine != null) {↵
|
33 | GuiPackage.getInstance().getMainFrame().showStoppingMessage("");↵ | | 33 | ReportGuiPackage.getInstance().getMainFrame().showStoppingMessage("");↵
|
34 | engine.askThreadsToStop();↵ | | 34 | engine.askThreadsToStop();↵
|
35 | engine = null | | 35 | engine = null
|