Merge branch 'master' into lttng_2_0_control_dev
[deliverable/tracecompass.git] / org.eclipse.linuxtools.lttng2.ui / src / org / eclipse / linuxtools / internal / lttng2 / ui / views / control / service / ICommandShell.java
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 **********************************************************************/
12 package org.eclipse.linuxtools.internal.lttng2.ui.views.control.service;
13
14 import org.eclipse.core.commands.ExecutionException;
15 import org.eclipse.core.runtime.IProgressMonitor;
16
17 /**
18 * <b><u>ICommandShell</u></b>
19 * <p>
20 * Interface for a command shell implementation
21 * </p>
22 */
23 public interface ICommandShell {
24
25 /**
26 * Method to connect the command shell.
27 * @throws ExecutionException
28 */
29 public void connect() throws ExecutionException;
30
31 /**
32 * Method to disconnect the command shell.
33 */
34 public void disconnect();
35
36 /**
37 * Method to execute a command on the command shell.
38 *
39 * @param command - the command to executed
40 * @param monitor - a progress monitor
41 * @return the command result
42 * @throws ExecutionException
43 */
44 public ICommandResult executeCommand(String command, IProgressMonitor monitor) throws ExecutionException;
45
46 /**
47 * Method to execute a command on the command shell.
48 *
49 * @param command - the command to executed
50 * @param monitor - a progress monitor
51 * @param checkReturnValue - flag to indicate that the command result should be checked. If false the command result will be always 0.
52 * @return the command result
53 * @throws ExecutionException
54 */
55 public ICommandResult executeCommand(final String command, final IProgressMonitor monitor, final boolean checkReturnValue) throws ExecutionException;
56
57 }
This page took 0.061267 seconds and 6 git commands to generate.