1 /*******************************************************************************
2 * Copyright (c) 2011 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 * Polytechnique Montréal - Initial API and implementation
11 * Bernd Hufmann - Productification, enhancements and fixes
13 *******************************************************************************/
14 package org
.eclipse
.linuxtools
.lttng
.tracecontrol
.model
.config
;
16 import org
.eclipse
.core
.resources
.IProject
;
20 * <b><u>TraceChannel</u></b>
22 * This models a trace representing a trace resource for a particular remote system.
25 public class TraceConfig
{
27 // ------------------------------------------------------------------------
29 // ------------------------------------------------------------------------
30 public static final int NORMAL_MODE
= 0;
31 public static final int FLIGHT_RECORDER_MODE
= 1;
33 public static final String InvalidTracePath
= "network"; //$NON-NLS-1$
35 // ------------------------------------------------------------------------
37 // ------------------------------------------------------------------------
39 private String fTraceName
= null;
40 private String fTraceTransport
= null;
41 private String fTracePath
= null;
42 private boolean fIsNetworkTrace
= false;
43 private boolean fIsAppend
= false;
44 private int fMode
= 0;
45 private int fNumChannel
= 0;
46 private TraceChannels fChannels
= null;
47 private IProject fProject
= null;
49 // ------------------------------------------------------------------------
51 // ------------------------------------------------------------------------
52 public TraceConfig() {
55 // ------------------------------------------------------------------------
57 // ------------------------------------------------------------------------
60 * Gets the number of threads
62 * @return number of threads
64 public int getNumChannel() {
69 * Sets the number of threads (channels)
72 public void setNumChannel(int numChannel
) {
73 fNumChannel
= numChannel
;
77 * Gets the trace name.
81 public String
getTraceName() {
86 * Sets the trace name.
90 public void setTraceName(String traceName
) {
91 fTraceName
= traceName
;
95 * Gets the trace transport.
97 * @return trace transport
99 public String
getTraceTransport() {
100 return fTraceTransport
;
104 * Sets the trace transport.
106 * @param traceTransport
108 public void setTraceTransport(String traceTransport
) {
109 fTraceTransport
= traceTransport
;
113 * Returns wether trace is a network trace (i.e. trace will be stored
114 * on local host where client resides) or a local trace (i.e. trace will
115 * be stored on same machine where the actual trace is collected)
117 * @return isNetworktrace
119 public boolean isNetworkTrace() {
120 return fIsNetworkTrace
;
124 * Sets whether trace is a network trace (i.e. trace will be stored
125 * on local host where client resides) or a local trace (i.e. trace will
126 * be stored on same machine where the actual trace is collected)
128 * @param isNetworkTrace
130 public void setNetworkTrace(boolean isNetworkTrace
) {
131 fIsNetworkTrace
= isNetworkTrace
;
135 * Returns whether trace should append an existing trace or not.
137 * @return true if append else false
139 public boolean getIsAppend() {
144 * Sets whether trace should append an existing trace or not.
148 public void setIsAppend(boolean isAppend
) {
149 fIsAppend
= isAppend
;
153 * Gets the trace mode.
157 public int getMode() {
162 * Sets the trace mode.
166 public void setMode(int mode
) {
171 * Gets the path where trace will be stored.
175 public String
getTracePath() {
180 * Sets the path where trace will be stored.
184 public void setTracePath(String path
) {
189 * Gets the trace channels collection.
191 * @return trace channels
193 public TraceChannels
getTraceChannels() {
198 * Sets the trace channels collection.
202 public void setTraceChannels(TraceChannels channels
) {
203 fChannels
= channels
;
207 * Sets the trace channels collection with given names
208 * and creates default trace channels.
212 public void setTraceChannels(String
[] channels
) {
213 fChannels
= new TraceChannels();
214 fChannels
.putAll(channels
);
218 * Gets the trace project.
222 public IProject
getProject() {
227 * Sets the trace project.
231 public void setProject(IProject project
) {
This page took 0.039173 seconds and 5 git commands to generate.