|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface EntityProviderListener<T extends EntityProvider>
This allows a developer to be notified whenever a provider is registered,
it will also ensure that it calls the listener method for any providers that are already registered
when it is first registered if desired
Usage:
Just implement this class and use EntityProviderManager#registerNotifier(EntityProviderNotifier) to
register it with the system. Whenever an entity provider is registered the run(EntityProvider) method
is called. You can limit the calls to your listener using the getPrefixFilter() and getCapabilityFilter().
Note that you can return a null prefix filter and capability filter but it means you will get called for
every registration of every provider. You will want to use the EntityProvider for the generics
to receive every capability type.
| Method Summary | |
|---|---|
Class<T> |
getCapabilityFilter()
|
String |
getPrefixFilter()
|
void |
run(T provider)
This method will be called once per each provider that is registered with the system depending on the filter methods in this class WARNING: Do not hold onto (cache) the provider returned to you by this method, if you need to use it again later you should fetch it using the methods in EntityProviderManager
like EntityProviderManager.getProviderByPrefix(String) and
EntityProviderManager.getProviderByPrefixAndCapability(String, Class) among others,
you can cache the prefix name and capabilities if you need to |
| Method Detail |
|---|
String getPrefixFilter()
Class<T> getCapabilityFilter()
void run(T provider)
EntityProviderManager
like EntityProviderManager.getProviderByPrefix(String) and
EntityProviderManager.getProviderByPrefixAndCapability(String, Class) among others,
you can cache the prefix name and capabilities if you need to
provider - the currently registered provider that you are being notified about
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||