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
.internal
.lttng
.ui
.tracecontrol
.connectorservice
;
16 import org
.eclipse
.linuxtools
.internal
.lttng
.ui
.tracecontrol
.subsystems
.ITCFSubSystem
;
17 import org
.eclipse
.linuxtools
.internal
.lttng
.ui
.tracecontrol
.subsystems
.ITraceSubSystem
;
18 import org
.eclipse
.rse
.core
.subsystems
.AbstractConnectorServiceManager
;
19 import org
.eclipse
.rse
.core
.subsystems
.IConnectorService
;
20 import org
.eclipse
.rse
.core
.model
.IHost
;
21 import org
.eclipse
.rse
.core
.subsystems
.ISubSystem
;
24 * <b><u>TraceConnectorServiceManager</u></b>
26 * Implementation of the Trace Connector Service Manager class for the creation
27 * of the Trace Connector service.
30 public class TraceConnectorServiceManager
extends AbstractConnectorServiceManager
{
32 // ------------------------------------------------------------------------
34 // ------------------------------------------------------------------------
35 private static TraceConnectorServiceManager INSTANCE
= new TraceConnectorServiceManager();
37 public static final int TCF_PORT
= 1534;
39 // ------------------------------------------------------------------------
41 // ------------------------------------------------------------------------
43 * Return singleton instance
45 public static TraceConnectorServiceManager
getInstance() {
46 if (INSTANCE
== null) {
47 INSTANCE
= new TraceConnectorServiceManager();
53 // ------------------------------------------------------------------------
55 // ------------------------------------------------------------------------
58 * @see org.eclipse.rse.core.subsystems.AbstractConnectorServiceManager#createConnectorService(org.eclipse.rse.core.model.IHost)
61 public IConnectorService
createConnectorService(IHost host
) {
62 return new TraceConnectorService(host
, TCF_PORT
);
67 * @see org.eclipse.rse.core.subsystems.AbstractConnectorServiceManager#sharesSystem(org.eclipse.rse.core.subsystems.ISubSystem)
70 public boolean sharesSystem(ISubSystem otherSubSystem
) {
71 return (otherSubSystem
instanceof ITCFSubSystem
);
76 * @see org.eclipse.rse.core.subsystems.AbstractConnectorServiceManager#getSubSystemCommonInterface(org.eclipse.rse.core.subsystems.ISubSystem)
79 public Class
<ITraceSubSystem
> getSubSystemCommonInterface(ISubSystem subsystem
) {
80 return ITraceSubSystem
.class;