public class ToChunkPipe<C,CONS extends CommandContext<? super Chunk>> extends AbstractPipe<C,Chunk,CONS>
consumer, piped| Constructor and Description |
|---|
ToChunkPipe(java.lang.Class<C> consumedType,
boolean piped) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close the producer.
|
void |
flush() |
java.lang.Class<C> |
getConsumedType()
Returns the class of the element generic type.
|
java.lang.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.
|
getAttributes, getHeight, getProperty, getSession, getWidth, isPiped, readLine, releaseAlternateBuffer, takeAlternateBufferpublic ToChunkPipe(java.lang.Class<C> consumedType, boolean piped)
public void open(CONS consumer)
Produceropen in interface Producer<Chunk,CONS extends CommandContext<? super Chunk>>open in class AbstractPipe<C,Chunk,CONS extends CommandContext<? super Chunk>>consumer - the consumerpublic void provide(C element) throws java.io.IOException
Consumerelement - the provided elementjava.io.IOExceptionpublic void flush()
throws java.io.IOException
flush in interface java.io.Flushableflush in class AbstractPipe<C,Chunk,CONS extends CommandContext<? super Chunk>>java.io.IOExceptionpublic void close()
throws java.io.IOException
Producerclose in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in interface Producer<Chunk,CONS extends CommandContext<? super Chunk>>close in class AbstractPipe<C,Chunk,CONS extends CommandContext<? super Chunk>>java.io.IOException - any io exceptionpublic void write(Chunk chunk) throws java.io.IOException
ScreenContextchunk - the chunkjava.io.IOException - any io exceptionpublic java.lang.Class<Chunk> getProducedType()
ProducerCopyright © 2014 eXo Platform SAS. All Rights Reserved.