1 /**********************************************************************
2 * Copyright (c) 2012, 2015 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 * Markus Schorn - Bug 448058: Use org.eclipse.remote in favor of RSE
12 * Bernd Hufmann - Update to org.eclipse.remote API 2.0
13 **********************************************************************/
14 package org
.eclipse
.tracecompass
.internal
.lttng2
.control
.ui
.views
.remote
;
16 import org
.eclipse
.core
.commands
.ExecutionException
;
17 import org
.eclipse
.core
.runtime
.IProgressMonitor
;
18 import org
.eclipse
.remote
.core
.IRemoteConnectionChangeListener
;
19 import org
.eclipse
.remote
.core
.IRemoteFileService
;
20 import org
.eclipse
.remote
.core
.IRemoteProcessBuilder
;
24 * Remote System Proxy interface.
27 * @author Bernd Hufmann
29 public interface IRemoteSystemProxy
{
32 * Invalid port number for IP based connections.
34 int INVALID_PORT_NUMBER
= -1;
36 // ------------------------------------------------------------------------
38 // ------------------------------------------------------------------------
41 * Finds the File Service Subsystem.
43 * @return file service subsystem, or <code>null</code> if not found.
45 IRemoteFileService
getRemoteFileService();
48 * Returns a remote process builder for remote launching a process.
49 * @param command the command to be executed.
50 * @return the builder, or <code>null</code> if not possible.
52 IRemoteProcessBuilder
getProcessBuilder(String
...command
);
55 * Connects the shell service sub system.
56 * @param monitor a monitor to report progress.
59 * - call-back method being called when connection was finished
60 * @throws ExecutionException
61 * If the connection fails
63 void connect(IProgressMonitor monitor
) throws ExecutionException
;
66 * Disconnects from the shell service sub system.
68 * @throws ExecutionException
69 * If the disconnect command fails
71 void disconnect() throws ExecutionException
;
74 * Disposes the proxy, may close the connection.
79 * Creates a command shell.
81 * @return the command shell implementation
82 * @throws ExecutionException
83 * If the command fails
85 ICommandShell
createCommandShell() throws ExecutionException
;
88 * Method to add a communication listener to the connector service defined
89 * for the given connection.
94 void addConnectionChangeListener(IRemoteConnectionChangeListener listener
);
97 * Method to remove a communication listener from the connector service
98 * defined for the given connection.
101 * - listener to remove
103 void removeConnectionChangeListener(IRemoteConnectionChangeListener listener
);
106 * @return whether the remote host is currently connected.
108 boolean isConnected();