public class ToChunkPipe<C,CONS extends CommandContext<? super Chunk>> extends AbstractPipe<C,Chunk,CONS>
| Modifier and Type | Field and Description |
|---|---|
private ChunkAdapter |
adapter
.
|
private Class<C> |
consumedType
.
|
consumer, piped| Constructor and Description |
|---|
ToChunkPipe(Class<C> consumedType,
boolean piped) |
| Modifier and Type | Method and Description |
|---|---|
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.
|
getAttributes, getHeight, getProperty, getSession, getWidth, isPiped, readLine, releaseAlternateBuffer, takeAlternateBufferprivate ChunkAdapter adapter
private Class<C> consumedType
public ToChunkPipe(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 IOException
Consumerelement - the provided elementIOExceptionpublic void flush() throws IOException
flush in interface Flushableflush in class AbstractPipe<C,Chunk,CONS extends CommandContext<? super Chunk>>IOExceptionpublic void close() throws IOException
Producerclose in interface Closeableclose in interface AutoCloseableclose in interface Producer<Chunk,CONS extends CommandContext<? super Chunk>>close in class AbstractPipe<C,Chunk,CONS extends CommandContext<? super Chunk>>IOException - any io exceptionpublic void write(Chunk chunk) throws IOException
ScreenContextchunk - the chunkIOException - any io exceptionpublic Class<Chunk> getProducedType()
Producerpublic Class<C> getConsumedType()
ConsumerCopyright © 2014 eXo Platform SAS. All Rights Reserved.