|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.crsh.shell.impl.CommandContextImpl
org.crsh.shell.impl.InvocationContextImpl<C,P>
class InvocationContextImpl<C,P>
| Field Summary | |
|---|---|
private StringWriter |
buffer
. |
private Iterable<C> |
consumedItems
. |
private ShellProcessContext |
processContext
. |
private List<P> |
products
. |
private ShellPrinter |
writer
. |
| Constructor Summary | |
|---|---|
InvocationContextImpl(ShellProcessContext processContext,
Iterable<C> consumedItems,
Map<String,Object> attributes)
|
|
| Method Summary | |
|---|---|
Iterable<C> |
consume()
Returns an iterator over the stream of consumed items. |
StringWriter |
getBuffer()
|
List<P> |
getProducedItems()
|
int |
getWidth()
Returns the term width in chars. |
ShellPrinter |
getWriter()
|
boolean |
isPiped()
Returns true if the command is involved in a pipe operation and receives a stream. |
void |
produce(P product)
|
String |
readLine(String msg,
boolean echo)
|
| Methods inherited from class org.crsh.shell.impl.CommandContextImpl |
|---|
getAttributes |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.crsh.command.CommandContext |
|---|
getAttributes |
| Field Detail |
|---|
private final ShellProcessContext processContext
private ShellPrinter writer
private StringWriter buffer
private List<P> products
private Iterable<C> consumedItems
| Constructor Detail |
|---|
InvocationContextImpl(ShellProcessContext processContext,
Iterable<C> consumedItems,
Map<String,Object> attributes)
| Method Detail |
|---|
public int getWidth()
InvocationContext
getWidth in interface InvocationContext<C,P>public List<P> getProducedItems()
public StringWriter getBuffer()
public boolean isPiped()
InvocationContext
isPiped in interface InvocationContext<C,P>public Iterable<C> consume()
InvocationContext
consume in interface InvocationContext<C,P>public void produce(P product)
produce in interface InvocationContext<C,P>public ShellPrinter getWriter()
getWriter in interface InvocationContext<C,P>
public String readLine(String msg,
boolean echo)
readLine in interface InvocationContext<C,P>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||