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