Commit | Line | Data |
---|---|---|
eb1bab5b BH |
1 | package org.eclipse.linuxtools.lttng.stubs.service; |
2 | ||
3 | import org.eclipse.linuxtools.lttng.stubs.service.shells.GetSessionGarbageShell; | |
4 | import org.eclipse.linuxtools.lttng.stubs.service.shells.LttngNotExistsShell; | |
5 | import org.eclipse.linuxtools.lttng.stubs.service.shells.NoSessionNamesShell; | |
6 | import org.eclipse.linuxtools.lttng.stubs.service.shells.NoUstProviderShell; | |
bbb3538a | 7 | import org.eclipse.linuxtools.lttng.stubs.service.shells.SessionCreationErrorsShell; |
eb1bab5b BH |
8 | import org.eclipse.linuxtools.lttng.stubs.service.shells.SessionNotExistsShell; |
9 | import org.eclipse.linuxtools.lttng.stubs.service.shells.SessionNamesShell; | |
10 | import org.eclipse.linuxtools.lttng.ui.views.control.service.ICommandShell; | |
11 | ||
12 | public class CommandShellFactory { | |
13 | ||
14 | public static final int GET_SESSION_NAMES_COMMAND_SHELL = 0; | |
15 | ||
16 | private static CommandShellFactory fInstance = null; | |
17 | ||
18 | public static CommandShellFactory getInstance() { | |
19 | if (fInstance == null) { | |
20 | fInstance = new CommandShellFactory(); | |
21 | } | |
22 | return fInstance; | |
23 | } | |
24 | ||
25 | public ICommandShell getShellForNoSessionNames() { | |
26 | return new NoSessionNamesShell(); | |
27 | } | |
28 | ||
29 | public ICommandShell getShellForSessionNames() { | |
30 | return new SessionNamesShell(); | |
31 | } | |
32 | ||
33 | public ICommandShell getShellForLttngNotExistsShell() { | |
34 | return new LttngNotExistsShell(); | |
35 | } | |
36 | ||
37 | public ICommandShell getShellForSessionNotExists() { | |
38 | return new SessionNotExistsShell(); | |
39 | } | |
40 | ||
41 | public ICommandShell getShellForSessionGarbage() { | |
42 | return new GetSessionGarbageShell(); | |
43 | } | |
44 | ||
45 | public ICommandShell getShellForNoUstProvider() { | |
46 | return new NoUstProviderShell(); | |
47 | } | |
bbb3538a BH |
48 | |
49 | public ICommandShell getShellForSessionErrors() { | |
50 | return new SessionCreationErrorsShell(); | |
51 | } | |
eb1bab5b | 52 | } |