org.oddjob.beanbus
Class AbstractBusConductor

java.lang.Object
  extended by org.oddjob.beanbus.AbstractBusConductor
All Implemented Interfaces:
BusConductor
Direct Known Subclasses:
StatefulBusConductorAdapter

public abstract class AbstractBusConductor
extends Object
implements BusConductor

Base class for BusConductors. Provides methods for firing events.

Author:
rob

Constructor Summary
AbstractBusConductor()
           
 
Method Summary
 void addBusListener(BusListener listener)
          Add a listener.
protected  void fireBusCrashed(BusPhase phase, Exception e)
           
protected  void fireBusStarting()
           
protected  void fireBusStopping()
           
protected  void fireBusStopRequested(boolean started)
           
protected  void fireBusTerminated()
           
protected  void fireTripBeginning()
           
protected  void fireTripEnding()
           
 void removeBusListener(BusListener listener)
          Remove the listener.
abstract  String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.oddjob.beanbus.BusConductor
cleanBus, requestBusStop
 

Constructor Detail

AbstractBusConductor

public AbstractBusConductor()
Method Detail

addBusListener

public void addBusListener(BusListener listener)
Description copied from interface: BusConductor
Add a listener.

Specified by:
addBusListener in interface BusConductor
Parameters:
listener - The listener.

removeBusListener

public void removeBusListener(BusListener listener)
Description copied from interface: BusConductor
Remove the listener.

Specified by:
removeBusListener in interface BusConductor
Parameters:
listener - The listener.

fireBusStarting

protected void fireBusStarting()
                        throws BusCrashException
Throws:
BusCrashException

fireTripBeginning

protected void fireTripBeginning()
                          throws BusCrashException
Throws:
BusCrashException

fireTripEnding

protected void fireTripEnding()
                       throws BusCrashException
Throws:
BusCrashException

fireBusStopRequested

protected void fireBusStopRequested(boolean started)

fireBusStopping

protected void fireBusStopping()
                        throws BusCrashException
Throws:
BusCrashException

fireBusTerminated

protected void fireBusTerminated()

fireBusCrashed

protected void fireBusCrashed(BusPhase phase,
                              Exception e)

toString

public abstract String toString()
Overrides:
toString in class Object