Class ShellController

java.lang.Object
com.sshtools.client.shell.ShellController
All Implemented Interfaces:
ShellReader, ShellWriter
Direct Known Subclasses:
ShellProcessController

public class ShellController extends Object implements ShellReader, ShellWriter
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected InputStream
     
    protected ShellMatcher
     
    protected int
     
    protected ExpectShell
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Send a carriage return to the remote command.
    boolean
    expect(String pattern)
    Consume the output of the command until the pattern matches.
    boolean
    expect(String pattern, boolean consumeRemainingLine)
    Consume the output of the command until the pattern matches.
    boolean
    expect(String pattern, boolean consumeRemainingLine, long timeout)
    Consume the output of the command until the pattern matches.
    boolean
    expect(String pattern, boolean consumeRemainingLine, long timeout, long maxLines)
    Consume the output of the command until the pattern matches.
    boolean
    expect(String pattern, long timeout)
    Consume the output of the command until the pattern matches.
    boolean
    Perform expect on the next line of output only
    boolean
    expectNextLine(String pattern, boolean consumeRemainingLine)
    Perform expect on the next line of output only
    boolean
    expectNextLine(String pattern, boolean consumeRemainingLine, long timeout)
    Perform expect on the next line of output only
    int
     
    void
    Interrupt the process by sending a Ctrl+C to the process.
    boolean
     
    boolean
     
    Read a line of output from the process.
    readLine(long timeout)
    Read a line of output from the process.
    void
     
    void
    setReadlimit(int readlimit)
     
    void
    type(String string)
    Send data to the remote command just like the user had typed it.
    void
    Send data to the remote command and finish with a carriage return.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait