Package com.yahoo.jdisc.application
Class OsgiHeader
- java.lang.Object
-
- com.yahoo.jdisc.application.OsgiHeader
-
public abstract class OsgiHeader extends java.lang.Object
This interface acts as a namespace for the supported OSGi bundle headers.- Author:
- Simon Thoresen Hult
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
APPLICATION
static java.lang.String
PREINSTALL_BUNDLE
static java.lang.String
PRIVILEGED_ACTIVATOR
-
Constructor Summary
Constructors Constructor Description OsgiHeader()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.util.List<java.lang.String>
asList(org.osgi.framework.Bundle bundle, java.lang.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.static boolean
isSet(org.osgi.framework.Bundle bundle, java.lang.String headerName)
Returns true if the named header is present in the manifest of the given bundle.
-
-
-
Field Detail
-
APPLICATION
public static final java.lang.String APPLICATION
- See Also:
- Constant Field Values
-
PREINSTALL_BUNDLE
public static final java.lang.String PREINSTALL_BUNDLE
- See Also:
- Constant Field Values
-
PRIVILEGED_ACTIVATOR
public static final java.lang.String PRIVILEGED_ACTIVATOR
- See Also:
- Constant Field Values
-
-
Method Detail
-
isSet
public static boolean isSet(org.osgi.framework.Bundle bundle, java.lang.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 java.util.List<java.lang.String> asList(org.osgi.framework.Bundle bundle, java.lang.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.
-
-