Class Activator
- java.lang.Object
-
- net.ssehub.easy.instantiation.maven.Activator
-
- All Implemented Interfaces:
org.osgi.framework.BundleActivator
public class Activator extends java.lang.Object implements org.osgi.framework.BundleActivatorAn explicit bundle activator providing access to the resources of this bundle.- Author:
- Holger Eichelberger
-
-
Field Summary
Fields Modifier and Type Field Description private static org.osgi.framework.Bundlebundlestatic java.lang.StringBUNDLE_IDstatic java.lang.StringPROTOCOL_FILE
-
Constructor Summary
Constructors Constructor Description Activator()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static java.net.URL[]getJars()Returns all library jars.static booleanisFileProtocol(java.net.URL url)Returns whetherurlis using a file protocol.static java.net.URLresolve(java.net.URL url)Resolves an URL.voidstart(org.osgi.framework.BundleContext context)voidstop(org.osgi.framework.BundleContext context)
-
-
-
Field Detail
-
PROTOCOL_FILE
public static final java.lang.String PROTOCOL_FILE
- See Also:
- Constant Field Values
-
BUNDLE_ID
public static final java.lang.String BUNDLE_ID
- See Also:
- Constant Field Values
-
bundle
private static org.osgi.framework.Bundle bundle
-
-
Method Detail
-
start
public void start(org.osgi.framework.BundleContext context) throws java.lang.Exception- Specified by:
startin interfaceorg.osgi.framework.BundleActivator- Throws:
java.lang.Exception
-
stop
public void stop(org.osgi.framework.BundleContext context) throws java.lang.Exception- Specified by:
stopin interfaceorg.osgi.framework.BundleActivator- Throws:
java.lang.Exception
-
getJars
public static java.net.URL[] getJars()
Returns all library jars.- Returns:
- all library jars (may be null if not found or not running as OSGi bundle)
-
isFileProtocol
public static boolean isFileProtocol(java.net.URL url)
Returns whetherurlis using a file protocol.- Parameters:
url- the URL- Returns:
trueif protocol is file,falseelse
-
resolve
public static java.net.URL resolve(java.net.URL url)
Resolves an URL.- Parameters:
url- the URL to be resolved- Returns:
- the resolved URL
-
-