This file is indexed.

/usr/share/doc/libosgi-core-java/api/org/osgi/framework/hooks/resolver/ResolverHook.html is in libosgi-core-java-doc 4.3.0-4.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (version 1.7.0_25) on Sun Aug 11 05:54:53 UTC 2013 -->
<title>ResolverHook</title>
<meta name="date" content="2013-08-11">
<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">
</head>
<body>
<script type="text/javascript"><!--
    if (location.href.indexOf('is-external=true') == -1) {
        parent.document.title="ResolverHook";
    }
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar_top">
<!--   -->
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
<!--   -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li>Prev Class</li>
<li><a href="../../../../../org/osgi/framework/hooks/resolver/ResolverHookFactory.html" title="interface in org.osgi.framework.hooks.resolver"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?org/osgi/framework/hooks/resolver/ResolverHook.html" target="_top">Frames</a></li>
<li><a href="ResolverHook.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
  allClassesLink = document.getElementById("allclasses_navbar_top");
  if(window==top) {
    allClassesLink.style.display = "block";
  }
  else {
    allClassesLink.style.display = "none";
  }
  //-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip-navbar_top">
<!--   -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">org.osgi.framework.hooks.resolver</div>
<h2 title="Interface ResolverHook" class="title">Interface ResolverHook</h2>
</div>
<div class="contentContainer">
<div class="description">
<ul class="blockList">
<li class="blockList">
<hr>
<br>
<pre>public interface <span class="strong">ResolverHook</span></pre>
<div class="block">OSGi Framework Resolver Hook instances are obtained from the OSGi
 <a href="../../../../../org/osgi/framework/hooks/resolver/ResolverHookFactory.html" title="interface in org.osgi.framework.hooks.resolver"><code>Framework Resolver Hook Factory</code></a> service.
 
 <p>
 A Resolver Hook instance is called by the framework during a resolve process.
 A resolver hook may influence the outcome of a resolve process by removing
 entries from shrinkable collections that are passed to the hook during a
 resolve process. A shrinkable collection is a <code>Collection</code> that
 supports all remove operations. Any other attempts to modify a shrinkable
 collection will result in an <code>UnsupportedOperationException</code> being
 thrown.
 
 <p>
 The following steps outline the way a framework uses the resolver hooks
 during a resolve process.
 <ol>
 <li>Collect a snapshot of registered resolver hook factories that will be
 called during the current resolve process. Any hook factories registered
 after the snapshot is taken must not be called during the current resolve
 process. A resolver hook factory contained in the snapshot may become
 unregistered during the resolve process. The framework should handle this and
 stop calling the resolver hook instance provided by the unregistered hook
 factory and the current resolve process must fail. If possible, an exception
 must be thrown to the caller of the API which triggered the resolve process.
 In cases where the the caller is not available a framework event of type
 error should be fired.</li>
 <li>For each registered hook factory call the
 <a href="../../../../../org/osgi/framework/hooks/resolver/ResolverHookFactory.html#begin(java.util.Collection)"><code>ResolverHookFactory.begin(Collection)</code></a> method to inform the hooks
 about a resolve process beginning and to obtain a Resolver Hook instance that
 will be used for the duration of the resolve process.</li>
 <li>Determine the collection of unresolved bundle revisions that may be
 considered for resolution during the current resolution process and place
 each of the bundle revisions in a shrinkable collection <code>R</code>. For each
 resolver hook call the <a href="../../../../../org/osgi/framework/hooks/resolver/ResolverHook.html#filterResolvable(java.util.Collection)"><code>filterResolvable(Collection)</code></a> method with the
 shrinkable collection <code>R</code>.</li>
 <li>The shrinkable collection <code>R</code> now contains all the unresolved
 bundle revisions that may end up as resolved at the end of the current
 resolve process. Any other bundle revisions that got removed from the
 shrinkable collection <code>R</code> must not end up as resolved at the end of the
 current resolve process.</li>
 <li>For each bundle revision <code>B</code> left in the shrinkable collection
 <code>R</code> that represents a singleton bundle do the following:<br/>
 Determine the collection of available capabilities that have a name space of
 <a href="../../../../../org/osgi/framework/wiring/BundleRevision.html#BUNDLE_NAMESPACE"><code>osgi.wiring.bundle</code></a>, are singletons,
 and have the same symbolic name as the singleton bundle revision <code>B</code>
 and place each of the matching capabilities into a shrinkable collection
 <code>S</code>.
 
 Remove the <a href="../../../../../org/osgi/framework/wiring/BundleRevision.html#BUNDLE_NAMESPACE"><code>osgi.wiring.bundle</code></a>
 capability provided by bundle revision <code>B</code> from shrinkable collection
 <code>S</code>. A singleton bundle cannot collide with itself.
 
 For each resolver hook call the
 <a href="../../../../../org/osgi/framework/hooks/resolver/ResolverHook.html#filterSingletonCollisions(org.osgi.framework.wiring.BundleCapability, java.util.Collection)"><code>filterSingletonCollisions(BundleCapability, Collection)</code></a> with the
 <a href="../../../../../org/osgi/framework/wiring/BundleRevision.html#BUNDLE_NAMESPACE"><code>osgi.wiring.bundle</code></a> capability
 provided by bundle revision <code>B</code> and the shrinkable collection <code>S</code>
 
 The shrinkable collection <code>S</code> now contains all singleton
 <a href="../../../../../org/osgi/framework/wiring/BundleRevision.html#BUNDLE_NAMESPACE"><code>osgi.wiring.bundle</code></a> capabilities that
 can influence the ability of bundle revision <code>B</code> to resolve.</li>
 <li>During a resolve process a framework is free to attempt to resolve any or
 all bundles contained in shrinkable collection <code>R</code>. For each bundle
 revision <code>B</code> left in the shrinkable collection <code>R</code> which the
 framework attempts to resolve the following steps must be followed:
 <p/>
 For each requirement <code>T</code> specified by bundle revision <code>B</code>
 determine the collection of capabilities that satisfy (or match) the
 requirement and place each matching capability into a shrinkable collection
 <code>C</code>. A capability is considered to match a particular requirement if
 its attributes satisfy a specified requirement and the requirer bundle has
 permission to access the capability.
 
 <p/>
 For each resolver hook call the
 <a href="../../../../../org/osgi/framework/hooks/resolver/ResolverHook.html#filterMatches(org.osgi.framework.wiring.BundleRequirement, java.util.Collection)"><code>filterMatches(BundleRequirement, Collection)</code></a> with the requirement
 <code>T</code> and the shrinkable collection <code>C</code>.
 
 <p/>
 The shrinkable collection <code>C</code> now contains all the capabilities that
 may be used to satisfy the requirement <code>T</code>. Any other capabilities that
 got removed from the shrinkable collection <code>C</code> must not be used to
 satisfy requirement <code>T</code>.</li>
 <li>For each resolver hook call the <a href="../../../../../org/osgi/framework/hooks/resolver/ResolverHook.html#end()"><code>end()</code></a> method to inform the hooks
 about a resolve process ending.</li>
 </ol>
 In all cases, the order in which the resolver hooks are called is the reverse
 compareTo ordering of their Service References. That is, the service with the
 highest ranking number must be called first. In cases where a shrinkable
 collection becomes empty the framework is required to call the remaining
 registered hooks.
 <p>
 Resolver hooks are low level. Implementations of the resolver hook must be
 careful not to create an unresolvable state which is very hard for a
 developer or a provisioner to diagnose. Resolver hooks also must not be
 allowed to start another synchronous resolve process (e.g. by calling
 <a href="../../../../../org/osgi/framework/Bundle.html#start()"><code>Bundle.start()</code></a> or <a href="../../../../../org/osgi/framework/wiring/FrameworkWiring.html#resolveBundles(java.util.Collection)"><code>FrameworkWiring.resolveBundles(Collection)</code></a>
 ). The framework must detect this and throw an <code>IllegalStateException</code>.</div>
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../../org/osgi/framework/hooks/resolver/ResolverHookFactory.html" title="interface in org.osgi.framework.hooks.resolver"><code>ResolverHookFactory</code></a></dd></dl>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method_summary">
<!--   -->
</a>
<h3>Method Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span>Methods</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/osgi/framework/hooks/resolver/ResolverHook.html#end()">end</a></strong>()</code>
<div class="block">This method is called once at the end of the resolve process.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/osgi/framework/hooks/resolver/ResolverHook.html#filterMatches(org.osgi.framework.wiring.BundleRequirement, java.util.Collection)">filterMatches</a></strong>(<a href="../../../../../org/osgi/framework/wiring/BundleRequirement.html" title="interface in org.osgi.framework.wiring">BundleRequirement</a>&nbsp;requirement,
             java.util.Collection&lt;<a href="../../../../../org/osgi/framework/wiring/BundleCapability.html" title="interface in org.osgi.framework.wiring">BundleCapability</a>&gt;&nbsp;candidates)</code>
<div class="block">Filter matches hook method.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/osgi/framework/hooks/resolver/ResolverHook.html#filterResolvable(java.util.Collection)">filterResolvable</a></strong>(java.util.Collection&lt;<a href="../../../../../org/osgi/framework/wiring/BundleRevision.html" title="interface in org.osgi.framework.wiring">BundleRevision</a>&gt;&nbsp;candidates)</code>
<div class="block">Filter resolvable candidates hook method.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/osgi/framework/hooks/resolver/ResolverHook.html#filterSingletonCollisions(org.osgi.framework.wiring.BundleCapability, java.util.Collection)">filterSingletonCollisions</a></strong>(<a href="../../../../../org/osgi/framework/wiring/BundleCapability.html" title="interface in org.osgi.framework.wiring">BundleCapability</a>&nbsp;singleton,
                         java.util.Collection&lt;<a href="../../../../../org/osgi/framework/wiring/BundleCapability.html" title="interface in org.osgi.framework.wiring">BundleCapability</a>&gt;&nbsp;collisionCandidates)</code>
<div class="block">Filter singleton collisions hook method.</div>
</td>
</tr>
</table>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method_detail">
<!--   -->
</a>
<h3>Method Detail</h3>
<a name="filterResolvable(java.util.Collection)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>filterResolvable</h4>
<pre>void&nbsp;filterResolvable(java.util.Collection&lt;<a href="../../../../../org/osgi/framework/wiring/BundleRevision.html" title="interface in org.osgi.framework.wiring">BundleRevision</a>&gt;&nbsp;candidates)</pre>
<div class="block">Filter resolvable candidates hook method.  This method may be called
 multiple times during a single resolve process.
 This method can filter the collection of candidates by removing 
 potential candidates.  Removing a candidate will prevent the candidate
 from resolving during the current resolve process.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>candidates</code> - the collection of resolvable candidates available during
 a resolve process.</dd></dl>
</li>
</ul>
<a name="filterSingletonCollisions(org.osgi.framework.wiring.BundleCapability, java.util.Collection)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>filterSingletonCollisions</h4>
<pre>void&nbsp;filterSingletonCollisions(<a href="../../../../../org/osgi/framework/wiring/BundleCapability.html" title="interface in org.osgi.framework.wiring">BundleCapability</a>&nbsp;singleton,
                             java.util.Collection&lt;<a href="../../../../../org/osgi/framework/wiring/BundleCapability.html" title="interface in org.osgi.framework.wiring">BundleCapability</a>&gt;&nbsp;collisionCandidates)</pre>
<div class="block">Filter singleton collisions hook method. This method is called during the
 resolve process for the specified singleton. The specified singleton
 represents a singleton capability and the specified collection represent
 a collection of singleton capabilities which are considered collision
 candidates. The singleton capability and the collection of collision
 candidates must all use the same name space.
 <p>
 Currently only capabilities with the name space of
 <a href="../../../../../org/osgi/framework/wiring/BundleRevision.html#BUNDLE_NAMESPACE"><code>osgi.wiring.bundle</code></a> can be
 singletons. In that case all the collision candidates have the name space
 of <a href="../../../../../org/osgi/framework/wiring/BundleRevision.html#BUNDLE_NAMESPACE"><code>osgi.wiring.bundle</code></a>, are
 singletons, and have the same symbolic name as the specified singleton
 capability.
 <p>
 In the future, capabilities in other name spaces may support the
 singleton concept. Hook implementations should be prepared to receive
 calls to this method for capabilities in name spaces other than
 <a href="../../../../../org/osgi/framework/wiring/BundleRevision.html#BUNDLE_NAMESPACE"><code>osgi.wiring.bundle</code></a>.
 <p>
 This method can filter the list of collision candidates by removing
 potential collisions. Removing a collision candidate will allow the
 specified singleton to resolve regardless of the resolution state of the
 removed collision candidate.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>singleton</code> - the singleton involved in a resolve process</dd><dd><code>collisionCandidates</code> - a collection of singleton collision candidates</dd></dl>
</li>
</ul>
<a name="filterMatches(org.osgi.framework.wiring.BundleRequirement, java.util.Collection)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>filterMatches</h4>
<pre>void&nbsp;filterMatches(<a href="../../../../../org/osgi/framework/wiring/BundleRequirement.html" title="interface in org.osgi.framework.wiring">BundleRequirement</a>&nbsp;requirement,
                 java.util.Collection&lt;<a href="../../../../../org/osgi/framework/wiring/BundleCapability.html" title="interface in org.osgi.framework.wiring">BundleCapability</a>&gt;&nbsp;candidates)</pre>
<div class="block">Filter matches hook method. This method is called during the resolve process for the 
 specified requirement.  The collection of candidates match the specified requirement.
 This method can filter the collection of matching candidates by removing candidates from 
 the collection.  Removing a candidate will prevent the resolve process from choosing the 
 removed candidate to satisfy the requirement.
 <p>
 All of the candidates will have the same name space and will 
 match the specified requirement.
 <p>
 If the Java Runtime Environment supports permissions then the collection of 
 candidates will only contain candidates for which the requirer has permission to
 access.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>requirement</code> - the requirement to filter candidates for</dd><dd><code>candidates</code> - a collection of candidates that match the requirement</dd></dl>
</li>
</ul>
<a name="end()">
<!--   -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>end</h4>
<pre>void&nbsp;end()</pre>
<div class="block">This method is called once at the end of the resolve process.
 After the end method is called the resolve process has ended.
 The framework must not hold onto this resolver hook instance
 after end has been called.</div>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar_bottom">
<!--   -->
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
<!--   -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li>Prev Class</li>
<li><a href="../../../../../org/osgi/framework/hooks/resolver/ResolverHookFactory.html" title="interface in org.osgi.framework.hooks.resolver"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?org/osgi/framework/hooks/resolver/ResolverHook.html" target="_top">Frames</a></li>
<li><a href="ResolverHook.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
  allClassesLink = document.getElementById("allclasses_navbar_bottom");
  if(window==top) {
    allClassesLink.style.display = "block";
  }
  else {
    allClassesLink.style.display = "none";
  }
  //-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip-navbar_bottom">
<!--   -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</body>
</html>