Commit | Line | Data |
---|---|---|
eb1bab5b BH |
1 | /********************************************************************** |
2 | * Copyright (c) 2012 Ericsson | |
3 | * | |
4 | * All rights reserved. This program and the accompanying materials are | |
5 | * made available under the terms of the Eclipse Public License v1.0 which | |
6 | * accompanies this distribution, and is available at | |
7 | * http://www.eclipse.org/legal/epl-v10.html | |
8 | * | |
9 | * Contributors: | |
10 | * Bernd Hufmann - Initial API and implementation | |
11 | **********************************************************************/ | |
12 | package org.eclipse.linuxtools.lttng.ui.views.control.service; | |
13 | ||
14 | import java.util.List; | |
15 | ||
16 | import org.eclipse.core.commands.ExecutionException; | |
17 | import org.eclipse.core.runtime.IProgressMonitor; | |
18 | import org.eclipse.linuxtools.lttng.ui.views.control.model.IBaseEventInfo; | |
bbb3538a | 19 | import org.eclipse.linuxtools.lttng.ui.views.control.model.IChannelInfo; |
eb1bab5b BH |
20 | import org.eclipse.linuxtools.lttng.ui.views.control.model.ISessionInfo; |
21 | import org.eclipse.linuxtools.lttng.ui.views.control.model.IUstProviderInfo; | |
ccc66d01 BH |
22 | import org.eclipse.linuxtools.lttng.ui.views.control.model.LogLevelType; |
23 | import org.eclipse.linuxtools.lttng.ui.views.control.model.TraceLogLevel; | |
eb1bab5b BH |
24 | |
25 | ||
26 | /** <b><u>ILttngControlService</u></b> | |
27 | * <p> | |
28 | * Interface for LTTng trace control command service. | |
29 | * </p> | |
30 | */ | |
31 | public interface ILttngControlService { | |
eb1bab5b BH |
32 | /** |
33 | * Retrieves the existing sessions names from the node. | |
34 | * @param monitor - a progress monitor | |
35 | * @return an array with session names. | |
36 | * @throws ExecutionException | |
37 | */ | |
38 | public String[] getSessionNames(IProgressMonitor monitor) throws ExecutionException; | |
39 | ||
eb1bab5b BH |
40 | /** |
41 | * Retrieves the session information with the given name the node. | |
42 | * @param sessionName - the session name | |
43 | * @param monitor - a progress monitor | |
44 | * @return session information | |
45 | * @throws ExecutionException | |
46 | */ | |
47 | public ISessionInfo getSession(String sessionName, IProgressMonitor monitor) throws ExecutionException; | |
48 | ||
eb1bab5b BH |
49 | /** |
50 | * Retrieves the kernel provider information (i.e. the kernel events) | |
51 | * @param monitor - a progress monitor | |
52 | * @return the list of existing kernel events. | |
53 | * @throws ExecutionException | |
54 | */ | |
55 | public List<IBaseEventInfo> getKernelProvider(IProgressMonitor monitor) throws ExecutionException; | |
56 | ||
57 | /** | |
58 | * Retrieves the UST provider information from the node. | |
59 | * @return - the UST provider information. | |
60 | * @throws ExecutionException | |
61 | */ | |
62 | public List<IUstProviderInfo> getUstProvider() throws ExecutionException; | |
63 | /** | |
64 | * Retrieves the UST provider information from the node. | |
65 | * @param monitor - a progress monitor | |
bbb3538a | 66 | * @return the UST provider information. |
eb1bab5b BH |
67 | * @throws ExecutionException |
68 | */ | |
69 | public List<IUstProviderInfo> getUstProvider(IProgressMonitor monitor) throws ExecutionException; | |
bbb3538a BH |
70 | |
71 | /** | |
72 | * Creates a session with given session name and location. | |
73 | * @param sessionName - a session name to create | |
74 | * @param sessionPath - a path for storing the traces (use null for default) | |
75 | * @param monitor - a progress monitor | |
76 | * @return the session information | |
77 | * @throws ExecutionException | |
78 | */ | |
79 | public ISessionInfo createSession(String sessionName, String sessionPath, IProgressMonitor monitor) throws ExecutionException; | |
80 | ||
81 | /** | |
82 | * Destroys a session with given session name. | |
83 | * @param sessionName - a session name to destroy | |
84 | * @param monitor - a progress monitor | |
85 | * @throws ExecutionException | |
86 | */ | |
87 | public void destroySession(String sessionName, IProgressMonitor monitor) throws ExecutionException; | |
88 | ||
89 | /** | |
90 | * Starts a session with given session name. | |
91 | * @param sessionName - a session name to start | |
92 | * @param monitor - a progress monitor | |
93 | * @throws ExecutionException | |
94 | */ | |
95 | public void startSession(String sessionName, IProgressMonitor monitor) throws ExecutionException; | |
96 | ||
97 | /** | |
98 | * Stops a session with given session name. | |
99 | * @param sessionName - a session name to stop | |
100 | * @param monitor - a progress monitor | |
101 | * @throws ExecutionException | |
102 | */ | |
103 | public void stopSession(String sessionName, IProgressMonitor monitor) throws ExecutionException; | |
104 | ||
105 | ||
106 | /** | |
107 | * Enables a list of channels for given session and given channel information (configuration). | |
108 | * @param sessionName - a session name to create | |
109 | * @param channelNames - a list of channel names to enable | |
110 | * @param isKernel - a flag to indicate Kernel or UST (true for Kernel, false for UST) | |
111 | * @param info - channel information used for creation of a channel (or null for default) | |
112 | * @param monitor - a progress monitor | |
113 | * @throws ExecutionException | |
114 | */ | |
498704b3 | 115 | public void enableChannels(String sessionName, List<String> channelNames, boolean isKernel, IChannelInfo info, IProgressMonitor monitor) throws ExecutionException; |
bbb3538a BH |
116 | |
117 | /** | |
118 | * Disables a list of channels for given session and given channel information (configuration). | |
119 | * @param sessionName - a session name to create | |
120 | * @param channelNames - a list of channel names to enable | |
121 | * @param isKernel - a flag to indicate Kernel or UST (true for Kernel, false for UST) | |
122 | * @param monitor - a progress monitor | |
123 | * @throws ExecutionException | |
124 | */ | |
498704b3 | 125 | public void disableChannels(String sessionName, List<String> channelNames, boolean isKernel, IProgressMonitor monitor) throws ExecutionException; |
6503ae0f BH |
126 | |
127 | /** | |
128 | * Enables a list of events with no additional parameters. | |
129 | * @param sessionName - a session name | |
130 | * @param channelName - a channel name (null for default channel) | |
131 | * @param eventNames - a list of event names to enabled. | |
132 | * @param isKernel - a flag for indicating kernel or UST. | |
133 | * @param monitor - a progress monitor | |
134 | * @throws ExecutionException | |
135 | */ | |
498704b3 BH |
136 | public void enableEvents(String sessionName, String channelName, List<String> eventNames, boolean isKernel, IProgressMonitor monitor) throws ExecutionException; |
137 | ||
138 | /** | |
139 | * Enables all syscall events. | |
140 | * @param sessionName - a session name | |
141 | * @param channelName - a channel name (null for default channel) | |
142 | * @param monitor - a progress monitor | |
143 | * @throws ExecutionException | |
144 | */ | |
145 | public void enableSyscalls(String sessionName, String channelName, IProgressMonitor monitor) throws ExecutionException; | |
146 | ||
147 | /** | |
148 | * Enables a dynamic probe. | |
149 | * @param sessionName - a session name | |
150 | * @param channelName - a channel name (null for default channel) | |
498704b3 | 151 | * @param eventName - a event name |
ccc66d01 BH |
152 | * @param probe - a dynamic probe information |
153 | * @param monitor - a progress monitor | |
498704b3 BH |
154 | * @throws ExecutionException |
155 | */ | |
156 | public void enableProbe(String sessionName, String channelName, String eventName, String probe, IProgressMonitor monitor) throws ExecutionException; | |
157 | ||
158 | /** | |
159 | * Enables a dynamic function entry/return probe. | |
160 | * @param sessionName - a session name | |
161 | * @param channelName - a channel name (null for default channel) | |
498704b3 | 162 | * @param eventName - a event name |
ccc66d01 BH |
163 | * @param function - a dynamic function entry/return probe information |
164 | * @param monitor - a progress monitor | |
498704b3 BH |
165 | * @throws ExecutionException |
166 | */ | |
ccc66d01 | 167 | public void enableFunctionProbe(String sessionName, String channelName, String eventName, String function, IProgressMonitor monitor) throws ExecutionException; |
498704b3 | 168 | |
ccc66d01 BH |
169 | /** |
170 | * Enables events using log level | |
171 | * @param sessionName - a session name | |
172 | * @param channelName - a channel name (null for default channel) | |
173 | * @param eventName - a event name | |
174 | * @param logLevelType - a log level type | |
175 | * @param level - a log level | |
176 | * @param monitor - a progress monitor | |
177 | * @throws ExecutionException | |
178 | */ | |
179 | public void enableLogLevel(String sessionName, String channelName, String eventName, LogLevelType logLevelType, TraceLogLevel level, IProgressMonitor monitor) throws ExecutionException; | |
180 | ||
6503ae0f BH |
181 | /** |
182 | * Disables a list of events with no additional parameters. | |
183 | * @param sessionName - a session name | |
184 | * @param channelName - a channel name (null for default channel) | |
185 | * @param eventNames - a list of event names to enabled. | |
186 | * @param isKernel - a flag for indicating kernel or UST. | |
187 | * @param monitor - a progress monitor | |
188 | * @throws ExecutionException | |
189 | */ | |
190 | public void disableEvent(String sessionName, String channelName, List<String> eventNames, boolean isKernel, IProgressMonitor monitor) throws ExecutionException; | |
191 | ||
eb1bab5b | 192 | } |