org.oddjob.beanbus.destinations
Class BeanCapture<T>

java.lang.Object
  extended by org.oddjob.beanbus.AbstractDestination<F>
      extended by org.oddjob.beanbus.AbstractFilter<T,T>
          extended by org.oddjob.beanbus.destinations.BeanCapture<T>
Type Parameters:
T - The type of the beans to be collected.
All Implemented Interfaces:
Iterable<T>, Collection<T>, BusFilter<T,T>, Outbound<T>

public class BeanCapture<T>
extends AbstractFilter<T,T>

A BusFilter that collects beans in a list.

Example

There are many examples elsewhere.
Author:
rob

Constructor Summary
BeanCapture()
           
 
Method Summary
protected  T filter(T from)
           
 List<T> getBeans()
           
 int getCount()
           
 boolean isEmpty()
           
 Iterator<T> iterator()
           
 void setBusConductor(BusConductor busConductor)
           
 
Methods inherited from class org.oddjob.beanbus.AbstractFilter
add, getName, getTo, setName, setTo, toString
 
Methods inherited from class org.oddjob.beanbus.AbstractDestination
addAll, clear, contains, containsAll, remove, removeAll, retainAll, size, toArray, toArray
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Collection
addAll, clear, contains, containsAll, equals, hashCode, remove, removeAll, retainAll, size, toArray, toArray
 

Constructor Detail

BeanCapture

public BeanCapture()
Method Detail

filter

protected T filter(T from)
Specified by:
filter in class AbstractFilter<T,T>

setBusConductor

@Inject
public void setBusConductor(BusConductor busConductor)

getBeans

public List<T> getBeans()

isEmpty

public boolean isEmpty()
Specified by:
isEmpty in interface Collection<T>
Overrides:
isEmpty in class AbstractDestination<T>

getCount

public int getCount()

iterator

public Iterator<T> iterator()
Specified by:
iterator in interface Iterable<T>
Specified by:
iterator in interface Collection<T>
Overrides:
iterator in class AbstractDestination<T>