Merge branch 'master' into lttng_2_0_control_dev
[deliverable/tracecompass.git] / org.eclipse.linuxtools.lttng.ui / src / org / eclipse / linuxtools / lttng / 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.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;
19 import org.eclipse.linuxtools.lttng.ui.views.control.model.IChannelInfo;
20 import org.eclipse.linuxtools.lttng.ui.views.control.model.ISessionInfo;
21 import org.eclipse.linuxtools.lttng.ui.views.control.model.IUstProviderInfo;
22
23
24 /** <b><u>ILttngControlService</u></b>
25 * <p>
26 * Interface for LTTng trace control command service.
27 * </p>
28 */
29 public interface ILttngControlService {
30 /**
31 * Retrieves the existing sessions names from the node.
32 * @param monitor - a progress monitor
33 * @return an array with session names.
34 * @throws ExecutionException
35 */
36 public String[] getSessionNames(IProgressMonitor monitor) throws ExecutionException;
37
38 /**
39 * Retrieves the session information with the given name the node.
40 * @param sessionName - the session name
41 * @param monitor - a progress monitor
42 * @return session information
43 * @throws ExecutionException
44 */
45 public ISessionInfo getSession(String sessionName, IProgressMonitor monitor) throws ExecutionException;
46
47 /**
48 * Retrieves the kernel provider information (i.e. the kernel events)
49 * @param monitor - a progress monitor
50 * @return the list of existing kernel events.
51 * @throws ExecutionException
52 */
53 public List<IBaseEventInfo> getKernelProvider(IProgressMonitor monitor) throws ExecutionException;
54
55 /**
56 * Retrieves the UST provider information from the node.
57 * @return - the UST provider information.
58 * @throws ExecutionException
59 */
60 public List<IUstProviderInfo> getUstProvider() throws ExecutionException;
61 /**
62 * Retrieves the UST provider information from the node.
63 * @param monitor - a progress monitor
64 * @return the UST provider information.
65 * @throws ExecutionException
66 */
67 public List<IUstProviderInfo> getUstProvider(IProgressMonitor monitor) throws ExecutionException;
68
69 /**
70 * Creates a session with given session name and location.
71 * @param sessionName - a session name to create
72 * @param sessionPath - a path for storing the traces (use null for default)
73 * @param monitor - a progress monitor
74 * @return the session information
75 * @throws ExecutionException
76 */
77 public ISessionInfo createSession(String sessionName, String sessionPath, IProgressMonitor monitor) throws ExecutionException;
78
79 /**
80 * Destroys a session with given session name.
81 * @param sessionName - a session name to destroy
82 * @param monitor - a progress monitor
83 * @throws ExecutionException
84 */
85 public void destroySession(String sessionName, IProgressMonitor monitor) throws ExecutionException;
86
87 /**
88 * Starts a session with given session name.
89 * @param sessionName - a session name to start
90 * @param monitor - a progress monitor
91 * @throws ExecutionException
92 */
93 public void startSession(String sessionName, IProgressMonitor monitor) throws ExecutionException;
94
95 /**
96 * Stops a session with given session name.
97 * @param sessionName - a session name to stop
98 * @param monitor - a progress monitor
99 * @throws ExecutionException
100 */
101 public void stopSession(String sessionName, IProgressMonitor monitor) throws ExecutionException;
102
103
104 /**
105 * Enables a list of channels for given session and given channel information (configuration).
106 * @param sessionName - a session name to create
107 * @param channelNames - a list of channel names to enable
108 * @param isKernel - a flag to indicate Kernel or UST (true for Kernel, false for UST)
109 * @param info - channel information used for creation of a channel (or null for default)
110 * @param monitor - a progress monitor
111 * @throws ExecutionException
112 */
113 public void enableChannel(String sessionName, List<String> channelNames, boolean isKernel, IChannelInfo info, IProgressMonitor monitor) throws ExecutionException;
114
115 /**
116 * Disables a list of channels for given session and given channel information (configuration).
117 * @param sessionName - a session name to create
118 * @param channelNames - a list of channel names to enable
119 * @param isKernel - a flag to indicate Kernel or UST (true for Kernel, false for UST)
120 * @param monitor - a progress monitor
121 * @throws ExecutionException
122 */
123 public void disableChannel(String sessionName, List<String> channelNames, boolean isKernel, IProgressMonitor monitor) throws ExecutionException;
124
125 /**
126 * Enables a list of events with no additional parameters.
127 * @param sessionName - a session name
128 * @param channelName - a channel name (null for default channel)
129 * @param eventNames - a list of event names to enabled.
130 * @param isKernel - a flag for indicating kernel or UST.
131 * @param monitor - a progress monitor
132 * @throws ExecutionException
133 */
134 public void enableEvent(String sessionName, String channelName, List<String> eventNames, boolean isKernel, IProgressMonitor monitor) throws ExecutionException;
135
136 /**
137 * Disables a list of events with no additional parameters.
138 * @param sessionName - a session name
139 * @param channelName - a channel name (null for default channel)
140 * @param eventNames - a list of event names to enabled.
141 * @param isKernel - a flag for indicating kernel or UST.
142 * @param monitor - a progress monitor
143 * @throws ExecutionException
144 */
145 public void disableEvent(String sessionName, String channelName, List<String> eventNames, boolean isKernel, IProgressMonitor monitor) throws ExecutionException;
146
147 }
This page took 0.033651 seconds and 6 git commands to generate.