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