public interface CommandSession
extends java.lang.AutoCloseable
| Modifier and Type | Interface and Description |
|---|---|
static class |
CommandSession.Utils
Return the current session.
|
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
OPTION_NO_GLOB |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close this command session.
|
java.lang.Object |
convert(java.lang.Class<?> type,
java.lang.Object instance)
Convert an object to another type.
|
java.nio.file.Path |
currentDir() |
void |
currentDir(java.nio.file.Path path) |
java.lang.Object |
execute(java.lang.CharSequence commandline)
Execute a program in this session.
|
Job |
foregroundJob()
Get the current foreground job or null.
|
java.lang.CharSequence |
format(java.lang.Object target,
int level)
Convert an object to string form (CharSequence).
|
java.lang.Object |
get(java.lang.String name)
Get the value of a variable.
|
java.io.PrintStream |
getConsole()
Return the PrintStream for the console.
|
java.io.InputStream |
getKeyboard()
Return the input stream that is the first of the pipeline.
|
java.util.List<Job> |
jobs()
List jobs.
|
java.lang.Object |
put(java.lang.String name,
java.lang.Object value)
Set the value of a variable.
|
void |
setJobListener(JobListener listener)
Set the job listener for this session.
|
static final java.lang.String OPTION_NO_GLOB
java.nio.file.Path currentDir()
void currentDir(java.nio.file.Path path)
java.lang.Object execute(java.lang.CharSequence commandline)
throws java.lang.Exception
commandline - java.lang.Exceptionvoid close()
close in interface java.lang.AutoCloseablejava.io.InputStream getKeyboard()
java.io.PrintStream getConsole()
java.lang.Object get(java.lang.String name)
name - java.lang.Object put(java.lang.String name,
java.lang.Object value)
name - Name of the variable.value - Value of the variablejava.lang.CharSequence format(java.lang.Object target,
int level)
target - level - java.lang.Object convert(java.lang.Class<?> type,
java.lang.Object instance)
java.util.List<Job> jobs()
Job foregroundJob()
void setJobListener(JobListener listener)
Copyright © 2006-2016 The Apache Software Foundation. All Rights Reserved.