org.oddjob.beanbus
Class SimpleBusService

java.lang.Object
  extended by org.oddjob.beanbus.SimpleBusService
All Implemented Interfaces:
Services, BusService

public class SimpleBusService
extends Object
implements BusService


Field Summary
 
Fields inherited from interface org.oddjob.beanbus.BusService
BEAN_BUS_SERVICE_NAME
 
Constructor Summary
SimpleBusService(BusConductor busConductor)
           
SimpleBusService(BusServiceProvider delegate)
           
 
Method Summary
 BusConductor getService(String serviceName)
          Provide the service for the given name.
 String serviceNameFor(Class<?> theClass, String flavour)
          If these services can provide a service of the given class then a name that identifies the service is provided.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SimpleBusService

public SimpleBusService(BusConductor busConductor)

SimpleBusService

public SimpleBusService(BusServiceProvider delegate)
Method Detail

serviceNameFor

public String serviceNameFor(Class<?> theClass,
                             String flavour)
Description copied from interface: Services
If these services can provide a service of the given class then a name that identifies the service is provided.

Specified by:
serviceNameFor in interface Services
Parameters:
theClass - The type of service.
flavour - An optional flavour. May be null.
Returns:
A service name, or null if none can be provided.

getService

public BusConductor getService(String serviceName)
                        throws IllegalArgumentException
Description copied from interface: Services
Provide the service for the given name.

Specified by:
getService in interface Services
Specified by:
getService in interface BusService
Returns:
A service for the name.
Throws:
IllegalArgumentException - If no service for the name can be provided.

toString

public String toString()
Overrides:
toString in class Object