OSGiBundleCompatibilityChecking: HomePage |
from Wiki KIVu |
OSGi Bundle Compatibility Checking - projekt na verifikaci typové kompatibility OSGi komponent a jejich vazeb. Viz oficiální stránky na skupině DSS.
Mostly with respect to compatibility evaluation, type matching.
Available interfaces and services in OSGi are
org.osgi.framework BundleContext :: getBundles() -> Bundle[]
org.osgi.framework.Bundle :: getRegisteredServices() and getServicesInUse()
org.osgi.service.packageadmin PackageAdmin :: getExportedPackages(Bundle bundle) -> ExportedPackage[] and getRequiredBundles(java.lang.String symbolicName) -> RequiredBundle[]
Use of properties for version specification and matching:
target
filter of a reference
is available as the enclosing component's property with name (key in the property map) reference_name.target
. E.g. for <reference name="factory" interface="f.q.name" target="(creation.method=shallow-copy)"> the filter is manifested in the enclosing component as property (112.3.4) factory.target="(creation.method=shallow-copy)"
. Thus we could have <reference name="xyz" \ldots target="(interface.version>=1.3.0)"> resulting in component's property xyz.target="(interface.version>=1.3.0)
.
Exported features are called "capabilities". Imported ones ("requirements") are actually named filter expressions.
Version spec and matching:
OSGi filters use LDAP filter syntax (RFC 4515) and matching rules (RFC 4517, partially explained in OpenDS wiki)
Aside: SCR uses ``event strategy'' for binding services which is in fact dependency injection - the component declares setter and unsetter methods to bind and unbind a reference, these are called by the SCR ie the framework
Patří do KategorieProjekty.