Hi Lloyd,
what kind of info are you speaking about?
Custom descriptive info mainly. It will be used by classes in my framework
when loading/managing bundles. In the OSGi specs, a bundle maps to an
assembly with custom info in it's equivalent of the Java MANIFEST.MF file.
Examples of the sort of custom info follows (sorry it's a bit long):
Bundle-Activator: com.acme.fw.Activator
The Bundle-Activator header specifies the name of the class used to start
and
stop the bundle.
Bundle-Category: osgi, test, nursery
The Bundle-Category header holds a comma-separated list of category
names.
Bundle-Classpath: /jar/http.jar,.
The Bundle-Classpath header defines a comma-separated list of JAR file path
names or directories (inside the bundle) containing classes and resources.
Bundle-Copyright: OSGi (c) 2002
The Bundle-Copyright header contains the copyright specification for this
bundle.
Bundle-DocURL: http:/
www.acme.com/Firewall/doc
The Bundle-DocURL headers must contain a URL pointing to documentation
about this bundle.
Bundle-Localization: OSGI-INF/l10n/bundle
The Bundle-Location header contains the location in the bundle where
localization files can be found.
Bundle-NativeCode: /lib/http.DLL; osname = QNX; osversion = 3.1
The Bundle-NativeCode header contains a specification of native code
libraries contained in this bundle.
Bundle-RequiredExecutionEnvironment: CDC-1.0/Foundation-1.0
The Bundle-RequiredExecutionEnvironment contains a comma-separated
list of execution environments that must be present on the Service Platform.
DynamicImport-Package: com.acme.plugin.*
The DynamicImport-Package header contains a comma-separated list of
package names that should be dynamically imported when needed.
Export-Package: org.osgi.util.tracker;version=1.3
The Export-Package header contains a declaration of exported packages.
Fragment-Host: org.eclipse.swt; bundle-version="[3.0.0,4.0.0)"
The Fragment-Host header defines the host bundle for this fragment.
Import-Package: org.osgi.util.tracker,org.osgi.service.io;version=1.4
The Import-Package header declares the imported packages for this bundle.
Require-Bundle: com.acme.chess
The Require-Bundle header specifies the required exports from another
bundle.
info about assembly author, etc....
are stored as attirbute like that:
===
[assembly: AssemblyTitle("NGui")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("NGui")]
[assembly: AssemblyCopyright("Copyright © 2005")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
===
I initially thought of representing this information with custom attributes.
I didn't because I'm worried about losing flexibility because changing a
bundle's "Bundle-Category" attribute would now require a rebuild of the
otherwise unchanged bundle/assembly's source code. Is there a way round that
with the CLR model?
Kunle