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
.IBaseEventInfo
;
25 import org
.eclipse
.tracecompass
.internal
.lttng2
.control
.core
.model
.IChannelInfo
;
26 import org
.eclipse
.tracecompass
.internal
.lttng2
.control
.core
.model
.ISessionInfo
;
27 import org
.eclipse
.tracecompass
.internal
.lttng2
.control
.core
.model
.ISnapshotInfo
;
28 import org
.eclipse
.tracecompass
.internal
.lttng2
.control
.core
.model
.IUstProviderInfo
;
29 import org
.eclipse
.tracecompass
.internal
.lttng2
.control
.core
.model
.LogLevelType
;
30 import org
.eclipse
.tracecompass
.internal
.lttng2
.control
.core
.model
.TraceLogLevel
;
31 import org
.eclipse
.tracecompass
.internal
.lttng2
.control
.ui
.views
.service
.ILttngControlService
;
32 import org
.eclipse
.tracecompass
.internal
.lttng2
.control
.ui
.views
.service
.LttngVersion
;
34 class NullControlService
implements ILttngControlService
{
37 public LttngVersion
getVersion() {
38 return LttngVersion
.NULL_VERSION
;
42 public String
getVersionString() {
43 return checkNotNull(LttngVersion
.NULL_VERSION
.toString());
47 public boolean isVersionSupported(String version
) {
52 public List
<String
> getSessionNames(IProgressMonitor monitor
) throws ExecutionException
{
53 return Collections
.EMPTY_LIST
;
57 public ISessionInfo
getSession(String sessionName
, IProgressMonitor monitor
) throws ExecutionException
{
62 public ISnapshotInfo
getSnapshotInfo(String sessionName
, IProgressMonitor monitor
) throws ExecutionException
{
67 public List
<IBaseEventInfo
> getKernelProvider(IProgressMonitor monitor
) throws ExecutionException
{
68 return Collections
.EMPTY_LIST
;
72 public List
<IUstProviderInfo
> getUstProvider() throws ExecutionException
{
73 return Collections
.EMPTY_LIST
;
77 public List
<IUstProviderInfo
> getUstProvider(IProgressMonitor monitor
) throws ExecutionException
{
78 return Collections
.EMPTY_LIST
;
82 public ISessionInfo
createSession(ISessionInfo sessionInfo
, IProgressMonitor monitor
) throws ExecutionException
{
87 public void destroySession(String sessionName
, IProgressMonitor monitor
) throws ExecutionException
{
91 public void startSession(String sessionName
, IProgressMonitor monitor
) throws ExecutionException
{
95 public void stopSession(String sessionName
, IProgressMonitor monitor
) throws ExecutionException
{
99 public void enableChannels(String sessionName
, List
<String
> channelNames
, boolean isKernel
, IChannelInfo info
, IProgressMonitor monitor
) throws ExecutionException
{
103 public void disableChannels(String sessionName
, List
<String
> channelNames
, boolean isKernel
, IProgressMonitor monitor
) throws ExecutionException
{
107 public void enableEvents(String sessionName
, String channelName
, List
<String
> eventNames
, boolean isKernel
, String filterExpression
, IProgressMonitor monitor
) throws ExecutionException
{
111 public void enableSyscalls(String sessionName
, String channelName
, IProgressMonitor monitor
) throws ExecutionException
{
115 public void enableProbe(String sessionName
, String channelName
, String eventName
, boolean isFunction
, String probe
, IProgressMonitor monitor
) throws ExecutionException
{
119 public void enableLogLevel(String sessionName
, String channelName
, String eventName
, LogLevelType logLevelType
, TraceLogLevel level
, String filterExpression
, IProgressMonitor monitor
) throws ExecutionException
{
123 public void disableEvent(String sessionName
, String channelName
, List
<String
> eventNames
, boolean isKernel
, IProgressMonitor monitor
) throws ExecutionException
{
127 public List
<String
> getContextList(IProgressMonitor monitor
) throws ExecutionException
{
128 return Collections
.EMPTY_LIST
;
132 public void addContexts(String sessionName
, String channelName
, String eventName
, boolean isKernel
, List
<String
> contexts
, IProgressMonitor monitor
) throws ExecutionException
{
136 public void calibrate(boolean isKernel
, IProgressMonitor monitor
) throws ExecutionException
{
140 public void recordSnapshot(String sessionName
, IProgressMonitor monitor
) throws ExecutionException
{
144 public void runCommands(IProgressMonitor monitor
, List
<String
> commands
) throws ExecutionException
{
148 public void loadSession(@Nullable String inputPath
, boolean isForce
, IProgressMonitor monitor
) throws ExecutionException
{
152 public void saveSession(String session
, String outputPath
, boolean isForce
, IProgressMonitor monitor
) throws ExecutionException
{