class PipeLineInvocationContext extends Object implements InvocationContext<Object>
| Modifier and Type | Field and Description |
|---|---|
(package private) InvocationContext<Object> |
outter
.
|
private boolean |
piped
.
|
| Constructor and Description |
|---|
PipeLineInvocationContext(InvocationContext<Object> outter,
boolean piped) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
void |
flush() |
Map<String,Object> |
getAttributes()
Returns the current attributes.
|
Class<Object> |
getConsumedType()
Returns the class of the element generic type.
|
int |
getHeight()
Returns the screen height in chars.
|
String |
getProperty(String propertyName)
Returns a generic property, usually this property is resolved by the
shell client.
|
Map<String,Object> |
getSession()
Returns the current session.
|
int |
getWidth()
Returns the screen width in chars.
|
RenderPrintWriter |
getWriter()
Returns the writer for the output.
|
boolean |
isPiped() |
void |
provide(Object element)
Provide an element.
|
String |
readLine(String msg,
boolean echo)
Display a message and read a line on the console, this method call can be blocking until the user provides
a value.
|
boolean |
releaseAlternateBuffer()
Release control of the alternate buffer.
|
CommandInvoker<?,?> |
resolve(String s)
Resolve a command invoker for the specified command line.
|
boolean |
takeAlternateBuffer()
Take control of the alternate buffer.
|
void |
write(Chunk chunk)
Write a chunk to the screen.
|
final InvocationContext<Object> outter
private final boolean piped
PipeLineInvocationContext(InvocationContext<Object> outter, boolean piped)
public boolean isPiped()
isPiped in interface CommandContext<Object>public CommandInvoker<?,?> resolve(String s) throws ScriptException, IOException
InvocationContextresolve in interface InvocationContext<Object>s - the command lineScriptException - any script exceptionIOException - any io exceptionpublic int getWidth()
ScreenContextgetWidth in interface ScreenContextpublic int getHeight()
ScreenContextgetHeight in interface ScreenContextpublic boolean takeAlternateBuffer() throws IOException
InteractionContextFlushable.flush() method
is invoked.takeAlternateBuffer in interface InteractionContextIOExceptionpublic boolean releaseAlternateBuffer() throws IOException
InteractionContextFlushable.flush() method
is invoked.releaseAlternateBuffer in interface InteractionContextIOExceptionpublic String getProperty(String propertyName)
InteractionContextgetProperty in interface InteractionContextpropertyName - the property namepublic String readLine(String msg, boolean echo) throws IOException, InterruptedException
InteractionContextreadLine in interface InteractionContextmsg - the message to display before reading a lineecho - wether or not the line read should be echoed when typingIOException - any io exceptionInterruptedException - the thread was interrupted while waiting for the user valuepublic RenderPrintWriter getWriter()
InvocationContextgetWriter in interface InvocationContext<Object>public Class<Object> getConsumedType()
ConsumergetConsumedType in interface Consumer<Object>public void write(Chunk chunk) throws IOException
ScreenContextwrite in interface ScreenContextchunk - the chunkIOException - any io exceptionpublic void provide(Object element) throws IOException
Consumerprovide in interface Consumer<Object>element - the provided elementIOExceptionpublic void flush() throws IOException
flush in interface FlushableIOExceptionpublic void close() throws IOException
close in interface Closeableclose in interface AutoCloseableIOExceptionpublic Map<String,Object> getSession()
RuntimeContextgetSession in interface RuntimeContextpublic Map<String,Object> getAttributes()
RuntimeContextgetAttributes in interface RuntimeContextCopyright © 2014 eXo Platform SAS. All Rights Reserved.