1 /*******************************************************************************
2 * Copyright (c) 2014 Wind River Systems, Inc. and others
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
10 * Markus Schorn - Initial API and implementation
11 *******************************************************************************/
13 package org
.eclipse
.tracecompass
.internal
.lttng2
.control
.ui
.views
.model
.impl
;
15 import java
.util
.Collections
;
16 import java
.util
.List
;
18 import org
.eclipse
.core
.commands
.ExecutionException
;
19 import org
.eclipse
.core
.runtime
.IProgressMonitor
;
20 import org
.eclipse
.tracecompass
.internal
.lttng2
.control
.core
.model
.IBaseEventInfo
;
21 import org
.eclipse
.tracecompass
.internal
.lttng2
.control
.core
.model
.IChannelInfo
;
22 import org
.eclipse
.tracecompass
.internal
.lttng2
.control
.core
.model
.ISessionInfo
;
23 import org
.eclipse
.tracecompass
.internal
.lttng2
.control
.core
.model
.ISnapshotInfo
;
24 import org
.eclipse
.tracecompass
.internal
.lttng2
.control
.core
.model
.IUstProviderInfo
;
25 import org
.eclipse
.tracecompass
.internal
.lttng2
.control
.core
.model
.LogLevelType
;
26 import org
.eclipse
.tracecompass
.internal
.lttng2
.control
.core
.model
.TraceLogLevel
;
27 import org
.eclipse
.tracecompass
.internal
.lttng2
.control
.ui
.views
.service
.ILttngControlService
;
28 import org
.eclipse
.tracecompass
.internal
.lttng2
.control
.ui
.views
.service
.LttngVersion
;
29 import org
.osgi
.framework
.Version
;
31 class NullControlService
implements ILttngControlService
{
34 public LttngVersion
getVersion() {
35 return new LttngVersion(Version
.emptyVersion
.toString());
39 public String
getVersionString() {
40 return Version
.emptyVersion
.toString();
44 public boolean isVersionSupported(String version
) {
49 public List
<String
> getSessionNames(IProgressMonitor monitor
) throws ExecutionException
{
50 return Collections
.emptyList();
54 public ISessionInfo
getSession(String sessionName
, IProgressMonitor monitor
) throws ExecutionException
{
59 public ISnapshotInfo
getSnapshotInfo(String sessionName
, IProgressMonitor monitor
) throws ExecutionException
{
64 public List
<IBaseEventInfo
> getKernelProvider(IProgressMonitor monitor
) throws ExecutionException
{
65 return Collections
.emptyList();
69 public List
<IUstProviderInfo
> getUstProvider() throws ExecutionException
{
70 return Collections
.emptyList();
74 public List
<IUstProviderInfo
> getUstProvider(IProgressMonitor monitor
) throws ExecutionException
{
75 return Collections
.emptyList();
79 public ISessionInfo
createSession(ISessionInfo sessionInfo
, IProgressMonitor monitor
) throws ExecutionException
{
84 public void destroySession(String sessionName
, IProgressMonitor monitor
) throws ExecutionException
{
88 public void startSession(String sessionName
, IProgressMonitor monitor
) throws ExecutionException
{
92 public void stopSession(String sessionName
, IProgressMonitor monitor
) throws ExecutionException
{
96 public void enableChannels(String sessionName
, List
<String
> channelNames
, boolean isKernel
, IChannelInfo info
, IProgressMonitor monitor
) throws ExecutionException
{
100 public void disableChannels(String sessionName
, List
<String
> channelNames
, boolean isKernel
, IProgressMonitor monitor
) throws ExecutionException
{
104 public void enableEvents(String sessionName
, String channelName
, List
<String
> eventNames
, boolean isKernel
, String filterExpression
, IProgressMonitor monitor
) throws ExecutionException
{
108 public void enableSyscalls(String sessionName
, String channelName
, IProgressMonitor monitor
) throws ExecutionException
{
112 public void enableProbe(String sessionName
, String channelName
, String eventName
, boolean isFunction
, String probe
, IProgressMonitor monitor
) throws ExecutionException
{
116 public void enableLogLevel(String sessionName
, String channelName
, String eventName
, LogLevelType logLevelType
, TraceLogLevel level
, String filterExpression
, IProgressMonitor monitor
) throws ExecutionException
{
120 public void disableEvent(String sessionName
, String channelName
, List
<String
> eventNames
, boolean isKernel
, IProgressMonitor monitor
) throws ExecutionException
{
124 public List
<String
> getContextList(IProgressMonitor monitor
) throws ExecutionException
{
125 return Collections
.emptyList();
129 public void addContexts(String sessionName
, String channelName
, String eventName
, boolean isKernel
, List
<String
> contexts
, IProgressMonitor monitor
) throws ExecutionException
{
133 public void calibrate(boolean isKernel
, IProgressMonitor monitor
) throws ExecutionException
{
137 public void recordSnapshot(String sessionName
, IProgressMonitor monitor
) throws ExecutionException
{
141 public void runCommands(IProgressMonitor monitor
, List
<String
> commands
) throws ExecutionException
{