This file is indexed.

/usr/share/doc/libosgi-compendium-java/api/org/osgi/application/ApplicationContext.html is in libosgi-compendium-java-doc 4.3.0-1.

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
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.6.0_23) on Mon Nov 21 22:05:28 UTC 2011 -->
<TITLE>
ApplicationContext
</TITLE>

<META NAME="date" CONTENT="2011-11-21">

<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style">

<SCRIPT type="text/javascript">
function windowTitle()
{
    if (location.href.indexOf('is-external=true') == -1) {
        parent.document.title="ApplicationContext";
    }
}
</SCRIPT>
<NOSCRIPT>
</NOSCRIPT>

</HEAD>

<BODY BGCOLOR="white" onload="windowTitle();">
<HR>


<!-- ========= START OF TOP NAVBAR ======= -->
<A NAME="navbar_top"><!-- --></A>
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
  <TR ALIGN="center" VALIGN="top">
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  </TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>

<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;PREV CLASS&nbsp;
&nbsp;<A HREF="../../../org/osgi/application/ApplicationServiceEvent.html" title="class in org.osgi.application"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../../index.html?org/osgi/application/ApplicationContext.html" target="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="ApplicationContext.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
&nbsp;<SCRIPT type="text/javascript">
  <!--
  if(window==top) {
    document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
  }
  //-->
</SCRIPT>
<NOSCRIPT>
  <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>


</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_top"></A>
<!-- ========= END OF TOP NAVBAR ========= -->

<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
org.osgi.application</FONT>
<BR>
Interface ApplicationContext</H2>
<HR>
<DL>
<DT><PRE>public interface <B>ApplicationContext</B></DL>
</PRE>

<P>
<code>ApplicationContext</code> is the access point for an OSGi-aware application
 to the features of the OSGi Service Platform. Each application instance will
 have its own <code>ApplicationContext</code> instance, which will not be reused
 after destroying the corresponding application instance.
 <p>
 Application instances can obtain their <code>ApplicationContext</code> using the
 <A HREF="../../../org/osgi/application/Framework.html#getApplicationContext(java.lang.Object)"><CODE>Framework.getApplicationContext(Object)</CODE></A> method.
 <p>
 The lifecycle of an <code>ApplicationContext</code> instance is bound to the
 lifecycle of the corresponding application instance. The
 <code>ApplicationContext</code> becomes available when the application is started
 and it is invalidated when the application instance is stopped (i.e. the
 "stop" method of the application activator object returned). All method calls
 (except <A HREF="../../../org/osgi/application/ApplicationContext.html#getApplicationId()"><CODE>getApplicationId()</CODE></A> and <A HREF="../../../org/osgi/application/ApplicationContext.html#getInstanceId()"><CODE>getInstanceId()</CODE></A>) to an
 invalidated context object result an <code>IllegalStateException</code>.
<P>

<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../org/osgi/application/Framework.html" title="class in org.osgi.application"><CODE>Framework</CODE></A></DL>
<HR>

<P>

<!-- ========== METHOD SUMMARY =========== -->

<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Method Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/osgi/application/ApplicationContext.html#addServiceListener(org.osgi.application.ApplicationServiceListener, java.lang.String)">addServiceListener</A></B>(<A HREF="../../../org/osgi/application/ApplicationServiceListener.html" title="interface in org.osgi.application">ApplicationServiceListener</A>&nbsp;listener,
                   java.lang.String&nbsp;referenceName)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Adds the specified <A HREF="../../../org/osgi/application/ApplicationServiceListener.html" title="interface in org.osgi.application"><CODE>ApplicationServiceListener</CODE></A> object to this context
 application instance's list of listeners.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/osgi/application/ApplicationContext.html#addServiceListener(org.osgi.application.ApplicationServiceListener, java.lang.String[])">addServiceListener</A></B>(<A HREF="../../../org/osgi/application/ApplicationServiceListener.html" title="interface in org.osgi.application">ApplicationServiceListener</A>&nbsp;listener,
                   java.lang.String[]&nbsp;referenceNames)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Adds the specified <A HREF="../../../org/osgi/application/ApplicationServiceListener.html" title="interface in org.osgi.application"><CODE>ApplicationServiceListener</CODE></A> object to this context
 application instance's list of listeners.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/osgi/application/ApplicationContext.html#getApplicationId()">getApplicationId</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This method return the identifier of the corresponding application type.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/osgi/application/ApplicationContext.html#getInstanceId()">getInstanceId</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This method returns the identifier of the corresponding application
 instance.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.util.Map</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/osgi/application/ApplicationContext.html#getServiceProperties(java.lang.Object)">getServiceProperties</A></B>(java.lang.Object&nbsp;serviceObject)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Application can query the service properties of a service object
 it is bound to.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.util.Map</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/osgi/application/ApplicationContext.html#getStartupParameters()">getStartupParameters</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the startup parameters specified when calling the
 <code>org.osgi.service.application.ApplicationDescriptor#launch(Map)</code>
 method.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.lang.Object</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/osgi/application/ApplicationContext.html#locateService(java.lang.String)">locateService</A></B>(java.lang.String&nbsp;referenceName)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This method returns the service object for the specified
 <code>referenceName</code>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.lang.Object[]</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/osgi/application/ApplicationContext.html#locateServices(java.lang.String)">locateServices</A></B>(java.lang.String&nbsp;referenceName)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This method returns the service objects for the specified
 <code>referenceName</code>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;org.osgi.framework.ServiceRegistration</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/osgi/application/ApplicationContext.html#registerService(java.lang.String[], java.lang.Object, java.util.Dictionary)">registerService</A></B>(java.lang.String[]&nbsp;clazzes,
                java.lang.Object&nbsp;service,
                java.util.Dictionary&nbsp;properties)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Registers the specified service object with the specified properties
 under the specified class names into the Framework.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;org.osgi.framework.ServiceRegistration</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/osgi/application/ApplicationContext.html#registerService(java.lang.String, java.lang.Object, java.util.Dictionary)">registerService</A></B>(java.lang.String&nbsp;clazz,
                java.lang.Object&nbsp;service,
                java.util.Dictionary&nbsp;properties)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Registers the specified service object with the specified properties
 under the specified class name with the Framework.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/osgi/application/ApplicationContext.html#removeServiceListener(org.osgi.application.ApplicationServiceListener)">removeServiceListener</A></B>(<A HREF="../../../org/osgi/application/ApplicationServiceListener.html" title="interface in org.osgi.application">ApplicationServiceListener</A>&nbsp;listener)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Removes the specified <A HREF="../../../org/osgi/application/ApplicationServiceListener.html" title="interface in org.osgi.application"><CODE>ApplicationServiceListener</CODE></A> object from this
 context application instances's list of listeners.</TD>
</TR>
</TABLE>
&nbsp;
<P>

<!-- ============ METHOD DETAIL ========== -->

<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Method Detail</B></FONT></TH>
</TR>
</TABLE>

<A NAME="addServiceListener(org.osgi.application.ApplicationServiceListener, java.lang.String)"><!-- --></A><H3>
addServiceListener</H3>
<PRE>
void <B>addServiceListener</B>(<A HREF="../../../org/osgi/application/ApplicationServiceListener.html" title="interface in org.osgi.application">ApplicationServiceListener</A>&nbsp;listener,
                        java.lang.String&nbsp;referenceName)
                        throws java.lang.IllegalArgumentException</PRE>
<DL>
<DD>Adds the specified <A HREF="../../../org/osgi/application/ApplicationServiceListener.html" title="interface in org.osgi.application"><CODE>ApplicationServiceListener</CODE></A> object to this context
 application instance's list of listeners. The specified <code>referenceName</code> is a 
 reference name specified in the descriptor of the corresponding application. The registered
 <code>listener</code> will only receive the <A HREF="../../../org/osgi/application/ApplicationServiceEvent.html" title="class in org.osgi.application"><CODE>ApplicationServiceEvent</CODE></A>s related to the referred service.
 <p>
 If the <code>listener</code> was already added, calling this method will overwrite the previous
 registration.
 <p>
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>listener</CODE> - The <A HREF="../../../org/osgi/application/ApplicationServiceListener.html" title="interface in org.osgi.application"><CODE>ApplicationServiceListener</CODE></A> to be added. It must
            not be <code>null</code><DD><CODE>referenceName</CODE> - the reference name of a service from the descriptor of the corresponding
            application. It must not be <code>null</code>.
<DT><B>Throws:</B>
<DD><CODE>java.lang.IllegalStateException</CODE> - If this context application instance has stopped.
<DD><CODE>java.lang.NullPointerException</CODE> - If <code>listener</code> or <code>referenceName</code>
             is <code>null</code>
<DD><CODE>java.lang.IllegalArgumentException</CODE> - If there is no service in the
             application descriptor with the specified <code>referenceName</code>.</DL>
</DD>
</DL>
<HR>

<A NAME="addServiceListener(org.osgi.application.ApplicationServiceListener, java.lang.String[])"><!-- --></A><H3>
addServiceListener</H3>
<PRE>
void <B>addServiceListener</B>(<A HREF="../../../org/osgi/application/ApplicationServiceListener.html" title="interface in org.osgi.application">ApplicationServiceListener</A>&nbsp;listener,
                        java.lang.String[]&nbsp;referenceNames)
                        throws java.lang.IllegalArgumentException</PRE>
<DL>
<DD>Adds the specified <A HREF="../../../org/osgi/application/ApplicationServiceListener.html" title="interface in org.osgi.application"><CODE>ApplicationServiceListener</CODE></A> object to this context
 application instance's list of listeners. The <code>referenceNames</code> parameter is an 
 array of reference name specified in the descriptor of the corresponding application. The registered
 <code>listener</code> will only receive the <A HREF="../../../org/osgi/application/ApplicationServiceEvent.html" title="class in org.osgi.application"><CODE>ApplicationServiceEvent</CODE></A>s related to the referred 
 services.
 <p>
 If the <code>listener</code> was already added, calling this method will overwrite the previous
 registration.
 <p>
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>listener</CODE> - The <A HREF="../../../org/osgi/application/ApplicationServiceListener.html" title="interface in org.osgi.application"><CODE>ApplicationServiceListener</CODE></A> to be added. It must not
            be <code>null</code><DD><CODE>referenceNames</CODE> - and array of service reference names from the descriptor of the corresponding
            application. It must not be <code>null</code> and it must not be empty.
<DT><B>Throws:</B>
<DD><CODE>java.lang.IllegalStateException</CODE> - If this context application instance has stopped.
<DD><CODE>java.lang.NullPointerException</CODE> - If <code>listener</code> or <code>referenceNames</code>
             is <code>null</code>
<DD><CODE>java.lang.IllegalArgumentException</CODE> - If <code>referenceNames</code> array is empty or it 
    contains unknown references</DL>
</DD>
</DL>
<HR>

<A NAME="removeServiceListener(org.osgi.application.ApplicationServiceListener)"><!-- --></A><H3>
removeServiceListener</H3>
<PRE>
void <B>removeServiceListener</B>(<A HREF="../../../org/osgi/application/ApplicationServiceListener.html" title="interface in org.osgi.application">ApplicationServiceListener</A>&nbsp;listener)</PRE>
<DL>
<DD>Removes the specified <A HREF="../../../org/osgi/application/ApplicationServiceListener.html" title="interface in org.osgi.application"><CODE>ApplicationServiceListener</CODE></A> object from this
 context application instances's list of listeners.
 <p>
 If <code>listener</code> is not contained in this context application
 instance's list of listeners, this method does nothing.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>listener</CODE> - The <A HREF="../../../org/osgi/application/ApplicationServiceListener.html" title="interface in org.osgi.application"><CODE>ApplicationServiceListener</CODE></A> object to be removed.
<DT><B>Throws:</B>
<DD><CODE>java.lang.IllegalStateException</CODE> - If this context application instance has stopped.</DL>
</DD>
</DL>
<HR>

<A NAME="getInstanceId()"><!-- --></A><H3>
getInstanceId</H3>
<PRE>
java.lang.String <B>getInstanceId</B>()</PRE>
<DL>
<DD>This method returns the identifier of the corresponding application
 instance. This identifier is guaranteed to be unique within the scope of
 the device.
 
 Note: this method can safely be called on an invalid
 <code>ApplicationContext</code> as well.
<P>
<DD><DL>

<DT><B>Returns:</B><DD>the unique identifier of the corresponding application instance<DT><B>See Also:</B><DD><A HREF="../../../org/osgi/service/application/ApplicationHandle.html#getInstanceId()"><CODE>ApplicationHandle.getInstanceId()</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="getApplicationId()"><!-- --></A><H3>
getApplicationId</H3>
<PRE>
java.lang.String <B>getApplicationId</B>()</PRE>
<DL>
<DD>This method return the identifier of the corresponding application type. This identifier
 is the same for the different instances of the same application but it is different for
 different application type.
 <p>
 Note: this method can safely be called on an invalid 
 <code>ApplicationContext</code> as well.
<P>
<DD><DL>

<DT><B>Returns:</B><DD>the identifier of the application type.<DT><B>See Also:</B><DD><A HREF="../../../org/osgi/service/application/ApplicationDescriptor.html#getApplicationId()"><CODE>ApplicationDescriptor.getApplicationId()</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="locateService(java.lang.String)"><!-- --></A><H3>
locateService</H3>
<PRE>
java.lang.Object <B>locateService</B>(java.lang.String&nbsp;referenceName)</PRE>
<DL>
<DD>This method returns the service object for the specified
 <code>referenceName</code>. If the cardinality of the reference is
 0..n or 1..n and multiple services are bound to the reference, the
 service with the highest ranking (as specified in its
 <CODE>Constants.SERVICE_RANKING</CODE> property) is returned. If there
 is a tie in ranking, the service with the lowest service ID (as specified
 in its <CODE>Constants.SERVICE_ID</CODE> property); that is, the
 service that was registered first is returned.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>referenceName</CODE> - The name of a reference as specified in a reference element in
            this context applications's description. It must not be <code>null</code>
<DT><B>Returns:</B><DD>A service object for the referenced service or <code>null</code>
         if the reference cardinality is 0..1 or 0..n and no bound service
         is available.
<DT><B>Throws:</B>
<DD><CODE>java.lang.NullPointerException</CODE> - If <code>referenceName</code> is <code>null</code>.
<DD><CODE>java.lang.IllegalArgumentException</CODE> - If there is no service in the
             application descriptor with the specified <code>referenceName</code>.
<DD><CODE>java.lang.IllegalStateException</CODE> - If this context application instance has stopped.</DL>
</DD>
</DL>
<HR>

<A NAME="locateServices(java.lang.String)"><!-- --></A><H3>
locateServices</H3>
<PRE>
java.lang.Object[] <B>locateServices</B>(java.lang.String&nbsp;referenceName)</PRE>
<DL>
<DD>This method returns the service objects for the specified
 <code>referenceName</code>.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>referenceName</CODE> - The name of a reference as specified in a reference element in
            this context applications's description. It must not be 
            <code>null</code>.
<DT><B>Returns:</B><DD>An array of service object for the referenced service or
         <code>null</code> if the reference cardinality is 0..1 or 0..n
         and no bound service is available.
<DT><B>Throws:</B>
<DD><CODE>java.lang.NullPointerException</CODE> - If <code>referenceName</code> is <code>null</code>.
<DD><CODE>java.lang.IllegalArgumentException</CODE> - If there is no service in the
             application descriptor with the specified <code>referenceName</code>.
<DD><CODE>java.lang.IllegalStateException</CODE> - If this context application instance has stopped.</DL>
</DD>
</DL>
<HR>

<A NAME="getStartupParameters()"><!-- --></A><H3>
getStartupParameters</H3>
<PRE>
java.util.Map <B>getStartupParameters</B>()</PRE>
<DL>
<DD>Returns the startup parameters specified when calling the
 <code>org.osgi.service.application.ApplicationDescriptor#launch(Map)</code>
 method.
 <p>
 Startup arguments can be specified as name, value pairs. The name must be
 of type <CODE>String</CODE>, which must not be <code>null</code> or empty
 <CODE>String</CODE> (<code>""</code>), the value can be any object
 including <code>null</code>.
<P>
<DD><DL>

<DT><B>Returns:</B><DD>a <CODE>Map</CODE> containing the startup arguments. It can
         be <code>null</code>.
<DT><B>Throws:</B>
<DD><CODE>java.lang.IllegalStateException</CODE> - If this context application
         instance has stopped.</DL>
</DD>
</DL>
<HR>

<A NAME="getServiceProperties(java.lang.Object)"><!-- --></A><H3>
getServiceProperties</H3>
<PRE>
java.util.Map <B>getServiceProperties</B>(java.lang.Object&nbsp;serviceObject)</PRE>
<DL>
<DD>Application can query the service properties of a service object
 it is bound to. Application gets bound to a service object when
 it first obtains a reference to the service by calling 
 <code>locateService</code> or <code>locateServices</code> methods.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>serviceObject</CODE> - A service object the application is bound to.
    It must not be null.
<DT><B>Returns:</B><DD>The service properties associated with the specified service
    object.
<DT><B>Throws:</B>
<DD><CODE>java.lang.NullPointerException</CODE> - if the specified <code>serviceObject</code>
    is <code>null</code>
<DD><CODE>java.lang.IllegalArgumentException</CODE> - if the application is not
    bound to the specified service object or it is not a service
    object at all.
<DD><CODE>java.lang.IllegalStateException</CODE> - If this context application instance has stopped.</DL>
</DD>
</DL>
<HR>

<A NAME="registerService(java.lang.String[], java.lang.Object, java.util.Dictionary)"><!-- --></A><H3>
registerService</H3>
<PRE>
org.osgi.framework.ServiceRegistration <B>registerService</B>(java.lang.String[]&nbsp;clazzes,
                                                       java.lang.Object&nbsp;service,
                                                       java.util.Dictionary&nbsp;properties)</PRE>
<DL>
<DD>Registers the specified service object with the specified properties
 under the specified class names into the Framework. A
 <CODE>ServiceRegistration</CODE> object is returned. The
 <CODE>ServiceRegistration</CODE> object is for the private
 use of the application registering the service and should not be shared
 with other applications. The registering application is defined to be the
 context application. Bundles can locate the service by using either the
 <CODE>BundleContext.getServiceReferences(String, String)</CODE>
 or <CODE>BundleContext.getServiceReference(String)</CODE>
 method. Other applications can locate this service by using
 <A HREF="../../../org/osgi/application/ApplicationContext.html#locateService(java.lang.String)"><CODE>locateService(String)</CODE></A> or <A HREF="../../../org/osgi/application/ApplicationContext.html#locateServices(java.lang.String)"><CODE>locateServices(String)</CODE></A> method,
 if they declared their dependence on the registered service.
 
 <p>
 An application can register a service object that implements the
 <CODE>ServiceFactory</CODE> interface to have more
 flexibility in providing service objects to other applications or
 bundles.
 
 <p>
 The following steps are required to register a service:
 <ol>
 <li>If <code>service</code> is not a <code>ServiceFactory</code>, an
 <code>IllegalArgumentException</code> is thrown if <code>service</code> is not an
 <code>instanceof</code> all the classes named.
 <li>The Framework adds these service properties to the specified
 <code>Dictionary</code> (which may be <code>null</code>): a property named
 <CODE>Constants.SERVICE_ID</CODE> identifying the
 registration number of the service and a property named
 <CODE>Constants.OBJECTCLASS</CODE> containing all the
 specified classes. If any of these properties have already been specified
 by the registering bundle, their values will be overwritten by the
 Framework.
 <li>The service is added to the Framework service registry and may now be
 used by others.
 <li>A service event of type
 <CODE>ServiceEvent.REGISTERED</CODE> is fired. This event
 triggers the corresponding <A HREF="../../../org/osgi/application/ApplicationServiceEvent.html" title="class in org.osgi.application"><CODE>ApplicationServiceEvent</CODE></A> to be
 delivered to the applications that registered the appropriate listener.
 <li>A <code>ServiceRegistration</code> object for this registration is
 returned.
 </ol>
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>clazzes</CODE> - The class names under which the service can be located.
        The class names in this array will be stored in the service's
        properties under the key
        <CODE>Constants.OBJECTCLASS</CODE>. This parameter
        must not be <code>null</code>.<DD><CODE>service</CODE> - The service object or a <code>ServiceFactory</code> object.<DD><CODE>properties</CODE> - The properties for this service. The keys in the
        properties object must all be <code>String</code> objects. See
        <CODE>Constants</CODE> for a list of standard
        service property keys. Changes should not be made to this object
        after calling this method. To update the service's properties the
        <CODE>ServiceRegistration.setProperties(Dictionary)</CODE>
        method must be called. The set of properties may be <code>null</code>
        if the service has no properties.
<DT><B>Returns:</B><DD>A <CODE>ServiceRegistration</CODE> object for use
         by the application registering the service to update the
         service's properties or to unregister the service.
<DT><B>Throws:</B>
<DD><CODE>java.lang.IllegalArgumentException</CODE> - If one of the following is
         true:
         <ul>
         <li><code>service</code> is <code>null</code>. <li><code>service</code> is not a
         <code>ServiceFactory</code> object and is not an instance of all the
         named classes in <code>clazzes</code>. <li><code>properties</code> contains
         case variants of the same key name.
         </ul>
<DD><CODE>java.lang.NullPointerException</CODE> - if <code>clazzes</code> is <code>null</code>
<DD><CODE>java.lang.SecurityException</CODE> - If the caller does not have the
         <code>ServicePermission</code> to register the service for all the
         named classes and the Java Runtime Environment supports
         permissions.
<DD><CODE>java.lang.IllegalStateException</CODE> - If this ApplicationContext is no
         longer valid.<DT><B>See Also:</B><DD><CODE>BundleContext.registerService(java.lang.String[],
      java.lang.Object, java.util.Dictionary)</CODE>, 
<CODE>ServiceRegistration</CODE>, 
<CODE>ServiceFactory</CODE></DL>
</DD>
</DL>
<HR>

<A NAME="registerService(java.lang.String, java.lang.Object, java.util.Dictionary)"><!-- --></A><H3>
registerService</H3>
<PRE>
org.osgi.framework.ServiceRegistration <B>registerService</B>(java.lang.String&nbsp;clazz,
                                                       java.lang.Object&nbsp;service,
                                                       java.util.Dictionary&nbsp;properties)</PRE>
<DL>
<DD>Registers the specified service object with the specified properties
 under the specified class name with the Framework.
 
 <p>
 This method is otherwise identical to
 <A HREF="../../../org/osgi/application/ApplicationContext.html#registerService(java.lang.String[], java.lang.Object, java.util.Dictionary)"><CODE>registerService(java.lang.String[], java.lang.Object,
 java.util.Dictionary)</CODE></A> and is provided as a convenience when
 <code>service</code> will only be registered under a single class name.
 Note that even in this case the value of the service's
 <CODE>Constants.OBJECTCLASS</CODE> property will be an array of strings,
 rather than just a single string.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>clazz</CODE> - The class name under which the service can be located. It
        must not be <code>null</code><DD><CODE>service</CODE> - The service object or a <code>ServiceFactory</code>
        object.<DD><CODE>properties</CODE> - The properties for this service.
<DT><B>Returns:</B><DD>A <code>ServiceRegistration</code> object for use by the application
         registering the service to update the service's properties or to
         unregister the service.
<DT><B>Throws:</B>
<DD><CODE>java.lang.IllegalArgumentException</CODE> - If one of the following is
         true:
         <ul>
         <li><code>service</code> is <code>null</code>.
         <li><code>service</code> is not a <code>ServiceFactory</code>
         object and is not an instance of the named class in
         <code>clazz</code>.
         <li><code>properties</code> contains case variants of the same
         key name.
         </ul>
<DD><CODE>java.lang.NullPointerException</CODE> - if <code>clazz</code> is <code>null</code>
<DD><CODE>java.lang.SecurityException</CODE> - If the caller does not have the
         <code>ServicePermission</code> to register the service 
         the named class and the Java Runtime Environment supports
         permissions.
<DD><CODE>java.lang.IllegalStateException</CODE> - If this ApplicationContext is no
         longer valid.<DT><B>See Also:</B><DD><A HREF="../../../org/osgi/application/ApplicationContext.html#registerService(java.lang.String[], java.lang.Object, java.util.Dictionary)"><CODE>registerService(java.lang.String[], java.lang.Object,
      java.util.Dictionary)</CODE></A></DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>


<!-- ======= START OF BOTTOM NAVBAR ====== -->
<A NAME="navbar_bottom"><!-- --></A>
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
  <TR ALIGN="center" VALIGN="top">
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  </TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>

<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;PREV CLASS&nbsp;
&nbsp;<A HREF="../../../org/osgi/application/ApplicationServiceEvent.html" title="class in org.osgi.application"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../../index.html?org/osgi/application/ApplicationContext.html" target="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="ApplicationContext.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
&nbsp;<SCRIPT type="text/javascript">
  <!--
  if(window==top) {
    document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
  }
  //-->
</SCRIPT>
<NOSCRIPT>
  <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>


</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<!-- ======== END OF BOTTOM NAVBAR ======= -->

<HR>

</BODY>
</HTML>