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; | |
7 | import org.eclipse.linuxtools.lttng.stubs.service.shells.SessionNotExistsShell; | |
8 | import org.eclipse.linuxtools.lttng.stubs.service.shells.SessionNamesShell; | |
9 | import org.eclipse.linuxtools.lttng.ui.views.control.service.ICommandShell; | |
10 | ||
11 | public class CommandShellFactory { | |
12 | ||
13 | public static final int GET_SESSION_NAMES_COMMAND_SHELL = 0; | |
14 | ||
15 | private static CommandShellFactory fInstance = null; | |
16 | ||
17 | public static CommandShellFactory getInstance() { | |
18 | if (fInstance == null) { | |
19 | fInstance = new CommandShellFactory(); | |
20 | } | |
21 | return fInstance; | |
22 | } | |
23 | ||
24 | public ICommandShell getShellForNoSessionNames() { | |
25 | return new NoSessionNamesShell(); | |
26 | } | |
27 | ||
28 | public ICommandShell getShellForSessionNames() { | |
29 | return new SessionNamesShell(); | |
30 | } | |
31 | ||
32 | public ICommandShell getShellForLttngNotExistsShell() { | |
33 | return new LttngNotExistsShell(); | |
34 | } | |
35 | ||
36 | public ICommandShell getShellForSessionNotExists() { | |
37 | return new SessionNotExistsShell(); | |
38 | } | |
39 | ||
40 | public ICommandShell getShellForSessionGarbage() { | |
41 | return new GetSessionGarbageShell(); | |
42 | } | |
43 | ||
44 | public ICommandShell getShellForNoUstProvider() { | |
45 | return new NoUstProviderShell(); | |
46 | } | |
47 | } |