Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: 24ad2ae7ce41a512f4e0480827f35c960978e1a6 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
/*******************************************************************************
 * Copyright (c) 2014 Wind River Systems, Inc. and others. All rights reserved.
 * This program and the accompanying materials are made available under the terms
 * of the Eclipse Public License v1.0 which accompanies this distribution, and is
 * available at http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *     Wind River Systems - initial API and implementation
 *******************************************************************************/
package org.eclipse.tcf.internal.debug.ui.launch.setup;

import java.io.IOException;

interface IRemoteShell {

    /**
     * String that is used as shell prompt.
     */
    static final String PROMPT = "***SHELL***>";

    /**
     * Send text to remote shell.
     * @param s - a string for shell input.
     * @throws IOException
     */
    void write(String s) throws IOException;

    /**
     * Read shell output until given string if found.
     * @param s - a string to search in shell output.
     * @throws IOException
     */
    void expect(String s) throws IOException;

    /**
     * Read and collect shell output until shell prompt is found.
     * @return shell output, not including the prompt.
     * @throws IOException
     */
    String waitPrompt() throws IOException;

    /**
     * Exit shell and close communication channel.
     * @throws IOException
     */
    void close() throws IOException;

    /**
     * Enable/disable debug output to System.out.
     */
    void setDebug(boolean debug);
}

Back to the top