1 /**********************************************************************
2 * Copyright (c) 2012, 2013 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 **********************************************************************/
12 package org
.eclipse
.linuxtools
.internal
.lttng2
.control
.stubs
.dialogs
;
14 import org
.eclipse
.linuxtools
.internal
.lttng2
.control
.core
.model
.IChannelInfo
;
15 import org
.eclipse
.linuxtools
.internal
.lttng2
.control
.core
.model
.impl
.BufferType
;
16 import org
.eclipse
.linuxtools
.internal
.lttng2
.control
.core
.model
.impl
.ChannelInfo
;
17 import org
.eclipse
.linuxtools
.internal
.lttng2
.control
.ui
.views
.dialogs
.IEnableChannelDialog
;
18 import org
.eclipse
.linuxtools
.internal
.lttng2
.control
.ui
.views
.model
.impl
.TargetNodeComponent
;
19 import org
.eclipse
.linuxtools
.internal
.lttng2
.control
.ui
.views
.model
.impl
.TraceDomainComponent
;
22 * Create channel dialog stub implementation.
24 @SuppressWarnings("javadoc")
25 public class EnableChannelDialogStub
implements IEnableChannelDialog
{
27 // ------------------------------------------------------------------------
29 // ------------------------------------------------------------------------
30 private TraceDomainComponent fDomain
;
31 private ChannelInfo fChannelInfo
;
32 private boolean fIsKernel
;
34 // ------------------------------------------------------------------------
36 // ------------------------------------------------------------------------
37 public EnableChannelDialogStub() {
38 fChannelInfo
= new ChannelInfo("mychannel");
39 fChannelInfo
.setNumberOfSubBuffers(4);
40 fChannelInfo
.setOverwriteMode(true);
41 fChannelInfo
.setReadTimer(200);
42 fChannelInfo
.setSwitchTimer(100);
43 fChannelInfo
.setSubBufferSize(16384);
46 // ------------------------------------------------------------------------
48 // ------------------------------------------------------------------------
49 public void setIsKernel(boolean isKernel
) {
54 public IChannelInfo
getChannelInfo() {
59 public void setDomainComponent(TraceDomainComponent domain
) {
61 if (fDomain
!= null) {
62 fIsKernel
= fDomain
.isKernel();
72 public boolean isKernel() {
77 public void setHasKernel(boolean hasKernel
) {
81 public void setChannelInfo(ChannelInfo info
) {
86 public void setTargetNodeComponent(TargetNodeComponent node
) {
90 public void setBufferType (BufferType bufferType
) {
91 fChannelInfo
.setBufferType(bufferType
);