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