Update to session creation procedure
[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, 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 networkUrl
129 * - a network URL for common definition of data and control channel
130 * or null if separate definition of data and control channel
131 * @param controlUrl
132 * - a URL for control channel (networkUrl has to be null, dataUrl has to be set)
133 * @param dataUrl
134 * - a URL for data channel (networkUrl has to be null, controlUrl has to be set)
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 networkUrl, String controlUrl, String dataUrl, IProgressMonitor monitor) throws ExecutionException;
142
143 /**
144 * Destroys a session with given session name.
145 *
146 * @param sessionName
147 * - a session name to destroy
148 * @param monitor
149 * - a progress monitor
150 * @throws ExecutionException
151 * If the command fails
152 */
153 public void destroySession(String sessionName, IProgressMonitor monitor)
154 throws ExecutionException;
155
156 /**
157 * Starts a session with given session name.
158 *
159 * @param sessionName
160 * - a session name to start
161 * @param monitor
162 * - a progress monitor
163 * @throws ExecutionException
164 * If the command fails
165 */
166 public void startSession(String sessionName, IProgressMonitor monitor)
167 throws ExecutionException;
168
169 /**
170 * Stops a session with given session name.
171 *
172 * @param sessionName
173 * - a session name to stop
174 * @param monitor
175 * - a progress monitor
176 * @throws ExecutionException
177 * If the command fails
178 */
179 public void stopSession(String sessionName, IProgressMonitor monitor)
180 throws ExecutionException;
181
182 /**
183 * Enables a list of channels for given session and given channel
184 * information (configuration).
185 *
186 * @param sessionName
187 * - a session name to create
188 * @param channelNames
189 * - a list of channel names to be enabled
190 * @param isKernel
191 * - a flag to indicate Kernel or UST (true for Kernel, false for
192 * UST)
193 * @param info
194 * - channel information used for creation of a channel (or null
195 * for default)
196 * @param monitor
197 * - a progress monitor
198 * @throws ExecutionException
199 * If the command fails
200 */
201 public void enableChannels(String sessionName, List<String> channelNames,
202 boolean isKernel, IChannelInfo info, IProgressMonitor monitor)
203 throws ExecutionException;
204
205 /**
206 * Disables a list of channels for given session and given channel
207 * information (configuration).
208 *
209 * @param sessionName
210 * - a session name to create
211 * @param channelNames
212 * - a list of channel names to be enabled
213 * @param isKernel
214 * - a flag to indicate Kernel or UST (true for Kernel, false for
215 * UST)
216 * @param monitor
217 * - a progress monitor
218 * @throws ExecutionException
219 * If the command fails
220 */
221 public void disableChannels(String sessionName, List<String> channelNames,
222 boolean isKernel, IProgressMonitor monitor)
223 throws ExecutionException;
224
225 /**
226 * Enables a list of events with no additional parameters.
227 *
228 * @param sessionName
229 * - a session name
230 * @param channelName
231 * - a channel name or null for default channel
232 * @param eventNames
233 * - a list of event names to be enabled, or null (list of size =
234 * 0)for all events .
235 * @param isKernel
236 * - a flag for indicating kernel or UST.
237 * @param filterExpression
238 * - a filter expression
239 * @param monitor
240 * - a progress monitor
241 * @throws ExecutionException
242 * If the command fails
243 */
244 public void enableEvents(String sessionName, String channelName,
245 List<String> eventNames, boolean isKernel, String filterExpression,
246 IProgressMonitor monitor)
247 throws ExecutionException;
248
249
250 /**
251 * Enables all syscall events.
252 *
253 * @param sessionName
254 * - a session name
255 * @param channelName
256 * - a channel name or null for default channel
257 * @param monitor
258 * - a progress monitor
259 * @throws ExecutionException
260 * If the command fails
261 */
262 public void enableSyscalls(String sessionName, String channelName,
263 IProgressMonitor monitor) throws ExecutionException;
264
265 /**
266 * Enables a dynamic probe or dynamic function entry/return probe.
267 *
268 * @param sessionName
269 * - a session name
270 * @param channelName
271 * - a channel name or null for default channel
272 * @param eventName
273 * - a event name
274 * @param isFunction
275 * - true for dynamic function entry/return probe else false
276 * @param probe
277 * - a dynamic probe information
278 * @param monitor
279 * - a progress monitor
280 * @throws ExecutionException
281 * If the command fails
282 */
283 public void enableProbe(String sessionName, String channelName,
284 String eventName, boolean isFunction, String probe,
285 IProgressMonitor monitor) throws ExecutionException;
286
287 /**
288 * Enables events using log level
289 *
290 * @param sessionName
291 * - a session name
292 * @param channelName
293 * - a channel name (null for default channel)
294 * @param eventName
295 * - a event name
296 * @param logLevelType
297 * - a log level type
298 * @param level
299 * - a log level
300 * @param filterExpression
301 * - a filter expression
302 * @param monitor
303 * - a progress monitor
304 * @throws ExecutionException
305 * If the command fails
306 */
307 public void enableLogLevel(String sessionName, String channelName,
308 String eventName, LogLevelType logLevelType, TraceLogLevel level,
309 String filterExpression,
310 IProgressMonitor monitor) throws ExecutionException;
311
312 /**
313 * Disables a list of events with no additional parameters.
314 *
315 * @param sessionName
316 * - a session name
317 * @param channelName
318 * - a channel name (null for default channel)
319 * @param eventNames
320 * - a list of event names to enabled.
321 * @param isKernel
322 * - a flag for indicating kernel or UST.
323 * @param monitor
324 * - a progress monitor
325 * @throws ExecutionException
326 * If the command fails
327 */
328 public void disableEvent(String sessionName, String channelName,
329 List<String> eventNames, boolean isKernel, IProgressMonitor monitor)
330 throws ExecutionException;
331
332 /**
333 * Gets all available context names to be added to channels/events.
334 *
335 * @param monitor
336 * The progress monitor
337 * @return the list of available contexts
338 * @throws ExecutionException
339 * If the command fails
340 */
341 public List<String> getContextList(IProgressMonitor monitor)
342 throws ExecutionException;
343
344 /**
345 * Add contexts to given channels and or events
346 *
347 * @param sessionName
348 * - a session name
349 * @param channelName
350 * - a channel name (null for all channels)
351 * @param eventName
352 * - a event name (null for all events)
353 * @param isKernel
354 * - a flag for indicating kernel or UST.
355 * @param contexts
356 * - a list of name of contexts to add
357 * @param monitor
358 * - a progress monitor
359 * @throws ExecutionException
360 * If the command fails
361 */
362 public void addContexts(String sessionName, String channelName,
363 String eventName, boolean isKernel, List<String> contexts,
364 IProgressMonitor monitor) throws ExecutionException;
365
366 /**
367 * Executes calibrate command to quantify LTTng overhead.
368 *
369 * @param isKernel
370 * - a flag for indicating kernel or UST.
371 * @param monitor
372 * - a progress monitor
373 * @throws ExecutionException
374 * If the command fails
375 */
376 public void calibrate(boolean isKernel, IProgressMonitor monitor)
377 throws ExecutionException;
378 }
This page took 0.043592 seconds and 6 git commands to generate.