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

java.lang.Object
  extended by org.oddjob.beanbus.AbstractDestination<T>
      extended by org.oddjob.beanbus.destinations.BadBeanFilter<T>
Type Parameters:
T -
All Implemented Interfaces:
Iterable<T>, Collection<T>, BusFilter<T,T>, Outbound<T>

public class BadBeanFilter<T>
extends AbstractDestination<T>
implements BusFilter<T,T>

Description

Something that will catch bad beans and pass them to a handler.
Author:
rob

Constructor Summary
BadBeanFilter()
           
 
Method Summary
 boolean add(T bean)
           
 Collection<? super BadBeanTransfer<T>> getBadBeanHandler()
           
 int getBadCount()
           
 int getCount()
           
 String getName()
           
 Collection<? super T> getTo()
           
 void setBadBeanHandler(Collection<? super BadBeanTransfer<T>> badBeanHandler)
           
 void setBusConductor(BusConductor busConductor)
           
 void setName(String name)
           
 void setTo(Collection<? super T> to)
          Set the out bound destination.
 String toString()
           
 
Methods inherited from class org.oddjob.beanbus.AbstractDestination
addAll, clear, contains, containsAll, isEmpty, iterator, 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, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray
 

Constructor Detail

BadBeanFilter

public BadBeanFilter()
Method Detail

add

public boolean add(T bean)
Specified by:
add in interface Collection<T>

setBusConductor

@Inject
public void setBusConductor(BusConductor busConductor)

setTo

public void setTo(Collection<? super T> to)
Description copied from interface: Outbound
Set the out bound destination.

Specified by:
setTo in interface Outbound<T>

getTo

public Collection<? super T> getTo()

getBadBeanHandler

public Collection<? super BadBeanTransfer<T>> getBadBeanHandler()

setBadBeanHandler

public void setBadBeanHandler(Collection<? super BadBeanTransfer<T>> badBeanHandler)

getName

public String getName()

setName

public void setName(String name)

getBadCount

public int getBadCount()

toString

public String toString()
Overrides:
toString in class Object

getCount

public int getCount()