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