|
||||||||||
| 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.AbstractInvocationContext<C,P>
public abstract class AbstractInvocationContext<C,P>
| Field Summary | |
|---|---|
protected StringWriter |
buffer
. |
protected Iterable<C> |
consumedItems
. |
protected List<P> |
producedItems
. |
protected ShellPrinter |
writer
. |
| Constructor Summary | |
|---|---|
protected |
AbstractInvocationContext(Iterable<C> consumedItems,
Map<String,Object> attributes)
|
| Method Summary | |
|---|---|
protected Map<String,Object> |
attributes(Map<String,Object> attributes)
Provide an opportunity to subclass to change the attribute map. |
Iterable<C> |
consume()
Returns an iterator over the stream of consumed items. |
StringWriter |
getBuffer()
|
List<P> |
getProducedItems()
|
ShellPrinter |
getWriter()
|
boolean |
isPiped()
Returns true if the command is involved in a pipe operation and receives a stream. |
void |
produce(P product)
|
| 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.InvocationContext |
|---|
getProperty, getWidth, readLine |
| Methods inherited from interface org.crsh.command.CommandContext |
|---|
getAttributes |
| Field Detail |
|---|
protected ShellPrinter writer
protected StringWriter buffer
protected List<P> producedItems
protected Iterable<C> consumedItems
| Constructor Detail |
|---|
protected AbstractInvocationContext(Iterable<C> consumedItems,
Map<String,Object> attributes)
| Method Detail |
|---|
protected Map<String,Object> attributes(Map<String,Object> attributes)
CommandContextImpl
attributes in class CommandContextImplattributes - the original attributes
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>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||