Class BadBeanFilter<T>

java.lang.Object
org.oddjob.beanbus.destinations.BadBeanFilter<T>
Type Parameters:
T -
All Implemented Interfaces:
Consumer<T>, BusFilter<T,T>, Outbound<T>, Service, Stoppable

public class BadBeanFilter<T> extends Object implements BusFilter<T,T>, Service
Author:
rob

Description

Something that will catch bad beans and pass them to a handler.
  • Constructor Details

    • BadBeanFilter

      public BadBeanFilter()
  • Method Details

    • start

      public void start() throws Exception
      Description copied from interface: Service
      Start the service.
      Specified by:
      start in interface Service
      Throws:
      Exception - If the service can't be started.
    • stop

      public void stop() throws FailedToStopException
      Description copied from interface: Stoppable
      Stop executing. This method should not return until the Stoppable has actually stopped.
      Specified by:
      stop in interface Stoppable
      Throws:
      FailedToStopException
    • accept

      public void accept(T bean)
      Specified by:
      accept in interface Consumer<T>
    • setTo

      public void setTo(Consumer<? super T> to)
      Description copied from interface: Outbound
      Set the out bound destination.
      Specified by:
      setTo in interface Outbound<T>
      Parameters:
      to -
    • getTo

      public Consumer<? super T> getTo()
    • getBadBeanHandler

      public Consumer<? super BadBeanTransfer<T>> getBadBeanHandler()
    • setBadBeanHandler

      public void setBadBeanHandler(Consumer<? 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()