T
- The type of bean being batched.public class Batcher<T> extends AbstractDestination<T> implements BusFilter<T,java.util.Collection<T>>
<oddjob> <job> <bean-bus> <parts> <bus:iterable-driver id="bean-bus" xmlns:bus="oddjob:beanbus"> <beans> <list> <values> <value value="Apple"/> <value value="Orange"/> <value value="Pear"/> <value value="Kiwi"/> <value value="Banana"/> </values> </list> </beans> </bus:iterable-driver> <bean id="batcher" batchSize="2" class="org.oddjob.beanbus.destinations.Batcher"/> <bus:bean-capture id="results" xmlns:bus="oddjob:beanbus"/> </parts> </bean-bus> </job> </oddjob>
Constructor and Description |
---|
Batcher() |
Modifier and Type | Method and Description |
---|---|
boolean |
add(T bean) |
protected void |
dispatch()
Dispatch the beans.
|
int |
getBatchSize() |
int |
getCount() |
java.lang.String |
getName() |
int |
getSize() |
java.util.Collection<? super java.util.Collection<T>> |
getTo() |
boolean |
isEmpty() |
void |
setBatchSize(int batchSize) |
void |
setBeanBus(BusConductor busConductor) |
void |
setName(java.lang.String name) |
void |
setTo(java.util.Collection<? super java.util.Collection<T>> next)
Set the out bound destination.
|
java.lang.String |
toString() |
addAll, clear, contains, containsAll, iterator, remove, removeAll, retainAll, size, toArray, toArray
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
protected void dispatch()
@Inject public void setBeanBus(BusConductor busConductor)
public int getCount()
public int getSize()
public boolean isEmpty()
isEmpty
in interface java.util.Collection<T>
isEmpty
in class AbstractDestination<T>
public int getBatchSize()
public void setBatchSize(int batchSize)
public java.util.Collection<? super java.util.Collection<T>> getTo()
public void setTo(java.util.Collection<? super java.util.Collection<T>> next)
Outbound
public java.lang.String getName()
public void setName(java.lang.String name)
public java.lang.String toString()
toString
in class java.lang.Object