Skip to content

helgoboss/scala-osgi-metatype

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
src
 
 
 
 
 
 
 
 
 
 

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.

About

OSGi Metatype API for Scala

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages