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
BusCrashExceptionprotected void accept(T bean) throws BusCrashException
BusCrashExceptionprotected void stopBus()
throws BusCrashException
BusCrashExceptionprotected void requestBusStop()
protected abstract void stopTheBus()
public SimpleBusService getServices()
ServiceProvidergetServices in interface ServiceProvidergetServices in interface BusServiceProviderpublic void setTo(Collection<? super T> to)
public Collection<? super T> getTo()