lttng: Rename packages to org.eclipse.tracecompass.*
[deliverable/tracecompass.git] / org.eclipse.tracecompass.lttng2.control.ui / src / org / eclipse / tracecompass / internal / lttng2 / control / ui / views / service / ILttngControlService.java
1 /**********************************************************************
2 * Copyright (c) 2012, 2013 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 * Bernd Hufmann - Updated for support of LTTng Tools 2.1
12 **********************************************************************/
13 package org.eclipse.tracecompass.internal.lttng2.control.ui.views.service;
14
15 import java.util.List;
16
17 import org.eclipse.core.commands.ExecutionException;
18 import org.eclipse.core.runtime.IProgressMonitor;
19 import org.eclipse.tracecompass.internal.lttng2.control.core.model.IBaseEventInfo;
20 import org.eclipse.tracecompass.internal.lttng2.control.core.model.IChannelInfo;
21 import org.eclipse.tracecompass.internal.lttng2.control.core.model.ISessionInfo;
22 import org.eclipse.tracecompass.internal.lttng2.control.core.model.ISnapshotInfo;
23 import org.eclipse.tracecompass.internal.lttng2.control.core.model.IUstProviderInfo;
24 import org.eclipse.tracecompass.internal.lttng2.control.core.model.LogLevelType;
25 import org.eclipse.tracecompass.internal.lttng2.control.core.model.TraceLogLevel;
26
27
28 /**
29 * <p>
30 * Interface for LTTng trace control command service.
31 * </p>
32 *
33 * @author Bernd Hufmann
34 */
35 public interface ILttngControlService {
36
37 /**
38 * @return the LTTng version object
39 */
40 LttngVersion getVersion();
41
42 /**
43 * @return the version string
44 */
45 String getVersionString();
46
47 /**
48 * Checks if given version is supported by this ILTTngControlService implementation.
49 *
50 * @param version The version to check
51 * @return <code>true</code> if version is supported else <code>false</code>
52 */
53 boolean isVersionSupported(String version);
54
55 /**
56 * Retrieves the existing sessions names from the node.
57 *
58 * @param monitor
59 * - a progress monitor
60 * @return an array with session names.
61 * @throws ExecutionException
62 * If the command fails
63 */
64 String[] getSessionNames(IProgressMonitor monitor)
65 throws ExecutionException;
66
67 /**
68 * Retrieves the session information with the given name the node.
69 *
70 * @param sessionName
71 * - the session name
72 * @param monitor
73 * - a progress monitor
74 * @return session information
75 * @throws ExecutionException
76 * If the command fails
77 */
78 ISessionInfo getSession(String sessionName, IProgressMonitor monitor)
79 throws ExecutionException;
80
81 /**
82 * Retrieves the snapshot output information from the node
83 * @param sessionName
84 * - the session name
85 * @param monitor
86 * - a progress monitor
87 * @return snapshot output information
88 * @throws ExecutionException
89 * if command fails
90 */
91 ISnapshotInfo getSnapshotInfo(String sessionName, IProgressMonitor monitor)
92 throws ExecutionException;
93
94 /**
95 * Retrieves the kernel provider information (i.e. the kernel events)
96 *
97 * @param monitor
98 * - a progress monitor
99 * @return the list of existing kernel events.
100 * @throws ExecutionException
101 * If the command fails
102 */
103 List<IBaseEventInfo> getKernelProvider(IProgressMonitor monitor)
104 throws ExecutionException;
105
106 /**
107 * Retrieves the UST provider information from the node.
108 *
109 * @return - the UST provider information.
110 * @throws ExecutionException
111 * If the command fails
112 */
113 public List<IUstProviderInfo> getUstProvider() throws ExecutionException;
114
115 /**
116 * Retrieves the UST provider information from the node.
117 *
118 * @param monitor
119 * - a progress monitor
120 * @return the UST provider information.
121 * @throws ExecutionException
122 * If the command fails
123 */
124 List<IUstProviderInfo> getUstProvider(IProgressMonitor monitor)
125 throws ExecutionException;
126
127 /**
128 * Creates a session with given session name and location.
129 *
130 * @param sessionInfo
131 * the session information used to create the session
132 * @param monitor
133 * - a progress monitor
134 *
135 * @return the session information
136 * @throws ExecutionException
137 * If the command fails
138 */
139 ISessionInfo createSession(ISessionInfo sessionInfo, IProgressMonitor monitor) throws ExecutionException;
140
141 /**
142 * Destroys a session with given session name.
143 *
144 * @param sessionName
145 * - a session name to destroy
146 * @param monitor
147 * - a progress monitor
148 * @throws ExecutionException
149 * If the command fails
150 */
151 void destroySession(String sessionName, IProgressMonitor monitor)
152 throws ExecutionException;
153
154 /**
155 * Starts a session with given session name.
156 *
157 * @param sessionName
158 * - a session name to start
159 * @param monitor
160 * - a progress monitor
161 * @throws ExecutionException
162 * If the command fails
163 */
164 void startSession(String sessionName, IProgressMonitor monitor)
165 throws ExecutionException;
166
167 /**
168 * Stops a session with given session name.
169 *
170 * @param sessionName
171 * - a session name to stop
172 * @param monitor
173 * - a progress monitor
174 * @throws ExecutionException
175 * If the command fails
176 */
177 void stopSession(String sessionName, IProgressMonitor monitor)
178 throws ExecutionException;
179
180 /**
181 * Enables a list of channels for given session and given channel
182 * information (configuration).
183 *
184 * @param sessionName
185 * - a session name to create
186 * @param channelNames
187 * - a list of channel names to be enabled
188 * @param isKernel
189 * - a flag to indicate Kernel or UST (true for Kernel, false for
190 * UST)
191 * @param info
192 * - channel information used for creation of a channel (or null
193 * for default)
194 * @param monitor
195 * - a progress monitor
196 * @throws ExecutionException
197 * If the command fails
198 */
199 void enableChannels(String sessionName, List<String> channelNames,
200 boolean isKernel, IChannelInfo info, IProgressMonitor monitor)
201 throws ExecutionException;
202
203 /**
204 * Disables a list of channels for given session and given channel
205 * information (configuration).
206 *
207 * @param sessionName
208 * - a session name to create
209 * @param channelNames
210 * - a list of channel names to be enabled
211 * @param isKernel
212 * - a flag to indicate Kernel or UST (true for Kernel, false for
213 * UST)
214 * @param monitor
215 * - a progress monitor
216 * @throws ExecutionException
217 * If the command fails
218 */
219 void disableChannels(String sessionName, List<String> channelNames,
220 boolean isKernel, IProgressMonitor monitor)
221 throws ExecutionException;
222
223 /**
224 * Enables a list of events with no additional parameters.
225 *
226 * @param sessionName
227 * - a session name
228 * @param channelName
229 * - a channel name or null for default channel
230 * @param eventNames
231 * - a list of event names to be enabled, or null (list of size =
232 * 0)for all events .
233 * @param isKernel
234 * - a flag for indicating kernel or UST.
235 * @param filterExpression
236 * - a filter expression
237 * @param monitor
238 * - a progress monitor
239 * @throws ExecutionException
240 * If the command fails
241 */
242 void enableEvents(String sessionName, String channelName,
243 List<String> eventNames, boolean isKernel, String filterExpression,
244 IProgressMonitor monitor)
245 throws ExecutionException;
246
247
248 /**
249 * Enables all syscall events.
250 *
251 * @param sessionName
252 * - a session name
253 * @param channelName
254 * - a channel name or null for default channel
255 * @param monitor
256 * - a progress monitor
257 * @throws ExecutionException
258 * If the command fails
259 */
260 void enableSyscalls(String sessionName, String channelName,
261 IProgressMonitor monitor) throws ExecutionException;
262
263 /**
264 * Enables a dynamic probe or dynamic function entry/return probe.
265 *
266 * @param sessionName
267 * - a session name
268 * @param channelName
269 * - a channel name or null for default channel
270 * @param eventName
271 * - a event name
272 * @param isFunction
273 * - true for dynamic function entry/return probe else false
274 * @param probe
275 * - a dynamic probe information
276 * @param monitor
277 * - a progress monitor
278 * @throws ExecutionException
279 * If the command fails
280 */
281 void enableProbe(String sessionName, String channelName,
282 String eventName, boolean isFunction, String probe,
283 IProgressMonitor monitor) throws ExecutionException;
284
285 /**
286 * Enables events using log level
287 *
288 * @param sessionName
289 * - a session name
290 * @param channelName
291 * - a channel name (null for default channel)
292 * @param eventName
293 * - a event name
294 * @param logLevelType
295 * - a log level type
296 * @param level
297 * - a log level
298 * @param filterExpression
299 * - a filter expression
300 * @param monitor
301 * - a progress monitor
302 * @throws ExecutionException
303 * If the command fails
304 */
305 void enableLogLevel(String sessionName, String channelName,
306 String eventName, LogLevelType logLevelType, TraceLogLevel level,
307 String filterExpression,
308 IProgressMonitor monitor) throws ExecutionException;
309
310 /**
311 * Disables a list of events with no additional parameters.
312 *
313 * @param sessionName
314 * - a session name
315 * @param channelName
316 * - a channel name (null for default channel)
317 * @param eventNames
318 * - a list of event names to enabled.
319 * @param isKernel
320 * - a flag for indicating kernel or UST.
321 * @param monitor
322 * - a progress monitor
323 * @throws ExecutionException
324 * If the command fails
325 */
326 void disableEvent(String sessionName, String channelName,
327 List<String> eventNames, boolean isKernel, IProgressMonitor monitor)
328 throws ExecutionException;
329
330 /**
331 * Gets all available context names to be added to channels/events.
332 *
333 * @param monitor
334 * The progress monitor
335 * @return the list of available contexts
336 * @throws ExecutionException
337 * If the command fails
338 */
339 List<String> getContextList(IProgressMonitor monitor)
340 throws ExecutionException;
341
342 /**
343 * Add contexts to given channels and or events
344 *
345 * @param sessionName
346 * - a session name
347 * @param channelName
348 * - a channel name (null for all channels)
349 * @param eventName
350 * - a event name (null for all events)
351 * @param isKernel
352 * - a flag for indicating kernel or UST.
353 * @param contexts
354 * - a list of name of contexts to add
355 * @param monitor
356 * - a progress monitor
357 * @throws ExecutionException
358 * If the command fails
359 */
360 void addContexts(String sessionName, String channelName,
361 String eventName, boolean isKernel, List<String> contexts,
362 IProgressMonitor monitor) throws ExecutionException;
363
364 /**
365 * Executes calibrate command to quantify LTTng overhead.
366 *
367 * @param isKernel
368 * - a flag for indicating kernel or UST.
369 * @param monitor
370 * - a progress monitor
371 * @throws ExecutionException
372 * If the command fails
373 */
374 void calibrate(boolean isKernel, IProgressMonitor monitor)
375 throws ExecutionException;
376
377 /**
378 * Records a snapshot.
379 *
380 * @param sessionName
381 * - a session name
382 * @param monitor
383 * - a progress monitor
384 * @throws ExecutionException
385 * If the command fails
386 */
387 void recordSnapshot(String sessionName, IProgressMonitor monitor)
388 throws ExecutionException;
389
390 /**
391 * Executes a list of commands
392 *
393 * @param monitor
394 * - a progress monitor
395 * @param commands
396 * - array of commands
397 * @throws ExecutionException
398 * If a command fails
399 */
400 void runCommands(IProgressMonitor monitor, List<String> commands)
401 throws ExecutionException;
402 }
This page took 0.041089 seconds and 5 git commands to generate.