1 /*******************************************************************************
2 * Copyright (c) 2014, 2015 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 * Bernd Hufmann - Update for null safety
12 *******************************************************************************/
14 package org
.eclipse
.tracecompass
.internal
.lttng2
.control
.ui
.views
.model
.impl
;
16 import static org
.eclipse
.tracecompass
.common
.core
.NonNullUtils
.checkNotNull
;
18 import java
.util
.Collections
;
19 import java
.util
.List
;
21 import org
.eclipse
.core
.commands
.ExecutionException
;
22 import org
.eclipse
.core
.runtime
.IProgressMonitor
;
23 import org
.eclipse
.jdt
.annotation
.Nullable
;
24 import org
.eclipse
.tracecompass
.internal
.lttng2
.control
.core
.model
.TraceDomainType
;
25 import org
.eclipse
.tracecompass
.internal
.lttng2
.control
.core
.model
.IBaseEventInfo
;
26 import org
.eclipse
.tracecompass
.internal
.lttng2
.control
.core
.model
.IChannelInfo
;
27 import org
.eclipse
.tracecompass
.internal
.lttng2
.control
.core
.model
.ISessionInfo
;
28 import org
.eclipse
.tracecompass
.internal
.lttng2
.control
.core
.model
.ISnapshotInfo
;
29 import org
.eclipse
.tracecompass
.internal
.lttng2
.control
.core
.model
.ITraceLogLevel
;
30 import org
.eclipse
.tracecompass
.internal
.lttng2
.control
.core
.model
.IUstProviderInfo
;
31 import org
.eclipse
.tracecompass
.internal
.lttng2
.control
.core
.model
.LogLevelType
;
32 import org
.eclipse
.tracecompass
.internal
.lttng2
.control
.ui
.views
.service
.ILttngControlService
;
33 import org
.eclipse
.tracecompass
.internal
.lttng2
.control
.ui
.views
.service
.LttngVersion
;
35 class NullControlService
implements ILttngControlService
{
38 public LttngVersion
getVersion() {
39 return LttngVersion
.NULL_VERSION
;
43 public String
getVersionString() {
44 return checkNotNull(LttngVersion
.NULL_VERSION
.toString());
48 public boolean isVersionSupported(String version
) {
53 public List
<String
> getSessionNames(IProgressMonitor monitor
) throws ExecutionException
{
54 return Collections
.EMPTY_LIST
;
58 public ISessionInfo
getSession(String sessionName
, IProgressMonitor monitor
) throws ExecutionException
{
63 public ISnapshotInfo
getSnapshotInfo(String sessionName
, IProgressMonitor monitor
) throws ExecutionException
{
68 public List
<IBaseEventInfo
> getKernelProvider(IProgressMonitor monitor
) throws ExecutionException
{
69 return Collections
.EMPTY_LIST
;
73 public List
<IUstProviderInfo
> getUstProvider() throws ExecutionException
{
74 return Collections
.EMPTY_LIST
;
78 public List
<IUstProviderInfo
> getUstProvider(IProgressMonitor monitor
) throws ExecutionException
{
79 return Collections
.EMPTY_LIST
;
83 public ISessionInfo
createSession(ISessionInfo sessionInfo
, IProgressMonitor monitor
) throws ExecutionException
{
88 public void destroySession(String sessionName
, IProgressMonitor monitor
) throws ExecutionException
{
92 public void startSession(String sessionName
, IProgressMonitor monitor
) throws ExecutionException
{
96 public void stopSession(String sessionName
, IProgressMonitor monitor
) throws ExecutionException
{
100 public void enableChannels(String sessionName
, List
<String
> channelNames
, TraceDomainType domain
, IChannelInfo info
, IProgressMonitor monitor
) throws ExecutionException
{
104 public void disableChannels(String sessionName
, List
<String
> channelNames
, TraceDomainType domain
, IProgressMonitor monitor
) throws ExecutionException
{
108 public void enableEvents(String sessionName
, String channelName
, List
<String
> eventNames
, TraceDomainType domain
, String filterExpression
, List
<String
> excludedEvents
, IProgressMonitor monitor
) throws ExecutionException
{
112 public void enableSyscalls(String sessionName
, String channelName
, List
<String
> eventNames
, IProgressMonitor monitor
) throws ExecutionException
{
116 public void enableProbe(String sessionName
, String channelName
, String eventName
, boolean isFunction
, String probe
, IProgressMonitor monitor
) throws ExecutionException
{
120 public void enableLogLevel(String sessionName
, String channelName
, List
<String
> eventName
, LogLevelType logLevelType
, ITraceLogLevel level
, String filterExpression
, TraceDomainType domain
, IProgressMonitor monitor
) throws ExecutionException
{
124 public void disableEvent(String sessionName
, String channelName
, List
<String
> eventNames
, TraceDomainType domain
, IProgressMonitor monitor
) throws ExecutionException
{
128 public List
<String
> getContextList(IProgressMonitor monitor
) throws ExecutionException
{
129 return Collections
.EMPTY_LIST
;
133 public void addContexts(String sessionName
, String channelName
, String eventName
, TraceDomainType domain
, List
<String
> contexts
, 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
{
145 public void loadSession(@Nullable String inputPath
, boolean isForce
, IProgressMonitor monitor
) throws ExecutionException
{
149 public void saveSession(String session
, String outputPath
, boolean isForce
, IProgressMonitor monitor
) throws ExecutionException
{