org.crsh.io
Interface Producer<E,C extends Consumer<E>>

Type Parameters:
E - the element generic type
C - the consumer generic type
All Superinterfaces:
Closeable
All Known Subinterfaces:
CommandInvoker<C,P>, Filter<C,P,C2>
All Known Implementing Classes:
GroovyScriptCommand, Pipe, Pipe.Chunkizer, Pipe.Invoker, Pipe.Sink, PipeCommandProxy, PipeLine

public interface Producer<E,C extends Consumer<E>>
extends Closeable

A producer that produces elements in a specific consumer.


Method Summary
 void close()
          Close the producer.
 Class<E> getProducedType()
          Returns the class of the produced type.
 void open(C consumer)
          Open the producer with the specified consumer.
 void setPiped(boolean piped)
          Set the pipe status.
 

Method Detail

getProducedType

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

Returns:
the produced type

setPiped

void setPiped(boolean piped)
Set the pipe status.

Parameters:
piped - the piped status

open

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

Parameters:
consumer - the consumer

close

void close()
Close the producer.

Specified by:
close in interface Closeable


Copyright © 2013 eXo Platform SAS. All Rights Reserved.