org.crsh.io
Interface Producer<P,C extends Consumer<? super P>>

Type Parameters:
P - the produced element generic type
C - the consumer element generic type
All Superinterfaces:
Closeable
All Known Subinterfaces:
Filter<C,P,CONS>
All Known Implementing Classes:
AbstractPipe, ClosureInvoker, CommandInvoker, ConvertingPipe, PipeLine, PipeLineElement, ToChunkPipe

public interface Producer<P,C extends Consumer<? super P>>
extends Closeable

A producer that produces elements in a specific consumer.


Method Summary
 void close()
          Close the producer.
 Class<P> getProducedType()
          Returns the class of the produced type.
 void open(C consumer)
          Open the producer with the specified consumer.
 

Method Detail

getProducedType

Class<P> getProducedType()
Returns the class of the produced type.

Returns:
the produced type

open

void open(C consumer)
Open the producer with the specified consumer.

Parameters:
consumer - the consumer

close

void close()
           throws IOException,
                  UndeclaredThrowableException
Close the producer.

Specified by:
close in interface Closeable
Throws:
IOException - any io exception
UndeclaredThrowableException - anything other kind of exception


Copyright © 2013 eXo Platform SAS. All Rights Reserved.