org.oddjob.beanbus
Class SimpleBusService
java.lang.Object
org.oddjob.beanbus.SimpleBusService
- All Implemented Interfaces:
- Services, BusService
public class SimpleBusService
- extends Object
- implements BusService
SimpleBusService
public SimpleBusService(BusConductor busConductor)
SimpleBusService
public SimpleBusService(BusServiceProvider delegate)
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