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 * 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
.tracecompass
.internal
.lttng2
.control
.stubs
.dialogs
;
16 import org
.eclipse
.tracecompass
.internal
.lttng2
.control
.core
.model
.ISessionInfo
;
17 import org
.eclipse
.tracecompass
.internal
.lttng2
.control
.core
.model
.impl
.SessionInfo
;
18 import org
.eclipse
.tracecompass
.internal
.lttng2
.control
.ui
.views
.dialogs
.ICreateSessionDialog
;
19 import org
.eclipse
.tracecompass
.internal
.lttng2
.control
.ui
.views
.model
.impl
.TraceSessionGroup
;
22 * Create session dialog stub implementation.
24 @SuppressWarnings("javadoc")
25 public class CreateSessionDialogStub
implements ICreateSessionDialog
{
27 public String fName
= "mysession";
28 public String fPath
= null;
29 private boolean fIsStreamedTrace
= false;
30 private String fNetworkUrl
= null;
31 private String fControlUrl
= null;
32 private String fDataUrl
= null;
33 private boolean fIsSnapshot
;
34 private boolean fIsLive
= false;
35 private int fLiveDelay
= 0;
38 public void initialize(TraceSessionGroup group
) {
46 public void setSessionPath(String path
) {
50 public void setSessionName(String name
) {
54 public void setStreamedTrace(boolean isStreamedTrace
) {
55 fIsStreamedTrace
= isStreamedTrace
;
58 public void setNetworkUrl(String fNetworkUrl
) {
59 this.fNetworkUrl
= fNetworkUrl
;
62 public void setControlUrl(String fControlUrl
) {
63 this.fControlUrl
= fControlUrl
;
66 public void setDataUrl(String fDataUrl
) {
67 this.fDataUrl
= fDataUrl
;
70 public void setSnapshot(boolean isSnapshot
) {
71 fIsSnapshot
= isSnapshot
;
74 public void setLive(boolean isLive
) {
78 public void setLiveDelay(int liveDelay
) {
79 fLiveDelay
= liveDelay
;
83 public ISessionInfo
getParameters() {
84 ISessionInfo sessionInfo
= new SessionInfo(fName
);
86 if (fIsStreamedTrace
) {
87 sessionInfo
.setNetworkUrl(fNetworkUrl
);
88 sessionInfo
.setControlUrl(fControlUrl
);
89 sessionInfo
.setDataUrl(fDataUrl
);
90 sessionInfo
.setStreamedTrace(true);
91 } else if (fPath
!= null) {
92 sessionInfo
.setSessionPath(fPath
);
95 sessionInfo
.setLive(fIsLive
);
96 sessionInfo
.setLiveDelay(fLiveDelay
);
97 sessionInfo
.setSnapshot(fIsSnapshot
);
This page took 0.033529 seconds and 5 git commands to generate.