接口 CollisionHook
-
@ConsumerType public interface CollisionHookOSGi Framework Bundle Collision Hook Service.If the framework was launched with the
org.osgi.framework.bsnversionframework launching property set tomanaged, then all registered collision hook services will be called during framework bundle install and update operations to determine if an install or update operation will result in a bundle symbolic name and version collision.- 作者:
- $Id: b05e0c3819aff6df35c2ec034242596d04f53408 $
-
-
字段概要
字段 修饰符和类型 字段 说明 static intINSTALLINGSpecifies a bundle install operation is being performed.static intUPDATINGSpecifies a bundle update operation is being performed.
-
方法概要
所有方法 实例方法 抽象方法 修饰符和类型 方法 说明 voidfilterCollisions(int operationType, Bundle target, java.util.Collection<Bundle> collisionCandidates)Filter bundle collisions hook method.
-
-
-
方法详细资料
-
filterCollisions
void filterCollisions(int operationType, Bundle target, java.util.Collection<Bundle> collisionCandidates)Filter bundle collisions hook method. This method is called during the install or update operation. The operation type will beinstallingorupdating. Depending on the operation type the target bundle and the collision candidate collection are the following:installing- The target is the bundle associated with theBundleContextused to call one of theinstallmethods. The collision candidate collection contains the existing bundles installed which have the same symbolic name and version as the bundle being installed.updating- The target is the bundle used to call one of theupdatemethods. The collision candidate collection contains the existing bundles installed which have the same symbolic name and version as the content the target bundle is being updated to.
- 参数:
operationType- The operation type. Must be the value ofinstallingorupdating.target- The target bundle used to determine what collision candidates to filter.collisionCandidates- The collection of collision candidates. The collection supports all the optionalCollectionoperations exceptaddandaddAll. Attempting to add to the collection will result in anUnsupportedOperationException. The collection is not synchronized.
-
-