org.oddjob.beanbus.drivers
Class IterableBusDriver<T>
java.lang.Object
org.oddjob.beanbus.AbstractBusComponent<T>
org.oddjob.beanbus.drivers.IterableBusDriver<T>
- Type Parameters:
T
-
- All Implemented Interfaces:
- Runnable, ServiceProvider, BusServiceProvider, Outbound<T>, Stoppable
public class IterableBusDriver<T>
- extends AbstractBusComponent<T>
- implements Runnable, Stoppable
A Runnable that can be used as an Oddjob job to take beans from an
iterable (collection) and drive them into an BeanBus
.
- Author:
- rob
IterableBusDriver
public IterableBusDriver()
reset
public void reset()
run
public void run()
- Specified by:
run
in interface Runnable
stop
public void stop()
- Description copied from interface:
Stoppable
- Stop executing. This method should not return until the
Stoppable has actually stopped.
- Specified by:
stop
in interface Stoppable
stopTheBus
protected void stopTheBus()
- Description copied from class:
AbstractBusComponent
- Implementation override this to perform the action of
stopping the bus.
- Specified by:
stopTheBus
in class AbstractBusComponent<T>
getBeans
public Iterable<? extends T> getBeans()
setBeans
public void setBeans(Iterable<? extends T> iterable)
- The beans to iterate over.
- Parameters:
iterable
-
getName
public String getName()
setName
public void setName(String name)
getCount
public int getCount()
toString
public String toString()
- Overrides:
toString
in class Object