T
- The type of beans on the bus.public abstract class AbstractBusComponent<T> extends Object implements BusServiceProvider, Outbound<T>
BeanBus
.
Implementations must ensure #startBus() and {@link stopBus()} are called and must provide a {@link #stopTheBus()} method.
Constructor and Description |
---|
AbstractBusComponent() |
Modifier and Type | Method and Description |
---|---|
protected void |
accept(T bean) |
SimpleBusService |
getServices()
Provider the services.
|
Collection<? super T> |
getTo() |
protected void |
requestBusStop() |
void |
setTo(Collection<? super T> to)
Set the destination.
|
protected void |
startBus() |
protected void |
stopBus() |
protected abstract void |
stopTheBus()
Implementation override this to perform the action of
stopping the bus.
|
protected void startBus() throws BusCrashException
BusCrashException
protected void accept(T bean) throws BusCrashException
BusCrashException
protected void stopBus() throws BusCrashException
BusCrashException
protected void requestBusStop()
protected abstract void stopTheBus()
public SimpleBusService getServices()
ServiceProvider
getServices
in interface ServiceProvider
getServices
in interface BusServiceProvider
public void setTo(Collection<? super T> to)
public Collection<? super T> getTo()