OSGi Metatype API for Scala
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src
.gitignore
LICENSE
README.md
pom.xml

README.md

ATTENTION: scala-osgi-metatype is now included in Domino! This repository is deprecated.

Scala OSGi Metatype

Scala OSGi Metatype is basically the OSGi Metatype API translated to idiomatic Scala. It contains interfaces, adapters and builders for easily building OSGi Metatype descriptions.

For those who don't know the OSGi Metatype API, it's a very practical addition to the OSGi ConfigurationAdmin API for describing configuration GUIs.

Example

The following example demonstrates how you can describe configuration parameters for a service.

import org.helgoboss.scala_osgi_metatype.builders._

val myObjectClass = ObjectClass(
  id = "org.helgoboss.my_service",
  name = "My configurable service",
  requiredAttributes = List(
    ElementaryAttribute[Int](id = "size", name = "Size", default = Some(5)),
    ElementaryAttribute[String](id = "user", name = "User", default = Some("root"))
  )
)

Documentation

  • Scaladoc

Further reading

Scala OSGi Metatype is nicely integrated into the Domino library. You might want to have a look at its user guide.