java.lang.Object
com.aoapps.hodgepodge.util.ShellInterpreter
- All Implemented Interfaces:
Runnable
AOSH is a Bourne-shell-like command interpreter
to control the AOServ Client utilities.- Author:
- AO Industries, Inc.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final TerminalWriterprotected final Readerprotected final TerminalWriterprotected String -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedShellInterpreter(Reader in, TerminalWriter out, TerminalWriter err) protectedShellInterpreter(Reader in, TerminalWriter out, TerminalWriter err, String... args) protectedShellInterpreter(Reader in, Writer out, Writer err) protectedShellInterpreter(Reader in, Writer out, Writer err, String[] args) -
Method Summary
Modifier and TypeMethodDescriptionfinal voidClears the screen.protected abstract StringgetName()final longgetPid()final longgetPID()Deprecated.protected abstract Stringprotected abstract booleanhandleCommand(String[] args) Processes one command and returns.protected final booleanisAlive()protected final booleanfinal voidprotected abstract ShellInterpreternewShellInterpreter(Reader in, TerminalWriter out, TerminalWriter err, String[] args) final voidrun()If arguments were provided, executes that command.
-
Field Details
-
in
-
out
-
err
-
status
-
-
Constructor Details
-
ShellInterpreter
-
ShellInterpreter
-
ShellInterpreter
-
ShellInterpreter
-
-
Method Details
-
clear
Clears the screen.- Throws:
IOException
-
getName
-
getPid
public final long getPid() -
getPID
Deprecated.Please usegetPid()instead. -
getPrompt
- Throws:
IOExceptionSQLException
-
handleCommand
Processes one command and returns.- Throws:
IOExceptionSQLException
-
isAlive
protected final boolean isAlive() -
isInteractive
protected final boolean isInteractive() -
jobs
-
newShellInterpreter
protected abstract ShellInterpreter newShellInterpreter(Reader in, TerminalWriter out, TerminalWriter err, String[] args) -
run
public final void run()If arguments were provided, executes that command. Otherwise, reads frominuntil end of file orexit.
-

getPid()instead.