Commit | Line | Data |
---|---|---|
eb1bab5b BH |
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 | **********************************************************************/ | |
115b4a01 | 12 | package org.eclipse.linuxtools.internal.lttng2.ui.views.control.service; |
eb1bab5b BH |
13 | |
14 | import java.util.List; | |
15 | ||
16 | import org.eclipse.core.commands.ExecutionException; | |
17 | import org.eclipse.core.runtime.IProgressMonitor; | |
115b4a01 BH |
18 | import org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.IBaseEventInfo; |
19 | import org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.IChannelInfo; | |
20 | import org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.ISessionInfo; | |
21 | import org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.IUstProviderInfo; | |
22 | import org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.LogLevelType; | |
23 | import org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.TraceLogLevel; | |
eb1bab5b BH |
24 | |
25 | ||
26 | /** <b><u>ILttngControlService</u></b> | |
27 | * <p> | |
28 | * Interface for LTTng trace control command service. | |
29 | * </p> | |
30 | */ | |
31 | public interface ILttngControlService { | |
eb1bab5b BH |
32 | /** |
33 | * Retrieves the existing sessions names from the node. | |
34 | * @param monitor - a progress monitor | |
35 | * @return an array with session names. | |
36 | * @throws ExecutionException | |
37 | */ | |
38 | public String[] getSessionNames(IProgressMonitor monitor) throws ExecutionException; | |
39 | ||
eb1bab5b BH |
40 | /** |
41 | * Retrieves the session information with the given name the node. | |
42 | * @param sessionName - the session name | |
43 | * @param monitor - a progress monitor | |
44 | * @return session information | |
45 | * @throws ExecutionException | |
46 | */ | |
47 | public ISessionInfo getSession(String sessionName, IProgressMonitor monitor) throws ExecutionException; | |
48 | ||
eb1bab5b BH |
49 | /** |
50 | * Retrieves the kernel provider information (i.e. the kernel events) | |
51 | * @param monitor - a progress monitor | |
52 | * @return the list of existing kernel events. | |
53 | * @throws ExecutionException | |
54 | */ | |
55 | public List<IBaseEventInfo> getKernelProvider(IProgressMonitor monitor) throws ExecutionException; | |
56 | ||
57 | /** | |
58 | * Retrieves the UST provider information from the node. | |
59 | * @return - the UST provider information. | |
60 | * @throws ExecutionException | |
61 | */ | |
62 | public List<IUstProviderInfo> getUstProvider() throws ExecutionException; | |
63 | /** | |
64 | * Retrieves the UST provider information from the node. | |
65 | * @param monitor - a progress monitor | |
bbb3538a | 66 | * @return the UST provider information. |
eb1bab5b BH |
67 | * @throws ExecutionException |
68 | */ | |
69 | public List<IUstProviderInfo> getUstProvider(IProgressMonitor monitor) throws ExecutionException; | |
bbb3538a BH |
70 | |
71 | /** | |
72 | * Creates a session with given session name and location. | |
73 | * @param sessionName - a session name to create | |
74 | * @param sessionPath - a path for storing the traces (use null for default) | |
75 | * @param monitor - a progress monitor | |
76 | * @return the session information | |
77 | * @throws ExecutionException | |
78 | */ | |
79 | public ISessionInfo createSession(String sessionName, String sessionPath, IProgressMonitor monitor) throws ExecutionException; | |
80 | ||
81 | /** | |
82 | * Destroys a session with given session name. | |
83 | * @param sessionName - a session name to destroy | |
84 | * @param monitor - a progress monitor | |
85 | * @throws ExecutionException | |
86 | */ | |
87 | public void destroySession(String sessionName, IProgressMonitor monitor) throws ExecutionException; | |
88 | ||
89 | /** | |
90 | * Starts a session with given session name. | |
91 | * @param sessionName - a session name to start | |
92 | * @param monitor - a progress monitor | |
93 | * @throws ExecutionException | |
94 | */ | |
95 | public void startSession(String sessionName, IProgressMonitor monitor) throws ExecutionException; | |
96 | ||
97 | /** | |
98 | * Stops a session with given session name. | |
99 | * @param sessionName - a session name to stop | |
100 | * @param monitor - a progress monitor | |
101 | * @throws ExecutionException | |
102 | */ | |
103 | public void stopSession(String sessionName, IProgressMonitor monitor) throws ExecutionException; | |
104 | ||
105 | ||
106 | /** | |
107 | * Enables a list of channels for given session and given channel information (configuration). | |
108 | * @param sessionName - a session name to create | |
d132bcc7 | 109 | * @param channelNames - a list of channel names to be enabled |
bbb3538a BH |
110 | * @param isKernel - a flag to indicate Kernel or UST (true for Kernel, false for UST) |
111 | * @param info - channel information used for creation of a channel (or null for default) | |
112 | * @param monitor - a progress monitor | |
113 | * @throws ExecutionException | |
114 | */ | |
498704b3 | 115 | public void enableChannels(String sessionName, List<String> channelNames, boolean isKernel, IChannelInfo info, IProgressMonitor monitor) throws ExecutionException; |
bbb3538a BH |
116 | |
117 | /** | |
118 | * Disables a list of channels for given session and given channel information (configuration). | |
119 | * @param sessionName - a session name to create | |
d132bcc7 | 120 | * @param channelNames - a list of channel names to be enabled |
bbb3538a BH |
121 | * @param isKernel - a flag to indicate Kernel or UST (true for Kernel, false for UST) |
122 | * @param monitor - a progress monitor | |
123 | * @throws ExecutionException | |
124 | */ | |
498704b3 | 125 | public void disableChannels(String sessionName, List<String> channelNames, boolean isKernel, IProgressMonitor monitor) throws ExecutionException; |
6503ae0f BH |
126 | |
127 | /** | |
128 | * Enables a list of events with no additional parameters. | |
129 | * @param sessionName - a session name | |
d132bcc7 BH |
130 | * @param channelName - a channel name or null for default channel |
131 | * @param eventNames - a list of event names to be enabled, or null (list of size = 0)for all events . | |
6503ae0f BH |
132 | * @param isKernel - a flag for indicating kernel or UST. |
133 | * @param monitor - a progress monitor | |
134 | * @throws ExecutionException | |
135 | */ | |
498704b3 BH |
136 | public void enableEvents(String sessionName, String channelName, List<String> eventNames, boolean isKernel, IProgressMonitor monitor) throws ExecutionException; |
137 | ||
138 | /** | |
139 | * Enables all syscall events. | |
140 | * @param sessionName - a session name | |
d132bcc7 | 141 | * @param channelName - a channel name or null for default channel |
498704b3 BH |
142 | * @param monitor - a progress monitor |
143 | * @throws ExecutionException | |
144 | */ | |
145 | public void enableSyscalls(String sessionName, String channelName, IProgressMonitor monitor) throws ExecutionException; | |
146 | ||
147 | /** | |
d132bcc7 | 148 | * Enables a dynamic probe or dynamic function entry/return probe. |
498704b3 | 149 | * @param sessionName - a session name |
d132bcc7 | 150 | * @param channelName - a channel name or null for default channel |
498704b3 | 151 | * @param eventName - a event name |
d132bcc7 | 152 | * @param isFunction - true for dynamic function entry/return probe else false |
ccc66d01 BH |
153 | * @param probe - a dynamic probe information |
154 | * @param monitor - a progress monitor | |
498704b3 BH |
155 | * @throws ExecutionException |
156 | */ | |
d132bcc7 | 157 | public void enableProbe(String sessionName, String channelName, String eventName, boolean isFunction, String probe, IProgressMonitor monitor) throws ExecutionException; |
498704b3 | 158 | |
ccc66d01 BH |
159 | /** |
160 | * Enables events using log level | |
161 | * @param sessionName - a session name | |
162 | * @param channelName - a channel name (null for default channel) | |
163 | * @param eventName - a event name | |
164 | * @param logLevelType - a log level type | |
165 | * @param level - a log level | |
166 | * @param monitor - a progress monitor | |
167 | * @throws ExecutionException | |
168 | */ | |
169 | public void enableLogLevel(String sessionName, String channelName, String eventName, LogLevelType logLevelType, TraceLogLevel level, IProgressMonitor monitor) throws ExecutionException; | |
170 | ||
6503ae0f BH |
171 | /** |
172 | * Disables a list of events with no additional parameters. | |
173 | * @param sessionName - a session name | |
174 | * @param channelName - a channel name (null for default channel) | |
175 | * @param eventNames - a list of event names to enabled. | |
176 | * @param isKernel - a flag for indicating kernel or UST. | |
177 | * @param monitor - a progress monitor | |
178 | * @throws ExecutionException | |
179 | */ | |
180 | public void disableEvent(String sessionName, String channelName, List<String> eventNames, boolean isKernel, IProgressMonitor monitor) throws ExecutionException; | |
b793fbe1 BH |
181 | |
182 | /** | |
183 | * Gets all available context names to be added to channels/events. | |
184 | * @param monitor | |
185 | * @return the list of available contexts | |
186 | */ | |
187 | public List<String> getContextList(IProgressMonitor monitor) throws ExecutionException; | |
188 | ||
189 | /** | |
190 | * Add contexts to given channels and or events | |
191 | * @param sessionName - a session name | |
192 | * @param channelName - a channel name (null for all channels) | |
193 | * @param eventName - a event name (null for all events) | |
194 | * @param isKernel - a flag for indicating kernel or UST. | |
195 | * @param contexts - a list of name of contexts to add | |
196 | * @param monitor - a progress monitor | |
197 | * @throws ExecutionException | |
198 | */ | |
199 | public void addContexts(String sessionName, String channelName, String eventName, boolean isKernel, List<String> contexts, IProgressMonitor monitor) throws ExecutionException; | |
6503ae0f | 200 | |
eb1bab5b | 201 | } |