public abstract class BaseOsgiHost extends Object implements OsgiHost
Modifier and Type | Field and Description |
---|---|
protected javax.servlet.ServletContext |
servletContext |
protected static Pattern |
versionPattern |
OSGI_BUNDLE_CONTEXT, OSGI_HEADER_STRUTS_ENABLED
Constructor and Description |
---|
BaseOsgiHost() |
Modifier and Type | Method and Description |
---|---|
protected void |
addAutoStartBundles(Properties configProps) |
protected void |
addExportedPackages(Properties strutsConfigProps,
Properties configProps) |
protected abstract void |
addSpringOSGiSupport() |
abstract void |
destroy() |
abstract Map<String,org.osgi.framework.Bundle> |
getActiveBundles() |
abstract org.osgi.framework.BundleContext |
getBundleContext() |
abstract Map<String,org.osgi.framework.Bundle> |
getBundles()
This bundle map will not change, but the status of the bundles can change over time.
|
protected List<String> |
getBundlesInDir(String dir) |
protected String |
getJarUrl(Class clazz) |
protected Properties |
getProperties(String fileName) |
protected Map<String,String> |
getRunLevelDirs(String dir) |
protected String |
getServletContextParam(String paramName,
String defaultValue)
Gets a param from the ServletContext, returning the default value if the param is not set
|
protected String |
getVersion(URL url) |
protected String |
getVersionFromString(String str) |
abstract void |
init(javax.servlet.ServletContext servletContext) |
protected void |
replaceSystemPackages(Properties properties) |
protected static final Pattern versionPattern
protected javax.servlet.ServletContext servletContext
public abstract void init(javax.servlet.ServletContext servletContext)
public abstract void destroy() throws Exception
public abstract Map<String,org.osgi.framework.Bundle> getBundles()
getBundles
in interface OsgiHost
public abstract Map<String,org.osgi.framework.Bundle> getActiveBundles()
getActiveBundles
in interface OsgiHost
public abstract org.osgi.framework.BundleContext getBundleContext()
getBundleContext
in interface OsgiHost
protected abstract void addSpringOSGiSupport()
protected String getServletContextParam(String paramName, String defaultValue)
paramName
- the name of the param to get from the ServletContextdefaultValue
- value to return if the param is not setprotected void addAutoStartBundles(Properties configProps)
protected Map<String,String> getRunLevelDirs(String dir)
dir
- directoryprotected void replaceSystemPackages(Properties properties)
protected void addExportedPackages(Properties strutsConfigProps, Properties configProps)
protected String getVersion(URL url)
url
- URL for packageprotected String getVersionFromString(String str)
str
- string for extract versionprotected Properties getProperties(String fileName)
Copyright © 2000–2020 Apache Software Foundation. All rights reserved.