|
Nuxeo Enterprise Platform 5.4 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ServiceProvider
A service provider is responsible to lookup services.
Method Summary | |
---|---|
void |
destroy()
The provider is no more needed. |
ServiceManager |
getManager()
Gets the service manager on which this provider is attached, or null if none. |
java.lang.Object |
getService(java.lang.Class<?> serviceClass,
java.lang.String bindingKey)
Gets the service instance given its interface class. |
void |
setManager(ServiceManager manager)
Attaches the provider to a service manager. |
Method Detail |
---|
void setManager(ServiceManager manager)
manager
-
java.lang.IllegalStateException
- if the provider is already attached to a managerServiceManager getManager()
void destroy()
java.lang.Object getService(java.lang.Class<?> serviceClass, java.lang.String bindingKey)
If the lookup succeeds and the provider is attached to a service manager it may use the binding key to register a service binding on the manager so that the next time the same service is requested it will be picked up from the manager cache.
Note that the binding key should be used to lookup the service. Usually this key is the service class name but can be different when querying a named service (in this case it will be serviceClass + '@' + serviceName).
If implementors doesn't support named services then they can use the serviceClass to perform the lookup.
serviceClass
- the interface of the servicebindingKey
- the binding key to use when caching bindings
|
Nuxeo Enterprise Platform 5.4 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |