net.sf.genuine.organizer
Interface ServiceBroker

All Known Subinterfaces:
InternalServiceBroker
All Known Implementing Classes:
DefaultServiceBroker

public interface ServiceBroker

The service broker provides access to all services created by the modules.

The service broker instance can be accessed using the module manager's method ModuleManager.getServiceBroker().

Author:
Tim Wellhausen
See Also:
ServiceBroker

Method Summary
 java.util.List getActiveServices(java.lang.Class serviceType)
          Returns all services of the given type that are currently active.
 Service getService(java.lang.Class serviceType)
          Returns a Service instance of the given type that is currently active.
 java.util.List getServices(java.lang.Class serviceType)
          Returns all services of the given type that are registered.
 

Method Detail

getServices

public java.util.List getServices(java.lang.Class serviceType)
Returns all services of the given type that are registered.

Parameters:
serviceType - The type of service for which all registered instances should be returned.
Returns:
A list of service instances of the given type. The list might be empty.

getActiveServices

public java.util.List getActiveServices(java.lang.Class serviceType)
Returns all services of the given type that are currently active.

Parameters:
serviceType - The type of service for which all registered instances that are currently active should be returned.
Returns:
A list of service instances of the given type. The list might be empty.

getService

public Service getService(java.lang.Class serviceType)
Returns a Service instance of the given type that is currently active. If no such service exists, null is returned. If more than one active service of the given type currently exists, an arbitrary instance of these services is returned.

Parameters:
serviceType - The type of service for which a registered instance that is currently active should be returned.
Returns:
A Service instance, or null