KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > osgi > framework > Constants


1 /*
2  * $Header: /cvshome/build/org.osgi.framework/src/org/osgi/framework/Constants.java,v 1.32 2007/02/20 00:07:22 hargrave Exp $
3  *
4  * Copyright (c) OSGi Alliance (2000, 2007). All Rights Reserved.
5  *
6  * Licensed under the Apache License, Version 2.0 (the "License");
7  * you may not use this file except in compliance with the License.
8  * You may obtain a copy of the License at
9  *
10  * http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an "AS IS" BASIS,
14  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  * See the License for the specific language governing permissions and
16  * limitations under the License.
17  */

18
19 package org.osgi.framework;
20
21 /**
22  * Defines standard names for the OSGi environment system properties, service
23  * properties, and Manifest header attribute keys.
24  *
25  * <p>
26  * The values associated with these keys are of type
27  * <code>java.lang.String</code>, unless otherwise indicated.
28  *
29  * @since 1.1
30  * @version $Revision: 1.32 $
31  */

32
33 public interface Constants {
34     /**
35      * Location identifier of the OSGi <i>system bundle </i>, which is defined
36      * to be &quot;System Bundle&quot;.
37      */

38     public static final String JavaDoc SYSTEM_BUNDLE_LOCATION = "System Bundle";
39
40     /**
41      * Alias for the symbolic name of the OSGi <i>system bundle </i>. It is
42      * defined to be &quot;system.bundle&quot;.
43      *
44      * @since 1.3
45      */

46     public static final String JavaDoc SYSTEM_BUNDLE_SYMBOLICNAME = "system.bundle";
47
48     /**
49      * Manifest header (named &quot;Bundle-Category&quot;) identifying the
50      * bundle's category.
51      * <p>
52      * The attribute value may be retrieved from the <code>Dictionary</code>
53      * object returned by the <code>Bundle.getHeaders</code> method.
54      */

55     public static final String JavaDoc BUNDLE_CATEGORY = "Bundle-Category";
56
57     /**
58      * Manifest header (named &quot;Bundle-ClassPath&quot;) identifying a list
59      * of directories and embedded JAR files, which are bundle resources used to
60      * extend the bundle's classpath.
61      *
62      * <p>
63      * The attribute value may be retrieved from the <code>Dictionary</code>
64      * object returned by the <code>Bundle.getHeaders</code> method.
65      */

66     public static final String JavaDoc BUNDLE_CLASSPATH = "Bundle-ClassPath";
67
68     /**
69      * Manifest header (named &quot;Bundle-Copyright&quot;) identifying the
70      * bundle's copyright information.
71      * <p>
72      * The attribute value may be retrieved from the <code>Dictionary</code>
73      * object returned by the <code>Bundle.getHeaders</code> method.
74      */

75     public static final String JavaDoc BUNDLE_COPYRIGHT = "Bundle-Copyright";
76
77     /**
78      * Manifest header (named &quot;Bundle-Description&quot;) containing a brief
79      * description of the bundle's functionality.
80      * <p>
81      * The attribute value may be retrieved from the <code>Dictionary</code>
82      * object returned by the <code>Bundle.getHeaders</code> method.
83      */

84     public static final String JavaDoc BUNDLE_DESCRIPTION = "Bundle-Description";
85
86     /**
87      * Manifest header (named &quot;Bundle-Name&quot;) identifying the bundle's
88      * name.
89      * <p>
90      * The attribute value may be retrieved from the <code>Dictionary</code>
91      * object returned by the <code>Bundle.getHeaders</code> method.
92      */

93     public static final String JavaDoc BUNDLE_NAME = "Bundle-Name";
94
95     /**
96      * Manifest header (named &quot;Bundle-NativeCode&quot;) identifying a
97      * number of hardware environments and the native language code libraries
98      * that the bundle is carrying for each of these environments.
99      *
100      * <p>
101      * The attribute value may be retrieved from the <code>Dictionary</code>
102      * object returned by the <code>Bundle.getHeaders</code> method.
103      */

104     public static final String JavaDoc BUNDLE_NATIVECODE = "Bundle-NativeCode";
105
106     /**
107      * Manifest header (named &quot;Export-Package&quot;) identifying the
108      * packages that the bundle offers to the Framework for export.
109      *
110      * <p>
111      * The attribute value may be retrieved from the <code>Dictionary</code>
112      * object returned by the <code>Bundle.getHeaders</code> method.
113      */

114     public static final String JavaDoc EXPORT_PACKAGE = "Export-Package";
115
116     /**
117      * Manifest header (named &quot;Export-Service&quot;) identifying the fully
118      * qualified class names of the services that the bundle may register (used
119      * for informational purposes only).
120      *
121      * <p>
122      * The attribute value may be retrieved from the <code>Dictionary</code>
123      * object returned by the <code>Bundle.getHeaders</code> method.
124      *
125      * @deprecated As of 1.2.
126      */

127     public static final String JavaDoc EXPORT_SERVICE = "Export-Service";
128
129     /**
130      * Manifest header (named &quot;Import-Package&quot;) identifying the
131      * packages on which the bundle depends.
132      *
133      * <p>
134      * The attribute value may be retrieved from the <code>Dictionary</code>
135      * object returned by the <code>Bundle.getHeaders</code> method.
136      */

137     public static final String JavaDoc IMPORT_PACKAGE = "Import-Package";
138
139     /**
140      * Manifest header (named &quot;DynamicImport-Package&quot;) identifying the
141      * packages that the bundle may dynamically import during execution.
142      *
143      * <p>
144      * The attribute value may be retrieved from the <code>Dictionary</code>
145      * object returned by the <code>Bundle.getHeaders</code> method.
146      *
147      * @since 1.2
148      */

149     public static final String JavaDoc DYNAMICIMPORT_PACKAGE = "DynamicImport-Package";
150
151     /**
152      * Manifest header (named &quot;Import-Service&quot;) identifying the fully
153      * qualified class names of the services that the bundle requires (used for
154      * informational purposes only).
155      *
156      * <p>
157      * The attribute value may be retrieved from the <code>Dictionary</code>
158      * object returned by the <code>Bundle.getHeaders</code> method.
159      *
160      * @deprecated As of 1.2.
161      */

162     public static final String JavaDoc IMPORT_SERVICE = "Import-Service";
163
164     /**
165      * Manifest header (named &quot;Bundle-Vendor&quot;) identifying the
166      * bundle's vendor.
167      *
168      * <p>
169      * The attribute value may be retrieved from the <code>Dictionary</code>
170      * object returned by the <code>Bundle.getHeaders</code> method.
171      */

172     public static final String JavaDoc BUNDLE_VENDOR = "Bundle-Vendor";
173
174     /**
175      * Manifest header (named &quot;Bundle-Version&quot;) identifying the
176      * bundle's version.
177      *
178      * <p>
179      * The attribute value may be retrieved from the <code>Dictionary</code>
180      * object returned by the <code>Bundle.getHeaders</code> method.
181      */

182     public static final String JavaDoc BUNDLE_VERSION = "Bundle-Version";
183
184     /**
185      * Manifest header (named &quot;Bundle-DocURL&quot;) identifying the
186      * bundle's documentation URL, from which further information about the
187      * bundle may be obtained.
188      *
189      * <p>
190      * The attribute value may be retrieved from the <code>Dictionary</code>
191      * object returned by the <code>Bundle.getHeaders</code> method.
192      */

193     public static final String JavaDoc BUNDLE_DOCURL = "Bundle-DocURL";
194
195     /**
196      * Manifest header (named &quot;Bundle-ContactAddress&quot;) identifying the
197      * contact address where problems with the bundle may be reported; for
198      * example, an email address.
199      *
200      * <p>
201      * The attribute value may be retrieved from the <code>Dictionary</code>
202      * object returned by the <code>Bundle.getHeaders</code> method.
203      */

204     public static final String JavaDoc BUNDLE_CONTACTADDRESS = "Bundle-ContactAddress";
205
206     /**
207      * Manifest header attribute (named &quot;Bundle-Activator&quot;)
208      * identifying the bundle's activator class.
209      *
210      * <p>
211      * If present, this header specifies the name of the bundle resource class
212      * that implements the <code>BundleActivator</code> interface and whose
213      * <code>start</code> and <code>stop</code> methods are called by the
214      * Framework when the bundle is started and stopped, respectively.
215      *
216      * <p>
217      * The attribute value may be retrieved from the <code>Dictionary</code>
218      * object returned by the <code>Bundle.getHeaders</code> method.
219      */

220     public static final String JavaDoc BUNDLE_ACTIVATOR = "Bundle-Activator";
221
222     /**
223      * Manifest header (named &quot;Bundle-UpdateLocation&quot;) identifying the
224      * location from which a new bundle version is obtained during a bundle
225      * update operation.
226      *
227      * <p>
228      * The attribute value may be retrieved from the <code>Dictionary</code>
229      * object returned by the <code>Bundle.getHeaders</code> method.
230      */

231     public static final String JavaDoc BUNDLE_UPDATELOCATION = "Bundle-UpdateLocation";
232
233     /**
234      * Manifest header attribute (named &quot;specification-version&quot;)
235      * identifying the version of a package specified in the Export-Package or
236      * Import-Package manifest header.
237      *
238      * @deprecated As of 1.3. This has been replaced by
239      * {@link #VERSION_ATTRIBUTE}.
240      */

241     public static final String JavaDoc PACKAGE_SPECIFICATION_VERSION = "specification-version";
242
243     /**
244      * Manifest header attribute (named &quot;processor&quot;) identifying the
245      * processor required to run native bundle code specified in the
246      * Bundle-NativeCode manifest header).
247      *
248      * <p>
249      * The attribute value is encoded in the Bundle-NativeCode manifest header
250      * like:
251      *
252      * <pre>
253      * Bundle-NativeCode: http.so ; processor=x86 ...
254      * </pre>
255      */

256     public static final String JavaDoc BUNDLE_NATIVECODE_PROCESSOR = "processor";
257
258     /**
259      * Manifest header attribute (named &quot;osname&quot;) identifying the
260      * operating system required to run native bundle code specified in the
261      * Bundle-NativeCode manifest header).
262      * <p>
263      * The attribute value is encoded in the Bundle-NativeCode manifest header
264      * like:
265      *
266      * <pre>
267      * Bundle-NativeCode: http.so ; osname=Linux ...
268      * </pre>
269      */

270     public static final String JavaDoc BUNDLE_NATIVECODE_OSNAME = "osname";
271
272     /**
273      * Manifest header attribute (named &quot;osversion&quot;) identifying the
274      * operating system version required to run native bundle code specified in
275      * the Bundle-NativeCode manifest header).
276      * <p>
277      * The attribute value is encoded in the Bundle-NativeCode manifest header
278      * like:
279      *
280      * <pre>
281      * Bundle-NativeCode: http.so ; osversion=&quot;2.34&quot; ...
282      * </pre>
283      */

284     public static final String JavaDoc BUNDLE_NATIVECODE_OSVERSION = "osversion";
285
286     /**
287      * Manifest header attribute (named &quot;language&quot;) identifying the
288      * language in which the native bundle code is written specified in the
289      * Bundle-NativeCode manifest header. See ISO 639 for possible values.
290      * <p>
291      * The attribute value is encoded in the Bundle-NativeCode manifest header
292      * like:
293      *
294      * <pre>
295      * Bundle-NativeCode: http.so ; language=nl_be ...
296      * </pre>
297      */

298     public static final String JavaDoc BUNDLE_NATIVECODE_LANGUAGE = "language";
299
300     /**
301      * Manifest header (named &quot;Bundle-RequiredExecutionEnvironment&quot;)
302      * identifying the required execution environment for the bundle. The
303      * service platform may run this bundle if any of the execution environments
304      * named in this header matches one of the execution environments it
305      * implements.
306      *
307      * <p>
308      * The attribute value may be retrieved from the <code>Dictionary</code>
309      * object returned by the <code>Bundle.getHeaders</code> method.
310      *
311      * @since 1.2
312      */

313     public static final String JavaDoc BUNDLE_REQUIREDEXECUTIONENVIRONMENT = "Bundle-RequiredExecutionEnvironment";
314
315     /*
316      * Framework environment properties.
317      */

318
319     /**
320      * Framework environment property (named
321      * &quot;org.osgi.framework.version&quot;) identifying the Framework
322      * version.
323      *
324      * <p>
325      * The value of this property may be retrieved by calling the
326      * <code>BundleContext.getProperty</code> method.
327      */

328     public static final String JavaDoc FRAMEWORK_VERSION = "org.osgi.framework.version";
329
330     /**
331      * Framework environment property (named
332      * &quot;org.osgi.framework.vendor&quot;) identifying the Framework
333      * implementation vendor.
334      *
335      * <p>
336      * The value of this property may be retrieved by calling the
337      * <code>BundleContext.getProperty</code> method.
338      */

339     public static final String JavaDoc FRAMEWORK_VENDOR = "org.osgi.framework.vendor";
340
341     /**
342      * Framework environment property (named
343      * &quot;org.osgi.framework.language&quot;) identifying the Framework
344      * implementation language (see ISO 639 for possible values).
345      *
346      * <p>
347      * The value of this property may be retrieved by calling the
348      * <code>BundleContext.getProperty</code> method.
349      */

350     public static final String JavaDoc FRAMEWORK_LANGUAGE = "org.osgi.framework.language";
351
352     /**
353      * Framework environment property (named
354      * &quot;org.osgi.framework.os.name&quot;) identifying the Framework
355      * host-computer's operating system.
356      *
357      * <p>
358      * The value of this property may be retrieved by calling the
359      * <code>BundleContext.getProperty</code> method.
360      */

361     public static final String JavaDoc FRAMEWORK_OS_NAME = "org.osgi.framework.os.name";
362
363     /**
364      * Framework environment property (named
365      * &quot;org.osgi.framework.os.version&quot;) identifying the Framework
366      * host-computer's operating system version number.
367      *
368      * <p>
369      * The value of this property may be retrieved by calling the
370      * <code>BundleContext.getProperty</code> method.
371      */

372     public static final String JavaDoc FRAMEWORK_OS_VERSION = "org.osgi.framework.os.version";
373
374     /**
375      * Framework environment property (named
376      * &quot;org.osgi.framework.processor&quot;) identifying the Framework
377      * host-computer's processor name.
378      * <p>
379      * The value of this property may be retrieved by calling the
380      * <code>BundleContext.getProperty</code> method.
381      */

382     public static final String JavaDoc FRAMEWORK_PROCESSOR = "org.osgi.framework.processor";
383
384     /**
385      * Framework environment property (named
386      * &quot;org.osgi.framework.executionenvironment&quot;) identifying
387      * execution environments provided by the Framework.
388      * <p>
389      * The value of this property may be retrieved by calling the
390      * <code>BundleContext.getProperty</code> method.
391      *
392      * @since 1.2
393      */

394     public static final String JavaDoc FRAMEWORK_EXECUTIONENVIRONMENT = "org.osgi.framework.executionenvironment";
395
396     /**
397      * Framework environment property (named
398      * &quot;org.osgi.framework.bootdelegation&quot;) identifying packages for
399      * which the Framework must delegate class loading to the boot class path.
400      * <p>
401      * The value of this property may be retrieved by calling the
402      * <code>BundleContext.getProperty</code> method.
403      *
404      * @since 1.3
405      */

406     public static final String JavaDoc FRAMEWORK_BOOTDELEGATION = "org.osgi.framework.bootdelegation";
407
408     /**
409      * Framework environment property (named
410      * &quot;org.osgi.framework.system.packages&quot;) identifying package which
411      * the system bundle must export.
412      * <p>
413      * The value of this property may be retrieved by calling the
414      * <code>BundleContext.getProperty</code> method.
415      *
416      * @since 1.3
417      */

418     public static final String JavaDoc FRAMEWORK_SYSTEMPACKAGES = "org.osgi.framework.system.packages";
419
420     /**
421      * Framework environment property (named
422      * &quot;org.osgi.supports.framework.extension&quot;) identifying whether
423      * the Framework supports framework extension bundles. As of version 1.4,
424      * the value of this property must be <code>true</code>. The Framework
425      * must support framework extension bundles.
426      * <p>
427      * The value of this property may be retrieved by calling the
428      * <code>BundleContext.getProperty</code> method.
429      *
430      * @since 1.3
431      */

432     public static final String JavaDoc SUPPORTS_FRAMEWORK_EXTENSION = "org.osgi.supports.framework.extension";
433
434     /**
435      * Framework environment property (named
436      * &quot;org.osgi.supports.bootclasspath.extension&quot;) identifying
437      * whether the Framework supports bootclasspath extension bundles. If the
438      * value of this property is <code>true</code>, then the Framework
439      * supports bootclasspath extension bundles. The default value is
440      * <code>false</code>.
441      * <p>
442      * The value of this property may be retrieved by calling the
443      * <code>BundleContext.getProperty</code> method.
444      *
445      * @since 1.3
446      */

447     public static final String JavaDoc SUPPORTS_BOOTCLASSPATH_EXTENSION = "org.osgi.supports.bootclasspath.extension";
448
449     /**
450      * Framework environment property (named
451      * &quot;org.osgi.supports.framework.fragment&quot;) identifying whether the
452      * Framework supports fragment bundles. As of version 1.4, the value of this
453      * property must be <code>true</code>. The Framework must support
454      * fragment bundles.
455      * <p>
456      * The value of this property may be retrieved by calling the
457      * <code>BundleContext.getProperty</code> method.
458      *
459      * @since 1.3
460      */

461     public static final String JavaDoc SUPPORTS_FRAMEWORK_FRAGMENT = "org.osgi.supports.framework.fragment";
462
463     /**
464      * Framework environment property (named
465      * &quot;org.osgi.supports.framework.requirebundle&quot;) identifying
466      * whether the Framework supports the <code>Require-Bundle</code> manifest
467      * header. As of version 1.4, the value of this property must be
468      * <code>true</code>. The Framework must support the
469      * <code>Require-Bundle</code> manifest header.
470      * <p>
471      * The value of this property may be retrieved by calling the
472      * <code>BundleContext.getProperty</code> method.
473      *
474      * @since 1.3
475      */

476     public static final String JavaDoc SUPPORTS_FRAMEWORK_REQUIREBUNDLE = "org.osgi.supports.framework.requirebundle";
477
478     /*
479      * Service properties.
480      */

481
482     /**
483      * Service property (named &quot;objectClass&quot;) identifying all of the
484      * class names under which a service was registered in the Framework (of
485      * type <code>java.lang.String[]</code>).
486      *
487      * <p>
488      * This property is set by the Framework when a service is registered.
489      */

490     public static final String JavaDoc OBJECTCLASS = "objectClass";
491
492     /**
493      * Service property (named &quot;service.id&quot;) identifying a service's
494      * registration number (of type <code>java.lang.Long</code>).
495      *
496      * <p>
497      * The value of this property is assigned by the Framework when a service is
498      * registered. The Framework assigns a unique value that is larger than all
499      * previously assigned values since the Framework was started. These values
500      * are NOT persistent across restarts of the Framework.
501      */

502     public static final String JavaDoc SERVICE_ID = "service.id";
503
504     /**
505      * Service property (named &quot;service.pid&quot;) identifying a service's
506      * persistent identifier.
507      *
508      * <p>
509      * This property may be supplied in the <code>properties</code>
510      * <code>Dictionary</code>
511      * object passed to the <code>BundleContext.registerService</code> method.
512      *
513      * <p>
514      * A service's persistent identifier uniquely identifies the service and
515      * persists across multiple Framework invocations.
516      *
517      * <p>
518      * By convention, every bundle has its own unique namespace, starting with
519      * the bundle's identifier (see {@link Bundle#getBundleId}) and followed by
520      * a dot (.). A bundle may use this as the prefix of the persistent
521      * identifiers for the services it registers.
522      */

523     public static final String JavaDoc SERVICE_PID = "service.pid";
524
525     /**
526      * Service property (named &quot;service.ranking&quot;) identifying a
527      * service's ranking number (of type <code>java.lang.Integer</code>).
528      *
529      * <p>
530      * This property may be supplied in the <code>properties
531      * Dictionary</code>
532      * object passed to the <code>BundleContext.registerService</code> method.
533      *
534      * <p>
535      * The service ranking is used by the Framework to determine the <i>default
536      * </i> service to be returned from a call to the
537      * {@link BundleContext#getServiceReference} method: If more than one
538      * service implements the specified class, the <code>ServiceReference</code>
539      * object with the highest ranking is returned.
540      *
541      * <p>
542      * The default ranking is zero (0). A service with a ranking of
543      * <code>Integer.MAX_VALUE</code> is very likely to be returned as the
544      * default service, whereas a service with a ranking of
545      * <code>Integer.MIN_VALUE</code> is very unlikely to be returned.
546      *
547      * <p>
548      * If the supplied property value is not of type
549      * <code>java.lang.Integer</code>, it is deemed to have a ranking value
550      * of zero.
551      */

552     public static final String JavaDoc SERVICE_RANKING = "service.ranking";
553
554     /**
555      * Service property (named &quot;service.vendor&quot;) identifying a
556      * service's vendor.
557      *
558      * <p>
559      * This property may be supplied in the properties <code>Dictionary</code>
560      * object passed to the <code>BundleContext.registerService</code> method.
561      */

562     public static final String JavaDoc SERVICE_VENDOR = "service.vendor";
563
564     /**
565      * Service property (named &quot;service.description&quot;) identifying a
566      * service's description.
567      *
568      * <p>
569      * This property may be supplied in the properties <code>Dictionary</code>
570      * object passed to the <code>BundleContext.registerService</code> method.
571      */

572     public static final String JavaDoc SERVICE_DESCRIPTION = "service.description";
573
574     /**
575      * Manifest header (named &quot;Bundle-SymbolicName&quot;) identifying the
576      * bundle's symbolic name.
577      * <p>
578      * The attribute value may be retrieved from the <code>Dictionary</code>
579      * object returned by the <code>Bundle.getHeaders</code> method.
580      *
581      * @since 1.3
582      */

583     public final static String JavaDoc BUNDLE_SYMBOLICNAME = "Bundle-SymbolicName";
584
585     /**
586      * Manifest header directive (named &quot;singleton&quot;) identifying
587      * whether a bundle is a singleton. The default value is <code>false</code>.
588      *
589      * <p>
590      * The directive value is encoded in the Bundle-SymbolicName manifest header
591      * like:
592      *
593      * <pre>
594      * Bundle-SymbolicName: com.acme.module.test; singleton:=true
595      * </pre>
596      *
597      * @since 1.3
598      */

599     public final static String JavaDoc SINGLETON_DIRECTIVE = "singleton";
600
601     /**
602      * Manifest header directive (named &quot;fragment-attachment&quot;)
603      * identifying if and when a fragment may attach to a host bundle. The
604      * default value is <code>&quot;always&quot;</code>.
605      *
606      * <p>
607      * The directive value is encoded in the Bundle-SymbolicName manifest header
608      * like:
609      *
610      * <pre>
611      * Bundle-SymbolicName: com.acme.module.test; fragment-attachment:=&quot;never&quot;
612      * </pre>
613      *
614      * @see Constants#FRAGMENT_ATTACHMENT_ALWAYS
615      * @see Constants#FRAGMENT_ATTACHMENT_RESOLVETIME
616      * @see Constants#FRAGMENT_ATTACHMENT_NEVER
617      * @since 1.3
618      */

619     public final static String JavaDoc FRAGMENT_ATTACHMENT_DIRECTIVE = "fragment-attachment";
620
621     /**
622      * Manifest header directive value (named &quot;always&quot;) identifying a
623      * fragment attachment type of always. A fragment attachment type of always
624      * indicates that fragments are allowed to attach to the host bundle at any
625      * time (while the host is resolved or during the process of resolving the
626      * host bundle).
627      *
628      * <p>
629      * The directive value is encoded in the Bundle-SymbolicName manifest header
630      * like:
631      *
632      * <pre>
633      * Bundle-SymbolicName: com.acme.module.test; fragment-attachment:=&quot;always&quot;
634      * </pre>
635      *
636      * @see Constants#FRAGMENT_ATTACHMENT_DIRECTIVE
637      * @since 1.3
638      */

639     public final static String JavaDoc FRAGMENT_ATTACHMENT_ALWAYS = "always";
640
641     /**
642      * Manifest header directive value (named &quot;resolve-time&quot;)
643      * identifying a fragment attachment type of resolve-time. A fragment
644      * attachment type of resolve-time indicates that fragments are allowed to
645      * attach to the host bundle only during the process of resolving the host
646      * bundle.
647      *
648      * <p>
649      * The directive value is encoded in the Bundle-SymbolicName manifest header
650      * like:
651      *
652      * <pre>
653      * Bundle-SymbolicName: com.acme.module.test; fragment-attachment:=&quot;resolve-time&quot;
654      * </pre>
655      *
656      * @see Constants#FRAGMENT_ATTACHMENT_DIRECTIVE
657      * @since 1.3
658      */

659     public final static String JavaDoc FRAGMENT_ATTACHMENT_RESOLVETIME = "resolve-time";
660
661     /**
662      * Manifest header directive value (named &quot;never&quot;) identifying a
663      * fragment attachment type of never. A fragment attachment type of never
664      * indicates that no fragments are allowed to attach to the host bundle at
665      * any time.
666      *
667      * <p>
668      * The directive value is encoded in the Bundle-SymbolicName manifest header
669      * like:
670      *
671      * <pre>
672      * Bundle-SymbolicName: com.acme.module.test; fragment-attachment:=&quot;never&quot;
673      * </pre>
674      *
675      * @see Constants#FRAGMENT_ATTACHMENT_DIRECTIVE
676      * @since 1.3
677      */

678     public final static String JavaDoc FRAGMENT_ATTACHMENT_NEVER = "never";
679
680     /**
681      * Manifest header (named &quot;Bundle-Localization&quot;) identifying the
682      * base name of the bundle's localization entries.
683      * <p>
684      * The attribute value may be retrieved from the <code>Dictionary</code>
685      * object returned by the <code>Bundle.getHeaders</code> method.
686      *
687      * @see #BUNDLE_LOCALIZATION_DEFAULT_BASENAME
688      * @since 1.3
689      */

690     public final static String JavaDoc BUNDLE_LOCALIZATION = "Bundle-Localization";
691
692     /**
693      * Default value for the <code>Bundle-Localization</code> manifest header.
694      *
695      * @see #BUNDLE_LOCALIZATION
696      * @since 1.3
697      */

698     public final static String JavaDoc BUNDLE_LOCALIZATION_DEFAULT_BASENAME = "OSGI-INF/l10n/bundle";
699
700     /**
701      * Manifest header (named &quot;Require-Bundle&quot;) identifying the
702      * symbolic names of other bundles required by the bundle.
703      *
704      * <p>
705      * The attribute value may be retrieved from the <code>Dictionary</code>
706      * object returned by the <code>Bundle.getHeaders</code> method.
707      *
708      * @since 1.3
709      */

710     public final static String JavaDoc REQUIRE_BUNDLE = "Require-Bundle";
711
712     /**
713      * Manifest header attribute (named &quot;bundle-version&quot;) identifying
714      * a range of versions for a bundle specified in the Require-Bundle or
715      * Fragment-Host manifest headers. The default value is <code>0.0.0</code>.
716      *
717      * <p>
718      * The attribute value is encoded in the Require-Bundle manifest header
719      * like:
720      *
721      * <pre>
722      * Require-Bundle: com.acme.module.test; bundle-version=&quot;1.1&quot;
723      * Require-Bundle: com.acme.module.test; bundle-version=&quot;[1.0,2.0)&quot;
724      * </pre>
725      *
726      * <p>
727      * The bundle-version attribute value uses a mathematical interval notation
728      * to specify a range of bundle versions. A bundle-version attribute value
729      * specified as a single version means a version range that includes any
730      * bundle version greater than or equal to the specified version.
731      *
732      * @since 1.3
733      */

734     public static final String JavaDoc BUNDLE_VERSION_ATTRIBUTE = "bundle-version";
735
736     /**
737      * Manifest header (named &quot;Fragment-Host&quot;) identifying the
738      * symbolic name of another bundle for which that the bundle is a fragment.
739      *
740      * <p>
741      * The attribute value may be retrieved from the <code>Dictionary</code>
742      * object returned by the <code>Bundle.getHeaders</code> method.
743      *
744      * @since 1.3
745      */

746     public final static String JavaDoc FRAGMENT_HOST = "Fragment-Host";
747
748     /**
749      * Manifest header attribute (named &quot;selection-filter&quot;) is used
750      * for selection by filtering based upon system properties.
751      *
752      * <p>
753      * The attribute value is encoded in manifest headers like:
754      *
755      * <pre>
756      * Bundle-NativeCode: libgtk.so; selection-filter=&quot;(ws=gtk)&quot;; ...
757      * </pre>
758      *
759      * @since 1.3
760      */

761     public final static String JavaDoc SELECTION_FILTER_ATTRIBUTE = "selection-filter";
762
763     /**
764      * Manifest header (named &quot;Bundle-ManifestVersion&quot;) identifying
765      * the bundle manifest version. A bundle manifest may express the version of
766      * the syntax in which it is written by specifying a bundle manifest
767      * version. Bundles exploiting OSGi R4, or later, syntax must specify a
768      * bundle manifest version.
769      * <p>
770      * The bundle manifest version defined by OSGi R4 or, more specifically, by
771      * V1.3 of the OSGi Framework Specification is "2".
772      *
773      * <p>
774      * The attribute value may be retrieved from the <code>Dictionary</code>
775      * object returned by the <code>Bundle.getHeaders</code> method.
776      *
777      * @since 1.3
778      */

779     public final static String JavaDoc BUNDLE_MANIFESTVERSION = "Bundle-ManifestVersion";
780
781     /**
782      * Manifest header attribute (named &quot;version&quot;) identifying the
783      * version of a package specified in the Export-Package or Import-Package
784      * manifest header.
785      *
786      * <p>
787      * The attribute value is encoded in the Export-Package or Import-Package
788      * manifest header like:
789      *
790      * <pre>
791      * Import-Package: org.osgi.framework; version=&quot;1.1&quot;
792      * </pre>
793      *
794      * @since 1.3
795      */

796     public final static String JavaDoc VERSION_ATTRIBUTE = "version";
797
798     /**
799      * Manifest header attribute (named &quot;bundle-symbolic-name&quot;)
800      * identifying the symbolic name of a bundle that exports a package
801      * specified in the Import-Package manifest header.
802      *
803      * <p>
804      * The attribute value is encoded in the Import-Package manifest header
805      * like:
806      *
807      * <pre>
808      * Import-Package: org.osgi.framework; bundle-symbolic-name=&quot;com.acme.module.test&quot;
809      * </pre>
810      *
811      * @since 1.3
812      */

813     public final static String JavaDoc BUNDLE_SYMBOLICNAME_ATTRIBUTE = "bundle-symbolic-name";
814
815     /**
816      * Manifest header directive (named &quot;resolution&quot;) identifying the
817      * resolution type in the Import-Package or Require-Bundle manifest header.
818      *
819      * <p>
820      * The directive value is encoded in the Import-Package or Require-Bundle
821      * manifest header like:
822      *
823      * <pre>
824      * Import-Package: org.osgi.framework; resolution:=&quot;optional&quot;
825      * Require-Bundle: com.acme.module.test; resolution:=&quot;optional&quot;
826      * </pre>
827      *
828      * @see Constants#RESOLUTION_MANDATORY
829      * @see Constants#RESOLUTION_OPTIONAL
830      * @since 1.3
831      */

832     public final static String JavaDoc RESOLUTION_DIRECTIVE = "resolution";
833
834     /**
835      * Manifest header directive value (named &quot;mandatory&quot;) identifying
836      * a mandatory resolution type. A mandatory resolution type indicates that
837      * the import package or require bundle must be resolved when the bundle is
838      * resolved. If such an import or require bundle cannot be resolved, the
839      * module fails to resolve.
840      *
841      * <p>
842      * The directive value is encoded in the Import-Package or Require-Bundle
843      * manifest header like:
844      *
845      * <pre>
846      * Import-Package: org.osgi.framework; resolution:=&quot;manditory&quot;
847      * Require-Bundle: com.acme.module.test; resolution:=&quot;manditory&quot;
848      * </pre>
849      *
850      * @see Constants#RESOLUTION_DIRECTIVE
851      * @since 1.3
852      */

853     public final static String JavaDoc RESOLUTION_MANDATORY = "mandatory";
854
855     /**
856      * Manifest header directive value (named &quot;optional&quot;) identifying
857      * an optional resolution type. An optional resolution type indicates that
858      * the import or require bundle is optional and the bundle may be resolved
859      * without the import or require bundle being resolved. If the import or
860      * require bundle is not resolved when the bundle is resolved, the import or
861      * require bundle may not be resolved before the bundle is refreshed.
862      *
863      * <p>
864      * The directive value is encoded in the Import-Package or Require-Bundle
865      * manifest header like:
866      *
867      * <pre>
868      * Import-Package: org.osgi.framework; resolution:=&quot;optional&quot;
869      * Require-Bundle: com.acme.module.test; resolution:=&quot;optional&quot;
870      * </pre>
871      *
872      * @see Constants#RESOLUTION_DIRECTIVE
873      * @since 1.3
874      */

875     public final static String JavaDoc RESOLUTION_OPTIONAL = "optional";
876
877     /**
878      * Manifest header directive (named &quot;uses&quot;) identifying a list of
879      * packages that an exported package uses.
880      *
881      * <p>
882      * The directive value is encoded in the Export-Package manifest header
883      * like:
884      *
885      * <pre>
886      * Export-Package: org.osgi.util.tracker; uses:=&quot;org.osgi.framework&quot;
887      * </pre>
888      *
889      * @since 1.3
890      */

891     public final static String JavaDoc USES_DIRECTIVE = "uses";
892
893     /**
894      * Manifest header directive (named &quot;include&quot;).
895      * <p>
896      * This directive is used by the Import-Package manifest header to identify
897      * a list of classes of the specified package which must be allowed to be
898      * exported. The directive value is encoded in the Import-Package manifest
899      * header like:
900      *
901      * <pre>
902      * Import-Package: org.osgi.framework; include:=&quot;MyClass*&quot;
903      * </pre>
904      *
905      * <p>
906      * This directive is also used by the Bundle-ActivationPolicy manifest
907      * header to identify the packages from which class loads will trigger lazy
908      * activation. The directive value is encoded in the Bundle-ActivationPolicy
909      * manifest header like:
910      *
911      * <pre>
912      * Bundle-ActivationPolicy: lazy; include:=&quot;org.osgi.framework&quot;
913      * </pre>
914      *
915      * @since 1.3
916      */

917     public final static String JavaDoc INCLUDE_DIRECTIVE = "include";
918
919     /**
920      * Manifest header directive (named &quot;exclude&quot;).
921      * <p>
922      * This directive is used by the Export-Package manifest header to identify
923      * a list of classes of the specified package which must not be allowed to
924      * be exported. The directive value is encoded in the Export-Package
925      * manifest header like:
926      *
927      * <pre>
928      * Export-Package: org.osgi.framework; exclude:=&quot;*Impl&quot;
929      * </pre>
930      *
931      * <p>
932      * This directive is also used by the Bundle-ActivationPolicy manifest
933      * header to identify the packages from which class loads will not trigger
934      * lazy activation. The directive value is encoded in the
935      * Bundle-ActivationPolicy manifest header like:
936      *
937      * <pre>
938      * Bundle-ActivationPolicy: lazy; exclude:=&quot;org.osgi.framework&quot;
939      * </pre>
940      *
941      * @since 1.3
942      */

943     public final static String JavaDoc EXCLUDE_DIRECTIVE = "exclude";
944
945     /**
946      * Manifest header directive (named &quot;mandatory&quot;) identifying names
947      * of matching attributes which must be specified by matching Import-Package
948      * statements in the Export-Package manifest header.
949      *
950      * <p>
951      * The directive value is encoded in the Export-Package manifest header
952      * like:
953      *
954      * <pre>
955      * Export-Package: org.osgi.framework; mandatory:=&quot;bundle-symbolic-name&quot;
956      * </pre>
957      *
958      * @since 1.3
959      */

960     public final static String JavaDoc MANDATORY_DIRECTIVE = "mandatory";
961
962     /**
963      * Manifest header directive (named &quot;visibility&quot;) identifying the
964      * visibility of a reqiured bundle in the Require-Bundle manifest header.
965      *
966      * <p>
967      * The directive value is encoded in the Require-Bundle manifest header
968      * like:
969      *
970      * <pre>
971      * Require-Bundle: com.acme.module.test; visibility:=&quot;reexport&quot;
972      * </pre>
973      *
974      * @see Constants#VISIBILITY_PRIVATE
975      * @see Constants#VISIBILITY_REEXPORT
976      * @since 1.3
977      */

978     public final static String JavaDoc VISIBILITY_DIRECTIVE = "visibility";
979
980     /**
981      * Manifest header directive value (named &quot;private&quot;) identifying a
982      * private visibility type. A private visibility type indicates that any
983      * packages that are exported by the required bundle are not made visible on
984      * the export signature of the requiring bundle.
985      *
986      * <p>
987      * The directive value is encoded in the Require-Bundle manifest header
988      * like:
989      *
990      * <pre>
991      * Require-Bundle: com.acme.module.test; visibility:=&quot;private&quot;
992      * </pre>
993      *
994      * @see Constants#VISIBILITY_DIRECTIVE
995      * @since 1.3
996      */

997     public final static String JavaDoc VISIBILITY_PRIVATE = "private";
998
999     /**
1000     * Manifest header directive value (named &quot;reexport&quot;) identifying
1001     * a reexport visibility type. A reexport visibility type indicates any
1002     * packages that are exported by the required bundle are re-exported by the
1003     * requiring bundle. Any arbitrary arbitrary matching attributes with which
1004     * they were exported by the required bundle are deleted.
1005     *
1006     * <p>
1007     * The directive value is encoded in the Require-Bundle manifest header
1008     * like:
1009     *
1010     * <pre>
1011     * Require-Bundle: com.acme.module.test; visibility:=&quot;reexport&quot;
1012     * </pre>
1013     *
1014     * @see Constants#VISIBILITY_DIRECTIVE
1015     * @since 1.3
1016     */

1017    public final static String JavaDoc VISIBILITY_REEXPORT = "reexport";
1018    /**
1019     * Manifest header directive (named &quot;extension&quot;) identifying the
1020     * type of the extension fragment.
1021     *
1022     * <p>
1023     * The directive value is encoded in the Fragment-Host manifest header like:
1024     *
1025     * <pre>
1026     * Fragment-Host: system.bundle; extension:=&quot;framework&quot;
1027     * </pre>
1028     *
1029     * @see Constants#EXTENSION_FRAMEWORK
1030     * @see Constants#EXTENSION_BOOTCLASSPATH
1031     * @since 1.3
1032     */

1033    public final static String JavaDoc EXTENSION_DIRECTIVE = "extension";
1034
1035    /**
1036     * Manifest header directive value (named &quot;framework&quot;) identifying
1037     * the type of extension fragment. An extension fragment type of framework
1038     * indicates that the extension fragment is to be loaded by the framework's
1039     * class loader.
1040     *
1041     * <p>
1042     * The directive value is encoded in the Fragment-Host manifest header like:
1043     *
1044     * <pre>
1045     * Fragment-Host: system.bundle; extension:=&quot;framework&quot;
1046     * </pre>
1047     *
1048     * @see Constants#EXTENSION_DIRECTIVE
1049     * @since 1.3
1050     */

1051    public final static String JavaDoc EXTENSION_FRAMEWORK = "framework";
1052
1053    /**
1054     * Manifest header directive value (named &quot;bootclasspath&quot;)
1055     * identifying the type of extension fragment. An extension fragment type of
1056     * bootclasspath indicates that the extension fragment is to be loaded by
1057     * the boot class loader.
1058     *
1059     * <p>
1060     * The directive value is encoded in the Fragment-Host manifest header like:
1061     *
1062     * <pre>
1063     * Fragment-Host: system.bundle; extension:=&quot;bootclasspath&quot;
1064     * </pre>
1065     *
1066     * @see Constants#EXTENSION_DIRECTIVE
1067     * @since 1.3
1068     */

1069    public final static String JavaDoc EXTENSION_BOOTCLASSPATH = "bootclasspath";
1070
1071    /**
1072     * Manifest header (named &quot;Bundle-ActivationPolicy&quot;) identifying
1073     * the bundle's activation policy.
1074     * <p>
1075     * The attribute value may be retrieved from the <code>Dictionary</code>
1076     * object returned by the <code>Bundle.getHeaders</code> method.
1077     *
1078     * @since 1.4
1079     * @see Constants#ACTIVATION_LAZY
1080     * @see Constants#INCLUDE_DIRECTIVE
1081     * @see Constants#EXCLUDE_DIRECTIVE
1082     */

1083    public final static String JavaDoc BUNDLE_ACTIVATIONPOLICY = "Bundle-ActivationPolicy";
1084
1085    /**
1086     * Bundle activation policy (named &quot;lazy&quot;) declaring the bundle
1087     * must be activated when the first class load is made from the bundle.
1088     * <p>
1089     * A bundle with the lazy activation policy that is started with the
1090     * {@link Bundle#START_ACTIVATION_POLICY START_ACTIVATION_POLICY} option
1091     * will wait in the {@link Bundle#STARTING STARTING} state until the first
1092     * class load from the bundle occurs. The bundle will then be activated
1093     * before the class is returned to the requestor.
1094     * <p>
1095     * The activation policy value is specified as in the
1096     * Bundle-ActivationPolicy manifest header like:
1097     *
1098     * <pre>
1099     * Bundle-ActivationPolicy: lazy
1100     * </pre>
1101     *
1102     * @see Constants#BUNDLE_ACTIVATIONPOLICY
1103     * @see Bundle#start(int)
1104     * @see Bundle#START_ACTIVATION_POLICY
1105     * @since 1.4
1106     */

1107    public final static String JavaDoc ACTIVATION_LAZY = "lazy";
1108
1109}
Popular Tags