1 /*******************************************************************************
2 * Copyright (c) 2009 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 * Alvaro Sanchez-Leon (alvsan09@gmail.com) - Initial API and implementation
11 *******************************************************************************/
12 package org
.eclipse
.linuxtools
.lttng
.state
.model
;
14 import org
.eclipse
.linuxtools
.lttng
.state
.LttngStateException
;
15 import org
.eclipse
.linuxtools
.lttng
.state
.resource
.ILttngStateContext
;
18 * Entry point to the package
23 public class StateModelFactory
{
25 // ========================================================================
27 // =======================================================================
30 * Return an instance of the entry class, the entry class contains
31 * references to the internal model elements.
33 * One instance is expected to be created per LttngTrace.
35 * This method shall be used when a trace is not opened yet and will be
36 * initialized later via the init() method.
40 public static LttngTraceState
getStateEntryInstance() {
41 return new LttngTraceState();
45 * Provide a LttngTraceState when the input data reference is known e.g.
46 * when exchanging the State provider to check point clone.
50 public static LttngTraceState
getStateEntryInstance(
51 ILttngStateContext stateInputRef
) {
52 LttngTraceState traceState
= new LttngTraceState();
54 traceState
.init(stateInputRef
);
55 } catch (LttngStateException e
) {