org.databene.model.consumer
Class ConsumerChain<E>

java.lang.Object
  extended by org.databene.model.consumer.AbstractConsumer<E>
      extended by org.databene.model.consumer.ConsumerChain<E>
All Implemented Interfaces:
java.io.Closeable, Consumer<E>

public class ConsumerChain<E>
extends AbstractConsumer<E>

Combines several Processors under one Processor interface. Each call to the Processor is forwarded to all sub Processors.

Created: 26.08.2007 14:50:29

Since:
0.4.0
Author:
Volker Bergmann

Constructor Summary
ConsumerChain(Consumer<E>... components)
           
 
Method Summary
 void addComponent(Consumer<E> component)
           
 void close()
           
 int componentCount()
           
 void finishConsuming(E object)
           
 void flush()
           
 Consumer<E> getComponent(int index)
           
 java.util.List<Consumer<E>> getComponents()
           
 void setComponents(Consumer<E>... components)
           
 void startConsuming(E object)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConsumerChain

public ConsumerChain(Consumer<E>... components)
Method Detail

setComponents

public void setComponents(Consumer<E>... components)

addComponent

public void addComponent(Consumer<E> component)

getComponent

public Consumer<E> getComponent(int index)

componentCount

public int componentCount()

startConsuming

public void startConsuming(E object)

finishConsuming

public void finishConsuming(E object)
Specified by:
finishConsuming in interface Consumer<E>
Overrides:
finishConsuming in class AbstractConsumer<E>

flush

public void flush()
Specified by:
flush in interface Consumer<E>
Overrides:
flush in class AbstractConsumer<E>

close

public void close()
Specified by:
close in interface java.io.Closeable
Specified by:
close in interface Consumer<E>
Overrides:
close in class AbstractConsumer<E>

getComponents

public java.util.List<Consumer<E>> getComponents()


Copyright © 2011. All Rights Reserved.