| 1 | /********************************************************************** |
| 2 | * Copyright (c) 2012, 2013 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 | * Bernd Hufmann - Updated for support of LTTng Tools 2.1 |
| 12 | **********************************************************************/ |
| 13 | package org.eclipse.linuxtools.internal.lttng2.core.control.model; |
| 14 | |
| 15 | import java.util.List; |
| 16 | |
| 17 | /** |
| 18 | * <p> |
| 19 | * Interface for retrieval of trace session information. |
| 20 | * </p> |
| 21 | * |
| 22 | * @author Bernd Hufmann |
| 23 | */ |
| 24 | public interface ISessionInfo extends ITraceInfo { |
| 25 | |
| 26 | /** |
| 27 | * @return the session state state (active or inactive). |
| 28 | */ |
| 29 | TraceSessionState getSessionState(); |
| 30 | /** |
| 31 | * Sets the session state to the given value. |
| 32 | * @param state - state to set. |
| 33 | */ |
| 34 | void setSessionState(TraceSessionState state); |
| 35 | |
| 36 | /** |
| 37 | * Sets the event state to the value specified by the given name. |
| 38 | * @param stateName - state to set. |
| 39 | */ |
| 40 | void setSessionState(String stateName); |
| 41 | |
| 42 | /** |
| 43 | * @return path string where session is located. |
| 44 | */ |
| 45 | String getSessionPath(); |
| 46 | |
| 47 | /** |
| 48 | * Sets the path string (where session is located) to the given value. |
| 49 | * @param path - session path to set. |
| 50 | */ |
| 51 | void setSessionPath(String path); |
| 52 | |
| 53 | /** |
| 54 | * @return all domain information as array. |
| 55 | */ |
| 56 | IDomainInfo[] getDomains(); |
| 57 | |
| 58 | /** |
| 59 | * Sets all domain information specified by given list. |
| 60 | * @param domains - all domain information to set. |
| 61 | */ |
| 62 | void setDomains(List<IDomainInfo> domains); |
| 63 | |
| 64 | /** |
| 65 | * Adds a single domain information. |
| 66 | * @param domainInfo domain information to add. |
| 67 | */ |
| 68 | void addDomain(IDomainInfo domainInfo); |
| 69 | |
| 70 | /** |
| 71 | * Returns if session is streamed over network |
| 72 | * @return <code>true</code> if streamed over network else <code>false</code> |
| 73 | */ |
| 74 | boolean isStreamedTrace(); |
| 75 | |
| 76 | /** |
| 77 | * Sets whether the trace is streamed or not |
| 78 | * @param isStreamedTrace <code>true</code> if streamed over network else <code>false</code> |
| 79 | */ |
| 80 | void setStreamedTrace(boolean isStreamedTrace); |
| 81 | |
| 82 | /** |
| 83 | * Returns whether the session is snapshot session or not |
| 84 | * @return <code>true</code> if it is snapshot session else <code>false</code> |
| 85 | */ |
| 86 | boolean isSnapshotSession(); |
| 87 | |
| 88 | /** |
| 89 | * Gets the snapshot information the session or null if it is not a |
| 90 | * snapshot session. |
| 91 | * @return snapshot information |
| 92 | */ |
| 93 | ISnapshotInfo getSnapshotInfo(); |
| 94 | |
| 95 | /** |
| 96 | * Sets the snapshot information of the session |
| 97 | * @param setSnapshotInfo - the snapshot data to set. |
| 98 | */ |
| 99 | void setSnapshotInfo(ISnapshotInfo setSnapshotInfo); |
| 100 | } |