Class OsgiHeader

java.lang.Object
com.yahoo.jdisc.application.OsgiHeader

public abstract class OsgiHeader extends Object
This interface acts as a namespace for the supported OSGi bundle headers.
Author:
Simon Thoresen Hult
  • Field Details

  • Constructor Details

    • OsgiHeader

      public OsgiHeader()
  • Method Details

    • isSet

      public static boolean isSet(org.osgi.framework.Bundle bundle, String headerName)
      Returns true if the named header is present in the manifest of the given bundle.
      Parameters:
      bundle - The bundle whose manifest to check.
      headerName - The name of the header to check for.
      Returns:
      True if header is present.
    • asList

      public static List<String> asList(org.osgi.framework.Bundle bundle, String headerName)
      This method reads the named header from the manifest of the given bundle, and parses it as a comma-separated list of values. If the header is not set, this method returns an empty list.
      Parameters:
      bundle - The bundle whose manifest to parse the header from.
      headerName - The name of the header to parse.
      Returns:
      A list of parsed header values, may be empty.