|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.crsh.command.pipeline.AbstractPipe<C,P,CONS>
public abstract class AbstractPipe<C,P,CONS extends CommandContext<? super P>>
| Field Summary | |
|---|---|
protected CONS |
consumer
. |
protected boolean |
piped
. |
| Constructor Summary | |
|---|---|
AbstractPipe(boolean piped)
|
|
| Method Summary | |
|---|---|
void |
close()
Close the producer. |
void |
flush()
|
Map<String,Object> |
getAttributes()
Returns the current attributes. |
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. |
boolean |
isPiped()
|
void |
open(CONS consumer)
Open the producer with the specified consumer. |
String |
readLine(String msg,
boolean echo)
Display a message and read a line on the console. |
boolean |
releaseAlternateBuffer()
Release control of the alternate buffer. |
boolean |
takeAlternateBuffer()
Take control of the alternate buffer. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.crsh.io.Producer |
|---|
getProducedType |
| Methods inherited from interface org.crsh.io.Consumer |
|---|
getConsumedType, provide |
| Methods inherited from interface org.crsh.shell.ScreenContext |
|---|
write |
| Field Detail |
|---|
protected final boolean piped
protected CONS extends CommandContext<? super P> consumer
| Constructor Detail |
|---|
public AbstractPipe(boolean piped)
| Method Detail |
|---|
public boolean isPiped()
isPiped in interface CommandContext<C>
public boolean takeAlternateBuffer()
throws IOException
InteractionContextFlushable.flush() method
is invoked.
takeAlternateBuffer in interface InteractionContextIOException
public boolean releaseAlternateBuffer()
throws IOException
InteractionContextFlushable.flush() method
is invoked.
releaseAlternateBuffer in interface InteractionContextIOExceptionpublic String getProperty(String propertyName)
InteractionContext
getProperty in interface InteractionContextpropertyName - the property name
public String readLine(String msg,
boolean echo)
InteractionContext
readLine in interface InteractionContextmsg - the message to display before reading a lineecho - wether or not the line read should be echoed when typing
public Map<String,Object> getSession()
RuntimeContext
getSession in interface RuntimeContextpublic Map<String,Object> getAttributes()
RuntimeContext
getAttributes in interface RuntimeContextpublic int getWidth()
ScreenContext
getWidth in interface ScreenContextpublic int getHeight()
ScreenContext
getHeight in interface ScreenContextpublic void open(CONS consumer)
Producer
open in interface Producer<P,CONS extends CommandContext<? super P>>consumer - the consumer
public void flush()
throws IOException
flush in interface FlushableIOException
public void close()
throws IOException
Producer
close in interface Closeableclose in interface Producer<P,CONS extends CommandContext<? super P>>IOException - any io exception
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||