|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.crsh.command.pipeline.AbstractPipe<C,Chunk,CONS>
org.crsh.command.pipeline.ToChunkPipe<C,CONS>
public class ToChunkPipe<C,CONS extends CommandContext<? super Chunk>>
| Field Summary | |
|---|---|
private ChunkAdapter |
adapter
. |
private Class<C> |
consumedType
. |
| Fields inherited from class org.crsh.command.pipeline.AbstractPipe |
|---|
consumer, piped |
| Constructor Summary | |
|---|---|
ToChunkPipe(Class<C> consumedType,
boolean piped)
|
|
| Method Summary | |
|---|---|
void |
close()
Close the producer. |
void |
flush()
|
Class<C> |
getConsumedType()
Returns the class of the element generic type. |
Class<Chunk> |
getProducedType()
Returns the class of the produced type. |
void |
open(CONS consumer)
Open the producer with the specified consumer. |
void |
provide(C element)
Provide an element. |
void |
write(Chunk chunk)
Write a chunk to the screen. |
| Methods inherited from class org.crsh.command.pipeline.AbstractPipe |
|---|
getAttributes, getHeight, getProperty, getSession, getWidth, isPiped, readLine, releaseAlternateBuffer, takeAlternateBuffer |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private ChunkAdapter adapter
private Class<C> consumedType
| Constructor Detail |
|---|
public ToChunkPipe(Class<C> consumedType,
boolean piped)
| Method Detail |
|---|
public void open(CONS consumer)
Producer
open in interface Producer<Chunk,CONS extends CommandContext<? super Chunk>>open in class AbstractPipe<C,Chunk,CONS extends CommandContext<? super Chunk>>consumer - the consumer
public void provide(C element)
throws IOException
Consumer
element - the provided element
IOException
public void flush()
throws IOException
flush in interface Flushableflush in class AbstractPipe<C,Chunk,CONS extends CommandContext<? super Chunk>>IOException
public void close()
throws IOException
Producer
close in interface Closeableclose in interface Producer<Chunk,CONS extends CommandContext<? super Chunk>>close in class AbstractPipe<C,Chunk,CONS extends CommandContext<? super Chunk>>IOException - any io exception
public void write(Chunk chunk)
throws IOException
ScreenContext
chunk - the chunk
IOException - any io exceptionpublic Class<Chunk> getProducedType()
Producer
public Class<C> getConsumedType()
Consumer
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||