Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: 31bfb4161fdf1dcc92556f82a3325f84d60d57d6 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
/*******************************************************************************
 * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
 * This program and the accompanying materials are made available under the terms
 * of the Eclipse Public License v1.0 which accompanies this distribution, and is
 * available at http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 * Wind River Systems - initial API and implementation
 *******************************************************************************/
package org.eclipse.tm.te.tcf.terminals.core.interfaces.launcher;

import java.util.Map;

import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.tcf.protocol.IPeer;
import org.eclipse.tm.te.runtime.interfaces.callback.ICallback;
import org.eclipse.tm.te.runtime.interfaces.properties.IPropertiesContainer;

/**
 * Interface to be implemented by classes providing a remote terminals launcher.
 */
public interface ITerminalsLauncher extends IAdaptable {

	/**
	 * Property denoting the terminal PTY type.
	 * <p>
	 * <b>Note:</b> If not explicitly specified, the terminal type defaults to &quot;ansi&quot;.
	 * <p>
	 * The property type is {@link String}.
	 */
	public static String PROP_TERMINAL_TYPE = "terminals.type"; //$NON-NLS-1$

	/**
	 * Property denoting the terminal encoding.
	 * <p>
	 * The property type is {@link String}.
	 */
	public static String PROP_TERMINAL_ENCODING = "terminals.cwd"; //$NON-NLS-1$

	/**
	 * Property denoting the terminal environment.
	 * <p>
	 * The property type is {@link Map}&lt; {@link String}, {@link String} &gt;.
	 */
	public static String PROP_TERMINAL_ENV = "terminals.env"; //$NON-NLS-1$

	/**
	 * Property denoting if the terminal is redirecting it's output to an file.
	 * <p>
	 * The property type is {@link String}.
	 */
	public static String PROP_TERMINAL_OUTPUT_REDIRECT_TO_FILE = "terminal.redirectToFile"; //$NON-NLS-1$

	/**
	 * Property denoting the full name of the connection the launcher got invoked for.
	 * <p>
	 * The property type is {@link String}.
	 */
	public static String PROP_CONNECTION_NAME = "connection.name"; //$NON-NLS-1$

	/**
	 * Launch a remote terminal defined by the given launch properties at the target specified by the
	 * given peer.
	 *
	 * @param peer The peer. Must not be <code>null</code>.
	 * @param params The remote terminal properties. Must not be <code>null</code>.
	 * @param callback The callback or <code>null</code>.
	 */
	public void launch(IPeer peer, IPropertiesContainer properties, ICallback callback);

	/**
	 * Disposes the remote terminals launcher instance.
	 */
	public void dispose();

	/**
	 * Exit the launched terminal (if still running).
	 */
	public void exit();
}

Back to the top