Commit | Line | Data |
---|---|---|
eb1bab5b BH |
1 | /********************************************************************** |
2 | * Copyright (c) 2012 Ericsson | |
3 | * | |
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 | |
8 | * | |
9 | * Contributors: | |
10 | * Bernd Hufmann - Initial API and implementation | |
11 | **********************************************************************/ | |
9315aeee | 12 | package org.eclipse.linuxtools.internal.lttng2.ui.views.control.remote; |
eb1bab5b BH |
13 | |
14 | import org.eclipse.core.commands.ExecutionException; | |
15 | import org.eclipse.core.runtime.IProgressMonitor; | |
16 | ||
17 | /** | |
eb1bab5b BH |
18 | * <p> |
19 | * Interface for a command shell implementation | |
20 | * </p> | |
dbd4432d BH |
21 | * |
22 | * @author Bernd Hufmann | |
eb1bab5b BH |
23 | */ |
24 | public interface ICommandShell { | |
25 | ||
26 | /** | |
27 | * Method to connect the command shell. | |
28 | * @throws ExecutionException | |
29 | */ | |
30 | public void connect() throws ExecutionException; | |
31 | ||
32 | /** | |
33 | * Method to disconnect the command shell. | |
34 | */ | |
35 | public void disconnect(); | |
36 | ||
37 | /** | |
38 | * Method to execute a command on the command shell. | |
39 | * | |
40 | * @param command - the command to executed | |
41 | * @param monitor - a progress monitor | |
42 | * @return the command result | |
43 | * @throws ExecutionException | |
44 | */ | |
45 | public ICommandResult executeCommand(String command, IProgressMonitor monitor) throws ExecutionException; | |
46 | ||
47 | /** | |
48 | * Method to execute a command on the command shell. | |
49 | * | |
50 | * @param command - the command to executed | |
51 | * @param monitor - a progress monitor | |
52 | * @param checkReturnValue - flag to indicate that the command result should be checked. If false the command result will be always 0. | |
53 | * @return the command result | |
54 | * @throws ExecutionException | |
55 | */ | |
56 | public ICommandResult executeCommand(final String command, final IProgressMonitor monitor, final boolean checkReturnValue) throws ExecutionException; | |
57 | ||
58 | } |