Package org.apache.felix.framework
Class HookRegistry
java.lang.Object
org.apache.felix.framework.HookRegistry
This registry holds all services implementing one of the hook services
-
Field Summary
FieldsModifier and TypeFieldDescriptionno need to use a sync'ed structure as this is read only.private final Map<String, SortedSet<ServiceReference<?>>> private final WeakHashMap<ServiceReference<?>, ServiceReference<?>> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static voidaddHookClass(Class<?> c) voidaddHooks(String[] classNames, Object svcObj, ServiceReference<?> ref) Check and add the service to the set of hooksvoidblackListHook(ServiceReference<?> sr) <S> Set<ServiceReference<S>> Return the sorted set of hooks(package private) static booleanprivate booleanbooleanvoidremoveHooks(ServiceReference<?> ref) Remove the service hooksvoidupdateHooks(ServiceReference<?> ref) Update the service ranking for a hook
-
Field Details
-
HOOK_CLASSES
no need to use a sync'ed structure as this is read only. -
m_allHooks
-
m_blackList
-
-
Constructor Details
-
HookRegistry
public HookRegistry()
-
-
Method Details
-
addHookClass
-
isHook
-
isHook
-
addHooks
Check and add the service to the set of hooks- Parameters:
classNames- The service namessvcObj- The service objectref- The service reference
-
updateHooks
Update the service ranking for a hook- Parameters:
ref- The service reference
-
removeHooks
Remove the service hooks- Parameters:
ref- The service reference
-
getHooks
Return the sorted set of hooks- Parameters:
hookClass- The hook class- Returns:
- The sorted set - the set might be empty
-
isHookBlackListed
-
blackListHook
-