1 /**********************************************************************
2 * Copyright (c) 2012, 2013 Ericsson
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 * Bernd Hufmann - Initial API and implementation
11 * Bernd Hufmann - Updated for support of LTTng Tools 2.1
12 * Marc-Andre Laperle - Support for creating a live session
13 **********************************************************************/
14 package org
.eclipse
.linuxtools
.internal
.lttng2
.control
.core
.model
;
16 import java
.util
.List
;
20 * Interface for retrieval of trace session information.
23 * @author Bernd Hufmann
25 public interface ISessionInfo
extends ITraceInfo
{
28 * @return the session state state (active or inactive).
30 TraceSessionState
getSessionState();
32 * Sets the session state to the given value.
33 * @param state - state to set.
35 void setSessionState(TraceSessionState state
);
38 * Sets the event state to the value specified by the given name.
39 * @param stateName - state to set.
41 void setSessionState(String stateName
);
44 * @return path string where session is located.
46 String
getSessionPath();
49 * Sets the path string (where session is located) to the given value.
50 * @param path - session path to set.
52 void setSessionPath(String path
);
55 * @return all domain information as array.
57 IDomainInfo
[] getDomains();
60 * Sets all domain information specified by given list.
61 * @param domains - all domain information to set.
63 void setDomains(List
<IDomainInfo
> domains
);
66 * Adds a single domain information.
67 * @param domainInfo domain information to add.
69 void addDomain(IDomainInfo domainInfo
);
72 * Returns if session is streamed over network
73 * @return <code>true</code> if streamed over network else <code>false</code>
75 boolean isStreamedTrace();
78 * Sets whether the trace is streamed or not
79 * @param isStreamedTrace <code>true</code> if streamed over network else <code>false</code>
81 void setStreamedTrace(boolean isStreamedTrace
);
84 * Returns whether the session is snapshot session or not
85 * @return <code>true</code> if it is snapshot session else <code>false</code>
87 boolean isSnapshotSession();
90 * Set whether or not the session should be in snapshot mode
93 * true for snapshot mode, false otherwise
95 void setSnapshot(boolean isSnapshot
);
98 * Gets the snapshot information the session or null if it is not a
100 * @return snapshot information
102 ISnapshotInfo
getSnapshotInfo();
105 * Sets the snapshot information of the session
106 * @param setSnapshotInfo - the snapshot data to set.
108 void setSnapshotInfo(ISnapshotInfo setSnapshotInfo
);
111 * Get whether or not the session should be in Live mode
113 * @return <code>true</code> if is a live session else <code>false</code>
115 public boolean isLive();
118 * Set whether or not the session should be in Live mode
121 * true for Live mode, false otherwise
123 public void setLive(boolean isLive
);
126 * Get the live delay which is the delay in micro seconds before the data is
127 * flushed and streamed.
129 * @return the live delay or -1 if the default value should be used
131 public int getLiveDelay();
134 * Set the live delay which is the delay in micro seconds before the data is
135 * flushed and streamed.
140 public void setLiveDelay(int liveDelay
);
143 * Get the network URL in case control and data is configured together
144 * otherwise null If it returns a non-null value, getControlUrl() and
145 * getDataUrl() have to return null.
147 * @return The network URL or null.
149 String
getNetworkUrl();
152 * Set the network URL
157 void setNetworkUrl(String networkUrl
);
160 * Get the control URL in case control and data is configured separately. If
161 * it returns a non-null value, getDataUrl() has to return a valid value too
162 * and getNetworkUrl() has to return null.
164 * @return The control URL or null.
166 String
getControlUrl();
169 * Set the control URL
174 void setControlUrl(String controlUrl
);
177 * Get the data URL in case control and data is configured separately. If it
178 * returns a non-null value, getControlUrl() has to return a valid value too
179 * and getNetworkUrl() has to return null.
181 * @return The data URL or null.
191 void setDataUrl(String datalUrl
);
196 * @return the live URL
206 void setLiveUrl(String liveUrl
);
211 * @return the live port
213 Integer
getLivePort();
221 void setLivePort(Integer livePort
);