1 /**********************************************************************
2 * Copyright (c) 2012, 2013 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 **********************************************************************/
12 package org
.eclipse
.linuxtools
.internal
.lttng2
.ui
.views
.control
.remote
;
14 import org
.eclipse
.core
.commands
.ExecutionException
;
15 import org
.eclipse
.rse
.core
.model
.IRSECallback
;
16 import org
.eclipse
.rse
.core
.subsystems
.ICommunicationsListener
;
17 import org
.eclipse
.rse
.core
.subsystems
.ISubSystem
;
18 import org
.eclipse
.rse
.services
.shells
.IShellService
;
19 import org
.eclipse
.rse
.services
.terminals
.ITerminalService
;
20 import org
.eclipse
.rse
.subsystems
.files
.core
.servicesubsystem
.IFileServiceSubSystem
;
24 * Remote System Proxy interface.
27 * @author Bernd Hufmann
29 public interface IRemoteSystemProxy
{
31 // ------------------------------------------------------------------------
33 // ------------------------------------------------------------------------
35 * Invalid port number for IP based connections.
37 public final static int INVALID_PORT_NUMBER
= -1;
39 // ------------------------------------------------------------------------
41 // ------------------------------------------------------------------------
43 * Find the first shell service.
45 * @return shell service object, or <code>null</code> if not found.
47 IShellService
getShellService();
50 * Find the first terminal service.
52 * @return shell service object, or <code>null</code> if not found.
54 ITerminalService
getTerminalService();
57 * Find the first IShellServiceSubSystem service.
59 * @return shell service subsystem, or <code>null</code> if not found.
61 ISubSystem
getShellServiceSubSystem();
64 * Find the first ITerminalServiceSubSystem service.
66 * @return shell service subsystem, or <code>null</code> if not found.
68 ISubSystem
getTerminalServiceSubSystem();
71 * Finds the File Service Subsystem.
73 * @return file service subsystem, or <code>null</code> if not found.
75 IFileServiceSubSystem
getFileServiceSubSystem();
78 * @return port of IP connection to be used
83 * Sets the port of the IP connection.
84 * @param port - the IP port to set
86 void setPort(int port
);
89 * Connects the shell service sub system.
92 * - call-back method being called when connection was finished
93 * @throws ExecutionException
94 * If the connection fails
96 void connect(IRSECallback callback
) throws ExecutionException
;
99 * Disconnects from the shell service sub system.
101 * @throws ExecutionException
102 * If the disconnect command fails
104 void disconnect() throws ExecutionException
;
107 * Creates a command shell.
109 * @return the command shell implementation
110 * @throws ExecutionException
111 * If the command fails
113 ICommandShell
createCommandShell() throws ExecutionException
;
116 * Method to add a communication listener to the connector service defined
117 * for the given connection.
122 void addCommunicationListener(ICommunicationsListener listener
);
125 * Method to remove a communication listener from the connector service
126 * defined for the given connection.
129 * - listener to remove
131 void removeCommunicationListener(ICommunicationsListener listener
);