|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.crsh.shell.impl.command.SinkPipeFilter<P>
class SinkPipeFilter<P>
| Field Summary | |
|---|---|
private Filter<P,?> |
context
. |
private Class<P> |
producedType
. |
| Constructor Summary | |
|---|---|
SinkPipeFilter(Class<P> producedType)
|
|
| Method Summary | |
|---|---|
void |
close()
Close the producer. |
void |
flush()
|
Map<String,Object> |
getAttributes()
Returns the current shell attributes. |
Class<Object> |
getConsumedType()
Returns the class of the consumed type. |
int |
getHeight()
Returns the term height in chars. |
Class<P> |
getProducedType()
Returns the class of the produced type. |
String |
getProperty(String propertyName)
Returns a generic property, usually this property is resolved by the shell client. |
Map<String,Object> |
getSession()
Returns the current shell session. |
int |
getWidth()
Returns the term width in chars. |
void |
open(ProducerContext<P> context)
Open the producer with the specified context. |
void |
provide(Object element)
Provide an element. |
String |
readLine(String msg,
boolean echo)
Display a message and read a line on the console. |
void |
setPiped(boolean piped)
Set the pipe status. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private Filter<P,?> context
private final Class<P> producedType
| Constructor Detail |
|---|
SinkPipeFilter(Class<P> producedType)
| Method Detail |
|---|
public Map<String,Object> getSession()
SessionContext
getSession in interface SessionContextpublic Map<String,Object> getAttributes()
SessionContext
getAttributes in interface SessionContextpublic Class<P> getProducedType()
Producer
getProducedType in interface Producer<P>public void setPiped(boolean piped)
Producer
setPiped in interface Producer<P>piped - the piped statuspublic void open(ProducerContext<P> context)
Producer
open in interface Producer<P>context - the contextpublic void close()
Producer
close in interface Closeableclose in interface Producer<P>public 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 int getWidth()
IOContext
getWidth in interface IOContext<Object>public int getHeight()
IOContext
getHeight in interface IOContext<Object>
public void provide(Object element)
throws IOException
Pipe
provide in interface Pipe<Object>element - the provided element
IOExceptionpublic Class<Object> getConsumedType()
Consumer
getConsumedType in interface Consumer<Object>
public void flush()
throws IOException
flush in interface FlushableIOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||