Commit | Line | Data |
---|---|---|
eb1bab5b | 1 | /********************************************************************** |
ed902a2b | 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 |
eb1bab5b | 12 | **********************************************************************/ |
ec619615 | 13 | package org.eclipse.tracecompass.tmf.remote.core.shell; |
eb1bab5b BH |
14 | |
15 | import org.eclipse.core.commands.ExecutionException; | |
16 | import org.eclipse.core.runtime.IProgressMonitor; | |
13729cbc | 17 | import org.eclipse.jdt.annotation.Nullable; |
eb1bab5b BH |
18 | |
19 | /** | |
eb1bab5b | 20 | * Interface for a command shell implementation |
cfdb727a | 21 | * |
dbd4432d | 22 | * @author Bernd Hufmann |
eb1bab5b BH |
23 | */ |
24 | public interface ICommandShell { | |
cfdb727a | 25 | |
eb1bab5b BH |
26 | /** |
27 | * Method to disconnect the command shell. | |
28 | */ | |
13729cbc | 29 | void dispose(); |
cfdb727a | 30 | |
eb1bab5b BH |
31 | /** |
32 | * Method to execute a command on the command shell. | |
cfdb727a AM |
33 | * |
34 | * @param command | |
13729cbc | 35 | * The command to executed |
cfdb727a | 36 | * @param monitor |
13729cbc BH |
37 | * A progress monitor |
38 | * @return a {@link ICommandResult} instance | |
eb1bab5b | 39 | * @throws ExecutionException |
cfdb727a | 40 | * If the command fails |
eb1bab5b | 41 | */ |
364dcfaf BH |
42 | ICommandResult executeCommand(ICommandInput command, @Nullable IProgressMonitor monitor) throws ExecutionException; |
43 | ||
44 | /** | |
45 | * Creates a command input instance | |
46 | * | |
47 | * @return {@link ICommandInput} instance | |
48 | * | |
49 | */ | |
50 | ICommandInput createCommand(); | |
eb1bab5b | 51 | } |