/usr/share/doc/libosgi-compendium-java/api/org/osgi/service/subsystem/Subsystem.html is in libosgi-compendium-java-doc 5.0.0-3.
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 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<title>Subsystem</title>
<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="Subsystem";
}
//-->
</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/service/subsystem/Subsystem.State.html" title="enum in org.osgi.service.subsystem"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?org/osgi/service/subsystem/Subsystem.html" target="_top">Frames</a></li>
<li><a href="Subsystem.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: </li>
<li><a href="#nested_class_summary">Nested</a> | </li>
<li>Field | </li>
<li>Constr | </li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail: </li>
<li>Field | </li>
<li>Constr | </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.service.subsystem</div>
<h2 title="Interface Subsystem" class="title">Interface Subsystem</h2>
</div>
<div class="contentContainer">
<div class="description">
<ul class="blockList">
<li class="blockList">
<hr>
<br>
<pre>public interface <span class="strong">Subsystem</span></pre>
<div class="block">A subsystem is a collection of resources constituting a logical, possibly
isolated, unit of functionality.
<p>
A subsystem may be <i>scoped</i> or <i>unscoped</i>. Scoped subsystems are
isolated by implicit or explicit sharing policies. Unscoped subsystems are
not isolated and, therefore, have no sharing policy. There are three standard
<a href="../../../../org/osgi/service/subsystem/SubsystemConstants.html#SUBSYSTEM_TYPE"><code>types</code></a> of subsystems.
<ul>
<li><a href="../../../../org/osgi/service/subsystem/SubsystemConstants.html#SUBSYSTEM_TYPE_APPLICATION"><code>Application</code></a> - An
implicitly scoped subsystem. Nothing is exported, and imports are computed
based on any unsatisfied content requirements.</li>
<li><a href="../../../../org/osgi/service/subsystem/SubsystemConstants.html#SUBSYSTEM_TYPE_COMPOSITE"><code>Composite</code></a> - An
explicitly scoped subsystem. The sharing policy is defined by metadata within
the subsystem archive.</li>
<li><a href="../../../../org/osgi/service/subsystem/SubsystemConstants.html#SUBSYSTEM_TYPE_FEATURE"><code>Feature</code></a> - An unscoped
subsystem.</li>
</ul>
Conceptually, a subsystem may be thought of as existing in an isolated region
along with zero or more other subsystems. Each region has one and only one
scoped subsystem, which dictates the sharing policy. The region may, however,
have many unscoped subsystems. It is, therefore, possible to have shared
constituents across multiple subsystems within a region. Associated with each
region is a bundle whose context may be <a href="../../../../org/osgi/service/subsystem/Subsystem.html#getBundleContext()"><code>retrieved</code></a>
from any subsystem within that region. This context may be used to monitor
activity occurring within the region.
<p>
A subsystem may have <a href="../../../../org/osgi/service/subsystem/Subsystem.html#getChildren()"><code>children</code></a> and, unless it's the
root subsystem, must have at least one <a href="../../../../org/osgi/service/subsystem/Subsystem.html#getParents()"><code>parent</code></a>.
Subsystems become children of the subsystem in which they are installed.
Unscoped subsystems have more than one parent if they are installed in more
than one subsystem within the same region. The subsystem graph may be thought
of as an <a
href="http://en.wikipedia.org/wiki/Directed_acyclic_graph">acyclic
digraph</a> with one and only one source vertex, which is the root subsystem.
The edges have the child as the head and parent as the tail.
<p>
A subsystem has several identifiers.
<ul>
<li><a href="../../../../org/osgi/service/subsystem/Subsystem.html#getLocation()"><code>Location</code></a> - An identifier specified by the client
as part of installation. It is guaranteed to be unique within the same
framework.</li>
<li><a href="../../../../org/osgi/service/subsystem/Subsystem.html#getSubsystemId()"><code>ID</code></a> - An identifier generated by the
implementation as part of installation. It is guaranteed to be unique within
the same framework.</li>
<li><a href="../../../../org/osgi/service/subsystem/Subsystem.html#getSymbolicName()"><code>Symbolic Name</code></a>/<a href="../../../../org/osgi/service/subsystem/Subsystem.html#getVersion()"><code>Version</code></a> -
The combination of symbolic name and version is guaranteed to be unique
within the same region. Although <a href="../../../../org/osgi/service/subsystem/Subsystem.html#getType()"><code>type</code></a> is not formally part
of the identity, two subsystems with the same symbolic names and versions but
different types are not considered to be equal.</li>
</ul>
A subsystem has a well-defined <a href="../../../../org/osgi/service/subsystem/Subsystem.State.html" title="enum in org.osgi.service.subsystem"><code>life cycle</code></a>. Which stage a
subsystem is in may be obtained from the subsystem's <a href="../../../../org/osgi/service/subsystem/Subsystem.html#getState()"><code>state</code></a> and is dependent on which life cycle operation is currently active or
was last invoked.
<p>
A subsystem archive is a ZIP file having an <code>.esa</code> extension and
containing metadata describing the subsystem. The form of the metadata may be
a subsystem or deployment manifest, as well as any content resource files.
The manifests are optional and will be computed if not present. The subsystem
manifest headers may be <a href="../../../../org/osgi/service/subsystem/Subsystem.html#getSubsystemHeaders(java.util.Locale)"><code>retrieved</code></a> in raw
or localized forms. There are five standard
<code>types</code> of resources that
may be included in a subsystem.
<ul>
<li><code>Bundle</code> - A bundle that is not a
fragment.</li>
<li><code>Fragment</code> - A fragment bundle.</li>
<li><a href="../../../../org/osgi/service/subsystem/SubsystemConstants.html#SUBSYSTEM_TYPE_APPLICATION"><code>Application
Subsystem</code></a> - An application subsystem.</li>
<li><a href="../../../../org/osgi/service/subsystem/SubsystemConstants.html#SUBSYSTEM_TYPE_COMPOSITE"><code>Composite Subsystem</code></a> -
A composite subsystem.</li>
<li><a href="../../../../org/osgi/service/subsystem/SubsystemConstants.html#SUBSYSTEM_TYPE_FEATURE"><code>Feature Subsystem</code></a> - A
feature subsystem.</li>
</ul>
Resources contained by a subsystem are called <a href="../../../../org/osgi/service/subsystem/Subsystem.html#getConstituents()"><code>constituents</code></a>. There are several ways a resource may become a constituent of
a subsystem:
<ul>
<li>A resource is listed as part of the subsystem's content.</li>
<li>A subsystem resource is a child of the subsystem.</li>
<li>The subsystem has a provision policy of accept dependencies.</li>
<li>A bundle resource is installed using the region bundle context.</li>
<li>A bundle resource is installed using the bundle context of another
resource contained by the subsystem.</li>
</ul>
<p>
In addition to invoking one of the install methods, a subsystem instance may
be obtained through the service registry. Each installed subsystem has a
corresponding service registration. A subsystem service has the following
properties.
<ul>
<li><a href="../../../../org/osgi/service/subsystem/SubsystemConstants.html#SUBSYSTEM_ID_PROPERTY"><code>ID</code></a> - The ID of the
subsystem.</li>
<li><a href="../../../../org/osgi/service/subsystem/SubsystemConstants.html#SUBSYSTEM_SYMBOLICNAME_PROPERTY"><code>Symbolic Name</code></a>
- The symbolic name of the subsystem.</li>
<li><a href="../../../../org/osgi/service/subsystem/SubsystemConstants.html#SUBSYSTEM_VERSION_PROPERTY"><code>Version</code></a> - The
version of the subsystem.</li>
<li><a href="../../../../org/osgi/service/subsystem/SubsystemConstants.html#SUBSYSTEM_TYPE_PROPERTY"><code>Type</code></a> - The type of the
subsystem.</li>
<li><a href="../../../../org/osgi/service/subsystem/SubsystemConstants.html#SUBSYSTEM_STATE_PROPERTY"><code>State</code></a> - The state of
the subsystem.</li>
</ul>
<p>
Because a subsystem must be used to install other subsystems, a root
subsystem is provided as a starting point. The root subsystem may only be
obtained as a service and has the following characteristics.
<ul>
<li>The ID is <code>0</code>.</li>
<li>The symbolic name is
<a href="../../../../org/osgi/service/subsystem/SubsystemConstants.html#ROOT_SUBSYSTEM_SYMBOLICNAME"><code>org.osgi.service.subsystem.root</code></a>.</li>
<li>The version matches this specification's version.</li>
<li>It has no parents.</li>
<li>All existing bundles, including the system and subsystem implementation
bundles, are constituents.</li>
<li>The type is <a href="../../../../org/osgi/service/subsystem/SubsystemConstants.html#SUBSYSTEM_TYPE_APPLICATION"><code>osgi.subsystem.application</code></a> with no imports.</li>
<li>The provision policy is
<a href="../../../../org/osgi/service/subsystem/SubsystemConstants.html#PROVISION_POLICY_ACCEPT_DEPENDENCIES"><code>acceptDependencies</code></a>.</li>
</ul></div>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ======== NESTED CLASS SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="nested_class_summary">
<!-- -->
</a>
<h3>Nested Class Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Nested Class Summary table, listing nested classes, and an explanation">
<caption><span>Nested Classes</span><span class="tabEnd"> </span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Interface and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static class </code></td>
<td class="colLast"><code><strong><a href="../../../../org/osgi/service/subsystem/Subsystem.State.html" title="enum in org.osgi.service.subsystem">Subsystem.State</a></strong></code>
<div class="block">An enumeration of the possible states of a subsystem.</div>
</td>
</tr>
</table>
</li>
</ul>
<!-- ========== 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"> </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>org.osgi.framework.BundleContext</code></td>
<td class="colLast"><code><strong><a href="../../../../org/osgi/service/subsystem/Subsystem.html#getBundleContext()">getBundleContext</a></strong>()</code>
<div class="block">Returns the bundle context of the region within which this subsystem
resides.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>java.util.Collection<<a href="../../../../org/osgi/service/subsystem/Subsystem.html" title="interface in org.osgi.service.subsystem">Subsystem</a>></code></td>
<td class="colLast"><code><strong><a href="../../../../org/osgi/service/subsystem/Subsystem.html#getChildren()">getChildren</a></strong>()</code>
<div class="block">Returns the child subsystems of this subsystem.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>java.util.Collection<org.osgi.resource.Resource></code></td>
<td class="colLast"><code><strong><a href="../../../../org/osgi/service/subsystem/Subsystem.html#getConstituents()">getConstituents</a></strong>()</code>
<div class="block">Returns the constituent resources of this subsystem.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>java.lang.String</code></td>
<td class="colLast"><code><strong><a href="../../../../org/osgi/service/subsystem/Subsystem.html#getLocation()">getLocation</a></strong>()</code>
<div class="block">Returns the location identifier of this subsystem.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>java.util.Collection<<a href="../../../../org/osgi/service/subsystem/Subsystem.html" title="interface in org.osgi.service.subsystem">Subsystem</a>></code></td>
<td class="colLast"><code><strong><a href="../../../../org/osgi/service/subsystem/Subsystem.html#getParents()">getParents</a></strong>()</code>
<div class="block">Returns the parent subsystems of this subsystem.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../../org/osgi/service/subsystem/Subsystem.State.html" title="enum in org.osgi.service.subsystem">Subsystem.State</a></code></td>
<td class="colLast"><code><strong><a href="../../../../org/osgi/service/subsystem/Subsystem.html#getState()">getState</a></strong>()</code>
<div class="block">Returns the current state of this subsystem.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>java.util.Map<java.lang.String,java.lang.String></code></td>
<td class="colLast"><code><strong><a href="../../../../org/osgi/service/subsystem/Subsystem.html#getSubsystemHeaders(java.util.Locale)">getSubsystemHeaders</a></strong>(java.util.Locale locale)</code>
<div class="block">Returns the headers for this subsystem's subsystem manifest.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>long</code></td>
<td class="colLast"><code><strong><a href="../../../../org/osgi/service/subsystem/Subsystem.html#getSubsystemId()">getSubsystemId</a></strong>()</code>
<div class="block">Returns the identifier of this subsystem.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>java.lang.String</code></td>
<td class="colLast"><code><strong><a href="../../../../org/osgi/service/subsystem/Subsystem.html#getSymbolicName()">getSymbolicName</a></strong>()</code>
<div class="block">Returns the symbolic name of this subsystem.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>java.lang.String</code></td>
<td class="colLast"><code><strong><a href="../../../../org/osgi/service/subsystem/Subsystem.html#getType()">getType</a></strong>()</code>
<div class="block">Returns the <a href="../../../../org/osgi/service/subsystem/SubsystemConstants.html#SUBSYSTEM_TYPE"><code>type</code></a> of this
subsystem.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>org.osgi.framework.Version</code></td>
<td class="colLast"><code><strong><a href="../../../../org/osgi/service/subsystem/Subsystem.html#getVersion()">getVersion</a></strong>()</code>
<div class="block">Returns the <a href="../../../../org/osgi/service/subsystem/SubsystemConstants.html#SUBSYSTEM_VERSION"><code>version</code></a> of this
subsystem.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../../org/osgi/service/subsystem/Subsystem.html" title="interface in org.osgi.service.subsystem">Subsystem</a></code></td>
<td class="colLast"><code><strong><a href="../../../../org/osgi/service/subsystem/Subsystem.html#install(java.lang.String)">install</a></strong>(java.lang.String location)</code>
<div class="block">Installs a subsystem from the specified location identifier.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../org/osgi/service/subsystem/Subsystem.html" title="interface in org.osgi.service.subsystem">Subsystem</a></code></td>
<td class="colLast"><code><strong><a href="../../../../org/osgi/service/subsystem/Subsystem.html#install(java.lang.String,%20java.io.InputStream)">install</a></strong>(java.lang.String location,
java.io.InputStream content)</code>
<div class="block">Installs a subsystem from the specified content.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../org/osgi/service/subsystem/Subsystem.html#start()">start</a></strong>()</code>
<div class="block">Starts this subsystem.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../org/osgi/service/subsystem/Subsystem.html#stop()">stop</a></strong>()</code>
<div class="block">Stops this subsystem.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../org/osgi/service/subsystem/Subsystem.html#uninstall()">uninstall</a></strong>()</code>
<div class="block">Uninstalls this subsystem.</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="getBundleContext()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getBundleContext</h4>
<pre>org.osgi.framework.BundleContext getBundleContext()</pre>
<div class="block">Returns the bundle context of the region within which this subsystem
resides.
<p>
The bundle context offers the same perspective of any resource contained
by a subsystem within the region. It may be used, for example, to monitor
events internal to the region as well as external events visible to the
region. All subsystems within the same region have the same bundle
context. If this subsystem is in a state where the bundle context would
be invalid, <code>null</code> is returned.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>The bundle context of the region within which this subsystem
resides or <code>null</code> if this subsystem's state is in
<a href="../../../../org/osgi/service/subsystem/Subsystem.State.html#INSTALL_FAILED"><code>INSTALL_FAILED</code></a>,
<a href="../../../../org/osgi/service/subsystem/Subsystem.State.html#UNINSTALLED"><code>UNINSTALLED</code></a>.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code>java.lang.SecurityException</code> - If the caller does not have the appropriate
<a href="../../../../org/osgi/service/subsystem/SubsystemPermission.html" title="class in org.osgi.service.subsystem"><code>SubsystemPermission</code></a>[this,CONTEXT], and the runtime
supports permissions.</dd></dl>
</li>
</ul>
<a name="getChildren()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getChildren</h4>
<pre>java.util.Collection<<a href="../../../../org/osgi/service/subsystem/Subsystem.html" title="interface in org.osgi.service.subsystem">Subsystem</a>> getChildren()</pre>
<div class="block">Returns the child subsystems of this subsystem.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>The child subsystems of this subsystem. The returned collection
is an unmodifiable snapshot of all subsystems that are installed
in this subsystem. The collection will be empty if no subsystems
are installed in this subsystem.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code>java.lang.IllegalStateException</code> - If this subsystem's state is in
<a href="../../../../org/osgi/service/subsystem/Subsystem.State.html#INSTALL_FAILED"><code>INSTALL_FAILED</code></a>,
<a href="../../../../org/osgi/service/subsystem/Subsystem.State.html#UNINSTALLED"><code>UNINSTALLED</code></a>.</dd></dl>
</li>
</ul>
<a name="getSubsystemHeaders(java.util.Locale)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getSubsystemHeaders</h4>
<pre>java.util.Map<java.lang.String,java.lang.String> getSubsystemHeaders(java.util.Locale locale)</pre>
<div class="block">Returns the headers for this subsystem's subsystem manifest.
<p>
Each key in the map is a header name and the value of the key is the
corresponding header value. Because header names are case-insensitive,
the methods of the map must treat the keys in a case-insensitive manner.
If the header name is not found, <code>null</code> is returned. Both original
and derived headers will be included in the map.
<p>
This method must continue to return the headers while this subsystem is
in the <a href="../../../../org/osgi/service/subsystem/Subsystem.State.html#INSTALL_FAILED"><code>INSTALL_FAILED</code></a> or
<a href="../../../../org/osgi/service/subsystem/Subsystem.State.html#UNINSTALLED"><code>UNINSTALLED</code></a> states.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>locale</code> - The locale for which translations are desired. The header
values are translated according to the specified locale. If the
specified locale is <code>null</code> or not supported, the raw values
are returned. If the translation for a particular header is not
found, the raw value is returned.</dd>
<dt><span class="strong">Returns:</span></dt><dd>The headers for this subsystem's subsystem manifest. The returned
map is unmodifiable.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code>java.lang.SecurityException</code> - If the caller does not have the appropriate
<a href="../../../../org/osgi/service/subsystem/SubsystemPermission.html" title="class in org.osgi.service.subsystem"><code>SubsystemPermission</code></a>[this,METADATA], and the runtime
supports permissions.</dd></dl>
</li>
</ul>
<a name="getLocation()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getLocation</h4>
<pre>java.lang.String getLocation()</pre>
<div class="block">Returns the location identifier of this subsystem.
<p>
The location identifier is the <code>location</code> that was passed to the
<a href="../../../../org/osgi/service/subsystem/Subsystem.html#install(java.lang.String,%20java.io.InputStream)"><code>install</code></a> method of the
<a href="../../../../org/osgi/service/subsystem/Subsystem.html#getParents()"><code>parent</code></a> subsystem. It is unique within the
framework.
<p>
This method must continue to return this subsystem's headers while this
subsystem is in the <a href="../../../../org/osgi/service/subsystem/Subsystem.State.html#INSTALL_FAILED"><code>INSTALL_FAILED</code></a> or
<a href="../../../../org/osgi/service/subsystem/Subsystem.State.html#UNINSTALLED"><code>UNINSTALLED</code></a> states.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>The location identifier of this subsystem.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code>java.lang.SecurityException</code> - If the caller does not have the appropriate
<a href="../../../../org/osgi/service/subsystem/SubsystemPermission.html" title="class in org.osgi.service.subsystem"><code>SubsystemPermission</code></a>[this,METADATA], and the runtime
supports permissions.</dd></dl>
</li>
</ul>
<a name="getParents()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getParents</h4>
<pre>java.util.Collection<<a href="../../../../org/osgi/service/subsystem/Subsystem.html" title="interface in org.osgi.service.subsystem">Subsystem</a>> getParents()</pre>
<div class="block">Returns the parent subsystems of this subsystem.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>The parent subsystems of this subsystem. The returned collection
is an unmodifiable snapshot of all subsystems in which this
subsystem is installed. The collection will be empty for the root
subsystem; otherwise, it must contain at least one parent. Scoped
subsystems always have only one parent. Unscoped subsystems may
have multiple parents.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code>java.lang.IllegalStateException</code> - If this subsystem's state is in
<a href="../../../../org/osgi/service/subsystem/Subsystem.State.html#INSTALL_FAILED"><code>INSTALL_FAILED</code></a>,
<a href="../../../../org/osgi/service/subsystem/Subsystem.State.html#UNINSTALLED"><code>UNINSTALLED</code></a>.</dd></dl>
</li>
</ul>
<a name="getConstituents()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getConstituents</h4>
<pre>java.util.Collection<org.osgi.resource.Resource> getConstituents()</pre>
<div class="block">Returns the constituent resources of this subsystem.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>The constituent resources of this subsystem. The returned
collection is an unmodifiable snapshot of the constituent
resources of this subsystem. If this subsystem has no
constituents, the collection will be empty.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code>java.lang.IllegalStateException</code> - If this subsystem's state is in
<a href="../../../../org/osgi/service/subsystem/Subsystem.State.html#INSTALL_FAILED"><code>INSTALL_FAILED</code></a>,
<a href="../../../../org/osgi/service/subsystem/Subsystem.State.html#UNINSTALLED"><code>UNINSTALLED</code></a>.</dd></dl>
</li>
</ul>
<a name="getState()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getState</h4>
<pre><a href="../../../../org/osgi/service/subsystem/Subsystem.State.html" title="enum in org.osgi.service.subsystem">Subsystem.State</a> getState()</pre>
<div class="block">Returns the current state of this subsystem.
<p>
This method must continue to return this subsystem's state while this
subsystem is in the <a href="../../../../org/osgi/service/subsystem/Subsystem.State.html#INSTALL_FAILED"><code>INSTALL_FAILED</code></a> or
<a href="../../../../org/osgi/service/subsystem/Subsystem.State.html#UNINSTALLED"><code>UNINSTALLED</code></a> states.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>The current state of this subsystem.</dd></dl>
</li>
</ul>
<a name="getSubsystemId()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getSubsystemId</h4>
<pre>long getSubsystemId()</pre>
<div class="block">Returns the identifier of this subsystem.
<p>
The identifier is a monotonically increasing, non-negative integer
automatically generated at installation time and guaranteed to be unique
within the framework. The identifier of the root subsystem is zero.
<p>
This method must continue to return this subsystem's identifier while
this subsystem is in the <a href="../../../../org/osgi/service/subsystem/Subsystem.State.html#INSTALL_FAILED"><code>INSTALL_FAILED</code></a> or
<a href="../../../../org/osgi/service/subsystem/Subsystem.State.html#UNINSTALLED"><code>UNINSTALLED</code></a> states.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>The identifier of this subsystem.</dd></dl>
</li>
</ul>
<a name="getSymbolicName()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getSymbolicName</h4>
<pre>java.lang.String getSymbolicName()</pre>
<div class="block">Returns the symbolic name of this subsystem.
<p>
The subsystem symbolic name conforms to the same grammar rules as the
bundle symbolic name and is derived from one of the following, in order.
<ul>
<li>The value of the <a href="../../../../org/osgi/service/subsystem/SubsystemConstants.html#SUBSYSTEM_SYMBOLICNAME"><code>Subsystem-SymbolicName</code></a> header, if specified.</li>
<li>The subsystem URI if passed as the <code>location</code> along with the
<code>content</code> to the <a href="../../../../org/osgi/service/subsystem/Subsystem.html#install(java.lang.String,%20java.io.InputStream)"><code>install</code></a>
method.</li>
<li>Optionally generated in an implementation specific way.</li>
</ul>
The combination of subsystem symbolic name and <a href="../../../../org/osgi/service/subsystem/Subsystem.html#getVersion()"><code>version</code></a> is unique within a region. The symbolic name of the root
subsystem is <a href="../../../../org/osgi/service/subsystem/SubsystemConstants.html#ROOT_SUBSYSTEM_SYMBOLICNAME"><code>org.osgi.service.subsystem.root</code></a>.
<p>
This method must continue to return this subsystem's symbolic name while
this subsystem is in the <a href="../../../../org/osgi/service/subsystem/Subsystem.State.html#INSTALL_FAILED"><code>INSTALL_FAILED</code></a> or
<a href="../../../../org/osgi/service/subsystem/Subsystem.State.html#UNINSTALLED"><code>UNINSTALLED</code></a> states.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>The symbolic name of this subsystem.</dd></dl>
</li>
</ul>
<a name="getType()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getType</h4>
<pre>java.lang.String getType()</pre>
<div class="block">Returns the <a href="../../../../org/osgi/service/subsystem/SubsystemConstants.html#SUBSYSTEM_TYPE"><code>type</code></a> of this
subsystem.
<p>
This method must continue to return this subsystem's type while this
subsystem is in the <a href="../../../../org/osgi/service/subsystem/Subsystem.State.html#INSTALL_FAILED"><code>INSTALL_FAILED</code></a> or
<a href="../../../../org/osgi/service/subsystem/Subsystem.State.html#UNINSTALLED"><code>UNINSTALLED</code></a> states.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>The type of this subsystem.</dd></dl>
</li>
</ul>
<a name="getVersion()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getVersion</h4>
<pre>org.osgi.framework.Version getVersion()</pre>
<div class="block">Returns the <a href="../../../../org/osgi/service/subsystem/SubsystemConstants.html#SUBSYSTEM_VERSION"><code>version</code></a> of this
subsystem.
<p>
The subsystem version conforms to the same grammar rules as the bundle
version and is derived from one of the following, in order.
<ul>
<li>The value of the <a href="../../../../org/osgi/service/subsystem/SubsystemConstants.html#SUBSYSTEM_VERSION"><code>Subsystem-Version</code></a> header, if specified.</li>
<li>The subsystem URI if passed as the <code>location</code> along with the
<code>content</code> to the <a href="../../../../org/osgi/service/subsystem/Subsystem.html#install(java.lang.String,%20java.io.InputStream)"><code>install</code></a>
method.</li>
<li>Defaults to <code>0.0.0</code>.</li>
</ul>
The combination of subsystem <a href="../../../../org/osgi/service/subsystem/Subsystem.html#getSymbolicName()"><code>symbolic name</code></a> and
version is unique within a region. The version of the root subsystem
matches this specification's version.
<p>
This method must continue to return this subsystem's version while this
subsystem is in the <a href="../../../../org/osgi/service/subsystem/Subsystem.State.html#INSTALL_FAILED"><code>INSTALL_FAILED</code></a> or
<a href="../../../../org/osgi/service/subsystem/Subsystem.State.html#UNINSTALLED"><code>UNINSTALLED</code></a> states.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>The version of this subsystem.</dd></dl>
</li>
</ul>
<a name="install(java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>install</h4>
<pre><a href="../../../../org/osgi/service/subsystem/Subsystem.html" title="interface in org.osgi.service.subsystem">Subsystem</a> install(java.lang.String location)</pre>
<div class="block">Installs a subsystem from the specified location identifier.
<p>
This method performs the same function as calling
<a href="../../../../org/osgi/service/subsystem/Subsystem.html#install(java.lang.String,%20java.io.InputStream)"><code>install(String, InputStream)</code></a> with the specified location
identifier and <code>null</code> as the content.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>location</code> - The location identifier of the subsystem to install.</dd>
<dt><span class="strong">Returns:</span></dt><dd>The installed subsystem.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code>java.lang.IllegalStateException</code> - If this subsystem's state is in
<a href="../../../../org/osgi/service/subsystem/Subsystem.State.html#INSTALLING"><code>INSTALLING</code></a>, <a href="../../../../org/osgi/service/subsystem/Subsystem.State.html#INSTALL_FAILED"><code>INSTALL_FAILED</code></a>, <a href="../../../../org/osgi/service/subsystem/Subsystem.State.html#UNINSTALLING"><code>UNINSTALLING</code></a>,
<a href="../../../../org/osgi/service/subsystem/Subsystem.State.html#UNINSTALLED"><code>UNINSTALLED</code></a>.</dd>
<dd><code><a href="../../../../org/osgi/service/subsystem/SubsystemException.html" title="class in org.osgi.service.subsystem">SubsystemException</a></code> - If the installation failed.</dd>
<dd><code>java.lang.SecurityException</code> - If the caller does not have the appropriate
<a href="../../../../org/osgi/service/subsystem/SubsystemPermission.html" title="class in org.osgi.service.subsystem"><code>SubsystemPermission</code></a>[installed subsystem,LIFECYCLE], and
the runtime supports permissions.</dd><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../org/osgi/service/subsystem/Subsystem.html#install(java.lang.String,%20java.io.InputStream)"><code>install(String, InputStream)</code></a></dd></dl>
</li>
</ul>
<a name="install(java.lang.String, java.io.InputStream)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>install</h4>
<pre><a href="../../../../org/osgi/service/subsystem/Subsystem.html" title="interface in org.osgi.service.subsystem">Subsystem</a> install(java.lang.String location,
java.io.InputStream content)</pre>
<div class="block">Installs a subsystem from the specified content.
<p>
The specified location will be used as an identifier of the subsystem.
Every installed subsystem is uniquely identified by its location, which
is typically in the form of a URI. If the specified location conforms to
the <code>subsystem-uri</code> grammar, the required symbolic name and
optional version information will be used as default values.
<p>
If the specified content is <code>null</code>, a new input stream must be
created from which to read the subsystem by interpreting, in an
implementation dependent manner, the specified location.
<p>
A subsystem installation must be persistent. That is, an installed
subsystem must remain installed across Framework and VM restarts.
<p>
All references to changing the state of this subsystem include both
changing the state of the subsystem object as well as the state property
of the subsystem service registration.
<p>
The following steps are required to install a subsystem.
<ol>
<li>If an installed subsystem with the specified location identifier
already exists, return the installed subsystem.</li>
<li>Read the specified content in order to determine the symbolic name,
version, and type of the installing subsystem. If an error occurs while
reading the content, an installation failure results.</li>
<li>If an installed subsystem with the same symbolic name and version
already exists within this subsystem's region, complete the installation
with one of the following.
<ul>
<li>If the installing and installed subsystems' types are not equal, an
installation failure results.</li>
<li>If the installing and installed subsystems' types are equal, and the
installed subsystem is already a child of this subsystem, return the
installed subsystem.</li>
<li>If the installing and installed subsystems' types are equal, and the
installed subsystem is not already a child of this subsystem, add the
installed subsystem as a child of this subsystem, increment the installed
subsystem's reference count by one, and return the installed subsystem.</li>
</ul>
<li>Create a new subsystem based on the specified location and content.</li>
<li>If the subsystem is scoped, install and start a new region context
bundle.</li>
<li>Change the state to <a href="../../../../org/osgi/service/subsystem/Subsystem.State.html#INSTALLING"><code>INSTALLING</code></a> and register
a new subsystem service.</li>
<li>Discover the subsystem's content resources. If any mandatory resource
is missing, an installation failure results.</li>
<li>Discover the dependencies required by the content resources. If any
mandatory dependency is missing, an installation failure results.</li>
<li>Using a framework <code>ResolverHook</code>, disable runtime resolution
for the resources.</li>
<li>For each resource, increment the reference count by one. If the
reference count is one, install the resource. If an error occurs while
installing a resource, an install failure results with that error as the
cause.</li>
<li>If the subsystem is scoped, enable the import sharing policy.</li>
<li>Enable runtime resolution for the resources.</li>
<li>Change the state of the subsystem to <a href="../../../../org/osgi/service/subsystem/Subsystem.State.html#INSTALLED"><code>INSTALLED</code></a>.</li>
<li>Return the new subsystem.</li>
</ol>
<p>
Implementations should be sensitive to the potential for long running
operations and periodically check the current thread for interruption. An
interrupted thread should result in a <a href="../../../../org/osgi/service/subsystem/SubsystemException.html" title="class in org.osgi.service.subsystem"><code>SubsystemException</code></a> with an
InterruptedException as the cause and be treated as an installation
failure.
<p>
All installation failure flows include the following, in order.
<ol>
<li>Change the state to <a href="../../../../org/osgi/service/subsystem/Subsystem.State.html#INSTALL_FAILED"><code>INSTALL_FAILED</code></a>.</li>
<li>Change the state to <a href="../../../../org/osgi/service/subsystem/Subsystem.State.html#UNINSTALLING"><code>UNINSTALLING</code></a>.</li>
<li>All content and dependencies which may have been installed by the
installing process must be uninstalled.</li>
<li>Change the state to <a href="../../../../org/osgi/service/subsystem/Subsystem.State.html#UNINSTALLED"><code>UNINSTALLED</code></a>.</li>
<li>Unregister the subsystem service.</li>
<li>If the subsystem is a scoped subsystem then, uninstall the region
context bundle.</li>
<li>Throw a <a href="../../../../org/osgi/service/subsystem/SubsystemException.html" title="class in org.osgi.service.subsystem"><code>SubsystemException</code></a> with the cause of the installation
failure.</li>
</ol></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>location</code> - The location identifier of the subsystem to be installed.</dd><dd><code>content</code> - The input stream from which this subsystem will be read or
<code>null</code> to indicate the input stream must be created from the
specified location identifier. The input stream will always be
closed when this method completes, even if an exception is thrown.</dd>
<dt><span class="strong">Returns:</span></dt><dd>The installed subsystem.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code>java.lang.IllegalStateException</code> - If this subsystem's state is in
<a href="../../../../org/osgi/service/subsystem/Subsystem.State.html#INSTALLING"><code>INSTALLING</code></a>, <a href="../../../../org/osgi/service/subsystem/Subsystem.State.html#INSTALL_FAILED"><code>INSTALL_FAILED</code></a>, <a href="../../../../org/osgi/service/subsystem/Subsystem.State.html#UNINSTALLING"><code>UNINSTALLING</code></a>,
<a href="../../../../org/osgi/service/subsystem/Subsystem.State.html#UNINSTALLED"><code>UNINSTALLED</code></a>.</dd>
<dd><code><a href="../../../../org/osgi/service/subsystem/SubsystemException.html" title="class in org.osgi.service.subsystem">SubsystemException</a></code> - If the installation failed.</dd>
<dd><code>java.lang.SecurityException</code> - If the caller does not have the appropriate
<a href="../../../../org/osgi/service/subsystem/SubsystemPermission.html" title="class in org.osgi.service.subsystem"><code>SubsystemPermission</code></a>[installed subsystem,LIFECYCLE], and
the runtime supports permissions.</dd></dl>
</li>
</ul>
<a name="start()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>start</h4>
<pre>void start()</pre>
<div class="block">Starts this subsystem.
<p>
The following table shows which actions are associated with each state.
An action of <code>Wait</code> means this method will block until a state
transition occurs, upon which the new state will be evaluated in order to
determine how to proceed. If a state transition does not occur in a
reasonable time while waiting then no action is taken and a
SubsystemException is thrown to indicate the subsystem was unable to be
started. An action of <code>Return</code> means this method returns
immediately without taking any other action.
</p>
<table>
<tr>
<th>State</th>
<th width="4">Action</th>
</tr>
<tr>
<td><a href="../../../../org/osgi/service/subsystem/Subsystem.State.html#INSTALLING"><code>INSTALLING</code></a></td>
<td><code>Wait</code></td>
</tr>
<tr>
<td><a href="../../../../org/osgi/service/subsystem/Subsystem.State.html#INSTALLED"><code>INSTALLED</code></a></td>
<td><code>Resolve</code>, <code>Start</code></td>
</tr>
<tr>
<td><a href="../../../../org/osgi/service/subsystem/Subsystem.State.html#INSTALL_FAILED"><code>INSTALL_FAILED</code></a></td>
<td><code>IllegalStateException</code></td>
</tr>
<tr>
<td><a href="../../../../org/osgi/service/subsystem/Subsystem.State.html#RESOLVING"><code>RESOLVING</code></a></td>
<td><code>Wait</code></td>
</tr>
<tr>
<td><a href="../../../../org/osgi/service/subsystem/Subsystem.State.html#RESOLVED"><code>RESOLVED</code></a></td>
<td><code>Start</code></td>
</tr>
<tr>
<td><a href="../../../../org/osgi/service/subsystem/Subsystem.State.html#STARTING"><code>STARTING</code></a></td>
<td><code>Wait</code></td>
</tr>
<tr>
<td><a href="../../../../org/osgi/service/subsystem/Subsystem.State.html#ACTIVE"><code>ACTIVE</code></a></td>
<td><code>Return</code></td>
</tr>
<tr>
<td><a href="../../../../org/osgi/service/subsystem/Subsystem.State.html#STOPPING"><code>STOPPING</code></a></td>
<td><code>Wait</code></td>
</tr>
<tr>
<td><a href="../../../../org/osgi/service/subsystem/Subsystem.State.html#UNINSTALLING"><code>UNINSTALLING</code></a></td>
<td><code>IllegalStateException</code></td>
</tr>
<tr>
<td><a href="../../../../org/osgi/service/subsystem/Subsystem.State.html#UNINSTALLED"><code>UNINSTALLED</code></a></td>
<td><code>IllegalStateException</code></td>
</tr>
</table>
<p>
All references to changing the state of this subsystem include both
changing the state of the subsystem object as well as the state property
of the subsystem service registration.
<p>
A subsystem must be persistently started. That is, a started subsystem
must be restarted across Framework and VM restarts, even if a start
failure occurs.
<p>
The following steps are required to start this subsystem.
<ol>
<li>Set the subsystem <i>autostart setting</i> to <i>started</i>.</li>
<li>If this subsystem is in the <a href="../../../../org/osgi/service/subsystem/Subsystem.State.html#RESOLVED"><code>RESOLVED</code></a> state,
proceed to step 7.</li>
<li>Change the state to <a href="../../../../org/osgi/service/subsystem/Subsystem.State.html#RESOLVING"><code>RESOLVING</code></a>.</li>
<li>Resolve the content resources. A resolution failure results in a
start failure with a state of <a href="../../../../org/osgi/service/subsystem/Subsystem.State.html#INSTALLED"><code>INSTALLED</code></a>.</li>
<li>Change the state to <a href="../../../../org/osgi/service/subsystem/Subsystem.State.html#RESOLVED"><code>RESOLVED</code></a>.</li>
<li>If this subsystem is scoped, enable the export sharing policy.</li>
<li>Change the state to <a href="../../../../org/osgi/service/subsystem/Subsystem.State.html#STARTING"><code>STARTING</code></a>.</li>
<li>For each eligible resource, increment the active use count by one. If
the active use count is one, start the resource. All dependencies must be
started before any content resource, and content resources must be
started according to the specified
<a href="../../../../org/osgi/service/subsystem/SubsystemConstants.html#START_ORDER_DIRECTIVE"><code>start order</code></a>. If an error
occurs while starting a resource, a start failure results with that error
as the cause.</li>
<li>Change the state to <a href="../../../../org/osgi/service/subsystem/Subsystem.State.html#ACTIVE"><code>ACTIVE</code></a>.</li>
</ol>
<p>
Implementations should be sensitive to the potential for long running
operations and periodically check the current thread for interruption. An
interrupted thread should be treated as a start failure with an
<code>InterruptedException</code> as the cause.
<p>
All start failure flows include the following, in order.
<ol>
<li>If the subsystem state is <a href="../../../../org/osgi/service/subsystem/Subsystem.State.html#STARTING"><code>STARTING</code></a> then change
the state to <a href="../../../../org/osgi/service/subsystem/Subsystem.State.html#STOPPING"><code>STOPPING</code></a> and stop all resources that
were started as part of this operation.</li>
<li>Change the state to either <a href="../../../../org/osgi/service/subsystem/Subsystem.State.html#INSTALLED"><code>INSTALLED</code></a> or
<a href="../../../../org/osgi/service/subsystem/Subsystem.State.html#RESOLVED"><code>RESOLVED</code></a>.</li>
<li>Throw a SubsystemException with the specified cause.</li>
</ol></div>
<dl><dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../../../../org/osgi/service/subsystem/SubsystemException.html" title="class in org.osgi.service.subsystem">SubsystemException</a></code> - If this subsystem fails to start.</dd>
<dd><code>java.lang.IllegalStateException</code> - If this subsystem's state is in
<a href="../../../../org/osgi/service/subsystem/Subsystem.State.html#INSTALL_FAILED"><code>INSTALL_FAILED</code></a>,
<a href="../../../../org/osgi/service/subsystem/Subsystem.State.html#UNINSTALLING"><code>UNINSTALLING</code></a>, or
<a href="../../../../org/osgi/service/subsystem/Subsystem.State.html#UNINSTALLED"><code>UNINSTALLED</code></a>, or if the state of at
least one of this subsystem's parents is not in
<a href="../../../../org/osgi/service/subsystem/Subsystem.State.html#STARTING"><code>STARTING</code></a>, <a href="../../../../org/osgi/service/subsystem/Subsystem.State.html#ACTIVE"><code>ACTIVE</code></a>.</dd>
<dd><code>java.lang.SecurityException</code> - If the caller does not have the appropriate
<a href="../../../../org/osgi/service/subsystem/SubsystemPermission.html" title="class in org.osgi.service.subsystem"><code>SubsystemPermission</code></a>[this,EXECUTE], and the runtime
supports permissions.</dd></dl>
</li>
</ul>
<a name="stop()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>stop</h4>
<pre>void stop()</pre>
<div class="block">Stops this subsystem.
<p>
The following table shows which actions are associated with each state.
An action of <code>Wait</code> means this method will block until a state
transition occurs, upon which the new state will be evaluated in order to
determine how to proceed. If a state transition does not occur in a
reasonable time while waiting then no action is taken and a
SubsystemException is thrown to indicate the subsystem was unable to be
stopped. An action of <code>Return</code> means this method returns
immediately without taking any other action.
</p>
<table>
<tr>
<th>State</th>
<th width="4">Action</th>
</tr>
<tr>
<td><a href="../../../../org/osgi/service/subsystem/Subsystem.State.html#INSTALLING"><code>INSTALLING</code></a></td>
<td><code>Wait</code></td>
</tr>
<tr>
<td><a href="../../../../org/osgi/service/subsystem/Subsystem.State.html#INSTALLED"><code>INSTALLED</code></a></td>
<td><code>Return</code></td>
<td>
<tr>
<td><a href="../../../../org/osgi/service/subsystem/Subsystem.State.html#INSTALL_FAILED"><code>INSTALL_FAILED</code></a></td>
<td><code>IllegalStateException</code></td>
<td>
<tr>
<td><a href="../../../../org/osgi/service/subsystem/Subsystem.State.html#RESOLVING"><code>RESOLVING</code></a></td>
<td><code>Wait</code></td>
<td>
<tr>
<td><a href="../../../../org/osgi/service/subsystem/Subsystem.State.html#RESOLVED"><code>RESOLVED</code></a></td>
<td><code>Return</code></td>
<td>
<tr>
<td><a href="../../../../org/osgi/service/subsystem/Subsystem.State.html#STARTING"><code>STARTING</code></a></td>
<td><code>Wait</code></td>
<td>
<tr>
<td><a href="../../../../org/osgi/service/subsystem/Subsystem.State.html#ACTIVE"><code>ACTIVE</code></a></td>
<td><code>Stop</code></td>
<td>
<tr>
<td><a href="../../../../org/osgi/service/subsystem/Subsystem.State.html#STOPPING"><code>STOPPING</code></a></td>
<td><code>Wait</code></td>
<td>
<tr>
<td><a href="../../../../org/osgi/service/subsystem/Subsystem.State.html#UNINSTALLING"><code>UNINSTALLING</code></a></td>
<td><code>IllegalStateException</code></td>
<td>
<tr>
<td><a href="../../../../org/osgi/service/subsystem/Subsystem.State.html#UNINSTALLED"><code>UNINSTALLED</code></a></td>
<td><code>IllegalStateException</code></td>
<td>
</table>
<p>
A subsystem must be persistently stopped. That is, a stopped subsystem
must remain stopped across Framework and VM restarts.
<p>
All references to changing the state of this subsystem include both
changing the state of the subsystem object as well as the state property
of the subsystem service registration.
<p>
The following steps are required to stop this subsystem.
<ol>
<li>Set the subsystem <i>autostart setting</i> to <i>stopped</i>.</li>
<li>Change the state to <a href="../../../../org/osgi/service/subsystem/Subsystem.State.html#STOPPING"><code>STOPPING</code></a>.</li>
<li>For each eligible resource, decrement the active use count by one. If
the active use count is zero, stop the resource. All content resources
must be stopped before any dependencies, and content resources must be
stopped in reverse <a href="../../../../org/osgi/service/subsystem/SubsystemConstants.html#START_ORDER_DIRECTIVE"><code>start
order</code></a>.</li>
<li>Change the state to <a href="../../../../org/osgi/service/subsystem/Subsystem.State.html#RESOLVED"><code>RESOLVED</code></a>.</li>
</ol>
With regard to error handling, once this subsystem has transitioned to
the <a href="../../../../org/osgi/service/subsystem/Subsystem.State.html#STOPPING"><code>STOPPING</code></a> state, every part of each step above
must be attempted. Errors subsequent to the first should be logged. Once
the stop process has completed, a SubsystemException must be thrown with
the initial error as the specified cause.
<p>
Implementations should be sensitive to the potential for long running
operations and periodically check the current thread for interruption, in
which case a SubsystemException with an InterruptedException as the cause
should be thrown. If an interruption occurs while waiting, this method
should terminate immediately. Once the transition to the
<a href="../../../../org/osgi/service/subsystem/Subsystem.State.html#STOPPING"><code>STOPPING</code></a> state has occurred, however, this method
must not terminate due to an interruption until the stop process has
completed.</div>
<dl><dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../../../../org/osgi/service/subsystem/SubsystemException.html" title="class in org.osgi.service.subsystem">SubsystemException</a></code> - If this subsystem fails to stop cleanly.</dd>
<dd><code>java.lang.IllegalStateException</code> - If this subsystem's state is in
<a href="../../../../org/osgi/service/subsystem/Subsystem.State.html#INSTALL_FAILED"><code>INSTALL_FAILED</code></a>,
<a href="../../../../org/osgi/service/subsystem/Subsystem.State.html#UNINSTALLING"><code>UNINSTALLING</code></a>, or
<a href="../../../../org/osgi/service/subsystem/Subsystem.State.html#UNINSTALLED"><code>UNINSTALLED</code></a>.</dd>
<dd><code>java.lang.SecurityException</code> - If the caller does not have the appropriate
<a href="../../../../org/osgi/service/subsystem/SubsystemPermission.html" title="class in org.osgi.service.subsystem"><code>SubsystemPermission</code></a>[this,EXECUTE], and the runtime
supports permissions.</dd></dl>
</li>
</ul>
<a name="uninstall()">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>uninstall</h4>
<pre>void uninstall()</pre>
<div class="block">Uninstalls this subsystem.
<p>
The following table shows which actions are associated with each state.
An action of <code>Wait</code> means this method will block until a state
transition occurs, upon which the new state will be evaluated in order to
determine how to proceed. If a state transition does not occur in a
reasonable time while waiting then no action is taken and a
SubsystemException is thrown to indicate the subsystem was unable to be
uninstalled. An action of <code>Return</code> means this method returns
immediately without taking any other action.
<table>
<tr>
<th>State</th>
<th width="4">Action</th>
</tr>
<tr>
<td><a href="../../../../org/osgi/service/subsystem/Subsystem.State.html#INSTALLING"><code>INSTALLING</code></a></td>
<td><code>Wait</code></td>
</tr>
<tr>
<td><a href="../../../../org/osgi/service/subsystem/Subsystem.State.html#INSTALLED"><code>INSTALLED</code></a></td>
<td><code>Uninstall</code></td>
</tr>
<tr>
<td><a href="../../../../org/osgi/service/subsystem/Subsystem.State.html#INSTALL_FAILED"><code>INSTALL_FAILED</code></a></td>
<td><code>Wait</code></td>
</tr>
<tr>
<td><a href="../../../../org/osgi/service/subsystem/Subsystem.State.html#RESOLVING"><code>RESOLVING</code></a></td>
<td><code>Wait</code></td>
</tr>
<tr>
<td><a href="../../../../org/osgi/service/subsystem/Subsystem.State.html#RESOLVED"><code>RESOLVED</code></a></td>
<td><code>Uninstall</code></td>
</tr>
<tr>
<td><a href="../../../../org/osgi/service/subsystem/Subsystem.State.html#STARTING"><code>STARTING</code></a></td>
<td><code>Wait</code></td>
</tr>
<tr>
<td><a href="../../../../org/osgi/service/subsystem/Subsystem.State.html#ACTIVE"><code>ACTIVE</code></a></td>
<td><code>Stop</code>, <code>Uninstall</code></td>
</tr>
<tr>
<td><a href="../../../../org/osgi/service/subsystem/Subsystem.State.html#STOPPING"><code>STOPPING</code></a></td>
<td><code>Wait</code></td>
</tr>
<tr>
<td><a href="../../../../org/osgi/service/subsystem/Subsystem.State.html#UNINSTALLING"><code>UNINSTALLING</code></a></td>
<td><code>Wait</code></td>
</tr>
<tr>
<td><a href="../../../../org/osgi/service/subsystem/Subsystem.State.html#UNINSTALLED"><code>UNINSTALLED</code></a></td>
<td><code>Return</code></td>
</tr>
</table>
<p>
All references to changing the state of this subsystem include both
changing the state of the subsystem object as well as the state property
of the subsystem service registration.
<p>
The following steps are required to uninstall this subsystem after being
stopped if necessary.
<ol>
<li>Change the state to <a href="../../../../org/osgi/service/subsystem/Subsystem.State.html#INSTALLED"><code>INSTALLED</code></a>.</li>
<li>Change the state to <a href="../../../../org/osgi/service/subsystem/Subsystem.State.html#UNINSTALLING"><code>UNINSTALLING</code></a>.</li>
<li>For each referenced resource, decrement the reference count by one.
If the reference count is zero, uninstall the resource. All content
resources must be uninstalled before any dependencies.</li>
<li>Change the state to <a href="../../../../org/osgi/service/subsystem/Subsystem.State.html#UNINSTALLED"><code>UNINSTALLED</code></a>.</li>
<li>Unregister the subsystem service.</li>
<li>If the subsystem is scoped, uninstall the region context bundle.</li>
</ol>
With regard to error handling, once this subsystem has transitioned to
the <a href="../../../../org/osgi/service/subsystem/Subsystem.State.html#UNINSTALLING"><code>UNINSTALLING</code></a> state, every part of each
step above must be attempted. Errors subsequent to the first should be
logged. Once the uninstall process has completed, a
<code>SubsystemException</code> must be thrown with the specified cause.
<p>
Implementations should be sensitive to the potential for long running
operations and periodically check the current thread for interruption, in
which case a <code>SubsystemException</code> with an
<code>InterruptedException</code> as the cause should be thrown. If an
interruption occurs while waiting, this method should terminate
immediately. Once the transition to the <a href="../../../../org/osgi/service/subsystem/Subsystem.State.html#UNINSTALLING"><code>UNINSTALLING</code></a> state has occurred, however, this method must not terminate
due to an interruption until the uninstall process has completed.</div>
<dl><dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../../../../org/osgi/service/subsystem/SubsystemException.html" title="class in org.osgi.service.subsystem">SubsystemException</a></code> - If this subsystem fails to uninstall cleanly.</dd>
<dd><code>java.lang.SecurityException</code> - If the caller does not have the appropriate
<a href="../../../../org/osgi/service/subsystem/SubsystemPermission.html" title="class in org.osgi.service.subsystem"><code>SubsystemPermission</code></a>[this,LIFECYCLE], and the runtime
supports permissions.</dd></dl>
</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/service/subsystem/Subsystem.State.html" title="enum in org.osgi.service.subsystem"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?org/osgi/service/subsystem/Subsystem.html" target="_top">Frames</a></li>
<li><a href="Subsystem.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: </li>
<li><a href="#nested_class_summary">Nested</a> | </li>
<li>Field | </li>
<li>Constr | </li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail: </li>
<li>Field | </li>
<li>Constr | </li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip-navbar_bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</body>
</html>
|