Package org.oddjob.beanbus.drivers
Class IterableBusDriver<T>
java.lang.Object
org.oddjob.beanbus.drivers.IterableBusDriver<T>
- Type Parameters:
T- The generic type of the Iterable.
- Author:
- Rob
Description
Drives data from an iterable (such as aListType)
through a Bean Bus. It can also be used outside Bean Bus to push data to any Consumer.Example
Drive 3 Beans through a Bean Bus.
<oddjob>
<job>
<bus:bus id="bean-bus" xmlns:bus="oddjob:beanbus">
<of>
<bus:driver>
<values>
<list>
<values>
<value value="#{25.5}"/>
<value value="#{36.2}"/>
<value value="#{40.4}"/>
</values>
</list>
</values>
</bus:driver>
<bus:map>
<function>
<value value="#{ function(x) { return x * 2 } }"/>
</function>
</bus:map>
<bus:collect id="results"/>
</of>
</bus:bus>
</job>
</oddjob>
-
Constructor Details
-
IterableBusDriver
public IterableBusDriver()
-
-
Method Details
-
reset
public void reset() -
run
public void run() -
stop
Description copied from interface:StoppableStop executing. This method should not return until the Stoppable has actually stopped.- Specified by:
stopin interfaceStoppable- Throws:
FailedToStopException
-
getValues
-
setValues
The data to iterate over.- Parameters:
iterable- The iterable.
-
getName
-
setName
-
setTo
Set the destination. -
getTo
-
getCount
public int getCount() -
toString
-