2919cea517c845dabe4ce8362ec6e630252c335c
[deliverable/tracecompass.git] / org.eclipse.linuxtools.lttng2.ui / src / org / eclipse / linuxtools / internal / lttng2 / ui / views / control / remote / ICommandShell.java
1 /**********************************************************************
2 * Copyright (c) 2012, 2013 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 **********************************************************************/
12 package org.eclipse.linuxtools.internal.lttng2.ui.views.control.remote;
13
14 import org.eclipse.core.commands.ExecutionException;
15 import org.eclipse.core.runtime.IProgressMonitor;
16
17 /**
18 * <p>
19 * Interface for a command shell implementation
20 * </p>
21 *
22 * @author Bernd Hufmann
23 */
24 public interface ICommandShell {
25
26 /**
27 * Method to connect the command shell.
28 *
29 * @throws ExecutionException
30 * If the command fails
31 */
32 void connect() throws ExecutionException;
33
34 /**
35 * Method to disconnect the command shell.
36 */
37 void disconnect();
38
39 /**
40 * Method to execute a command on the command shell.
41 *
42 * @param command
43 * - the command to executed
44 * @param monitor
45 * - a progress monitor
46 * @return the command result
47 * @throws ExecutionException
48 * If the command fails
49 */
50 ICommandResult executeCommand(String command,
51 IProgressMonitor monitor) throws ExecutionException;
52
53 /**
54 * Method to execute a command on the command shell.
55 *
56 * @param command
57 * - the command to executed
58 * @param monitor
59 * - a progress monitor
60 * @param checkReturnValue
61 * - flag to indicate that the command result should be checked.
62 * If false the command result will be always 0.
63 * @return the command result
64 * @throws ExecutionException
65 * If the command fails
66 */
67 ICommandResult executeCommand(final String command,
68 final IProgressMonitor monitor, final boolean checkReturnValue)
69 throws ExecutionException;
70
71 }
This page took 0.033947 seconds and 4 git commands to generate.