1 /**********************************************************************
2 * Copyright (c) 2012, 2014 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 * Jonathan Rajotte - machine interface support and utility function
12 *********************************************************************/
14 package org
.eclipse
.linuxtools
.internal
.lttng2
.control
.core
.model
;
17 * Session state enumeration.
19 * @author Bernd Hufmann
21 public enum TraceSessionState
{
23 // ------------------------------------------------------------------------
25 // ------------------------------------------------------------------------
26 /** Trace session inactive */
27 INACTIVE("inactive", "false"), //$NON-NLS-1$ //$NON-NLS-2$
28 /** Trace session active */
29 ACTIVE("active", "true"); //$NON-NLS-1$ //$NON-NLS-2$
31 // ------------------------------------------------------------------------
33 // ------------------------------------------------------------------------
37 private final String fInName
;
38 private final String fMiName
;
40 // ------------------------------------------------------------------------
42 // ------------------------------------------------------------------------
50 private TraceSessionState(String name
, String miName
) {
55 // ------------------------------------------------------------------------
57 // ------------------------------------------------------------------------
61 public String
getInName() {
66 * @return the machine interface name
68 public String
getfMiName() {
72 // ------------------------------------------------------------------------
74 // ------------------------------------------------------------------------
76 * Return the corresponding {@link TraceSessionState} to String "name"
79 * String to compare to retrieve the good
80 * {@link TraceSessionState}
81 * @return the corresponding {@link TraceSessionState}
83 public static TraceSessionState
valueOfString(String name
) {
87 for (TraceSessionState tst
: TraceSessionState
.values()) {
88 boolean isEqual
= tst
.fInName
.equalsIgnoreCase(name
) || tst
.fMiName
.equalsIgnoreCase(name
);
This page took 0.031565 seconds and 5 git commands to generate.