public class BasicBeanBus<T> extends AbstractDestination<T> implements BeanBus<T>
Constructor and Description |
---|
BasicBeanBus()
Constructor for an unstoppable bus.
|
BasicBeanBus(Runnable stopBusCommand)
Constructor for a stoppable bus.
|
Modifier and Type | Method and Description |
---|---|
boolean |
add(T bean) |
BusConductor |
getBusConductor() |
Runnable |
getStopBusCommand() |
Collection<? super T> |
getTo() |
protected void |
onBusCrash() |
protected void |
onTripBegin() |
protected void |
onTripEnd() |
void |
setTo(Collection<? super T> to) |
void |
startBus() |
void |
stopBus() |
addAll, clear, contains, containsAll, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray
public BasicBeanBus()
public BasicBeanBus(Runnable stopBusCommand)
stopBusCommand
- public void startBus() throws BusCrashException
startBus
in interface BeanBus<T>
BusCrashException
public void stopBus() throws BusCrashException
stopBus
in interface BeanBus<T>
BusCrashException
public boolean add(T bean)
add
in interface Collection<T>
protected void onTripBegin()
protected void onTripEnd()
protected void onBusCrash()
public Collection<? super T> getTo()
public void setTo(Collection<? super T> to)
public Runnable getStopBusCommand()
public BusConductor getBusConductor()