ctf: move CtfReaderException to the ctf.core top-level package
[deliverable/tracecompass.git] / org.eclipse.tracecompass.lttng2.control.ui / src / org / eclipse / tracecompass / internal / lttng2 / control / ui / views / remote / IRemoteSystemProxy.java
CommitLineData
eb1bab5b 1/**********************************************************************
533d0bc3 2 * Copyright (c) 2012, 2015 Ericsson
cfdb727a 3 *
eb1bab5b
BH
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
cfdb727a
AM
8 *
9 * Contributors:
eb1bab5b 10 * Bernd Hufmann - Initial API and implementation
b732adaa 11 * Markus Schorn - Bug 448058: Use org.eclipse.remote in favor of RSE
533d0bc3 12 * Bernd Hufmann - Update to org.eclipse.remote API 2.0
eb1bab5b 13 **********************************************************************/
9bc60be7 14package org.eclipse.tracecompass.internal.lttng2.control.ui.views.remote;
eb1bab5b
BH
15
16import org.eclipse.core.commands.ExecutionException;
b732adaa
MS
17import org.eclipse.core.runtime.IProgressMonitor;
18import org.eclipse.remote.core.IRemoteConnectionChangeListener;
533d0bc3 19import org.eclipse.remote.core.IRemoteFileService;
b732adaa 20import org.eclipse.remote.core.IRemoteProcessBuilder;
eb1bab5b
BH
21
22/**
eb1bab5b
BH
23 * <p>
24 * Remote System Proxy interface.
25 * </p>
cfdb727a 26 *
dbd4432d 27 * @author Bernd Hufmann
eb1bab5b
BH
28 */
29public interface IRemoteSystemProxy {
30
00de7b32
BH
31 /**
32 * Invalid port number for IP based connections.
33 */
304712fe 34 int INVALID_PORT_NUMBER = -1;
00de7b32 35
eb1bab5b
BH
36 // ------------------------------------------------------------------------
37 // Operations
38 // ------------------------------------------------------------------------
cfdb727a 39
bbb3538a
BH
40 /**
41 * Finds the File Service Subsystem.
cfdb727a
AM
42 *
43 * @return file service subsystem, or <code>null</code> if not found.
bbb3538a 44 */
533d0bc3 45 IRemoteFileService getRemoteFileService();
cfdb727a 46
00de7b32 47 /**
b732adaa
MS
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.
00de7b32 51 */
b732adaa 52 IRemoteProcessBuilder getProcessBuilder(String...command);
00de7b32 53
eb1bab5b 54 /**
cfdb727a 55 * Connects the shell service sub system.
b732adaa 56 * @param monitor a monitor to report progress.
cfdb727a
AM
57 *
58 * @param callback
59 * - call-back method being called when connection was finished
60 * @throws ExecutionException
61 * If the connection fails
eb1bab5b 62 */
b732adaa 63 void connect(IProgressMonitor monitor) throws ExecutionException;
eb1bab5b
BH
64
65 /**
cfdb727a
AM
66 * Disconnects from the shell service sub system.
67 *
68 * @throws ExecutionException
69 * If the disconnect command fails
eb1bab5b 70 */
a6e6f7b4 71 void disconnect() throws ExecutionException;
eb1bab5b 72
b732adaa
MS
73 /**
74 * Disposes the proxy, may close the connection.
75 */
76 void dispose();
77
eb1bab5b 78 /**
cfdb727a
AM
79 * Creates a command shell.
80 *
eb1bab5b 81 * @return the command shell implementation
cfdb727a
AM
82 * @throws ExecutionException
83 * If the command fails
eb1bab5b 84 */
a6e6f7b4 85 ICommandShell createCommandShell() throws ExecutionException;
eb1bab5b
BH
86
87 /**
cfdb727a
AM
88 * Method to add a communication listener to the connector service defined
89 * for the given connection.
90 *
91 * @param listener
92 * - listener to add
eb1bab5b 93 */
b732adaa 94 void addConnectionChangeListener(IRemoteConnectionChangeListener listener);
eb1bab5b
BH
95
96 /**
cfdb727a
AM
97 * Method to remove a communication listener from the connector service
98 * defined for the given connection.
99 *
100 * @param listener
101 * - listener to remove
eb1bab5b 102 */
b732adaa 103 void removeConnectionChangeListener(IRemoteConnectionChangeListener listener);
eb1bab5b 104
a657b111 105 /**
b732adaa 106 * @return whether the remote host is currently connected.
a657b111 107 */
b732adaa 108 boolean isConnected();
304712fe 109}
This page took 0.063307 seconds and 5 git commands to generate.