|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.ucsb.nceas.morpho.plugins.ServiceController
The ServiceController handles the registration of services and service lookup for other objects. This is a singleton class because only one instance is ever needed. Plugins that need to utilize a service should call getServiceProvider(). The single instance of ServiceController can be obtained statically using getInstance().
Method Summary | |
void |
addService(java.lang.Class serviceInterface,
ServiceProvider provider)
This method is called by plugins to register a particular service that the plugin can perform. |
boolean |
checkForService(java.lang.Class serviceInterface)
This method is called by plugins to determine if a particular service has been registered and is available. |
static ServiceController |
getInstance()
Get the single instance of the ServiceController, creating it if needed. |
ServiceProvider |
getServiceProvider(java.lang.Class serviceInterface)
This method is called by plugins to get a reference to an object that implements a particular interface |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public static ServiceController getInstance()
public ServiceProvider getServiceProvider(java.lang.Class serviceInterface) throws ServiceNotHandledException
serviceInterface
- the service interface desired
ServiceNotHandledException
- Description of Exceptionpublic void addService(java.lang.Class serviceInterface, ServiceProvider provider) throws ServiceExistsException
serviceInterface
- the interface representing this serviceprovider
- a reference to the object providing the service
ServiceExistsException
public boolean checkForService(java.lang.Class serviceInterface)
serviceInterface
- the service interface desired
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |