com.openexchange.admin.daemons
Class AdminDaemon
java.lang.Object
com.openexchange.admin.daemons.AdminDaemon
public class AdminDaemon
- extends Object
AdminDaemon
public AdminDaemon()
getCurrentBundleStatus
public void getCurrentBundleStatus(BundleContext context)
- This method is used for initialization of the list of current running bundles.
The problem is that the listener itself will not get any events before this
bundle is started, so if any bundles are started beforehand you won't notice
this here. The consequence is that we have to build an initial list on startup
- Parameters:
context
-
registerBundleListener
public void registerBundleListener(BundleContext context)
initCache
public void initCache()
throws OXGenericException
- Throws:
OXGenericException
initAccessCombinationsInCache
public void initAccessCombinationsInCache()
throws ClassNotFoundException,
OXGenericException
- Throws:
ClassNotFoundException
OXGenericException
initRMI
public void initRMI(BundleContext context)
unregisterRMI
public void unregisterRMI()
getRegistry
public static final Registry getRegistry()
getProp
public static PropertyHandler getProp()
getBundlelist
public static final ArrayList<Bundle> getBundlelist()
getService
public static final <S> S getService(String bundleSymbolicName,
String serviceName,
BundleContext context,
Class<? extends S> clazz)
- Looks for a matching service reference inside all bundles provided
through
getBundlelist()
.
- Type Parameters:
S
- Type of the service- Parameters:
bundleSymbolicName
- The bundle's symbolic name which offers the serviceserviceName
- The service's name provided through "name" propertycontext
- The bundle context (on which
BundleContext#getService(ServiceReference)
is invoked)clazz
- The service's class
- Returns:
- The service if found; otherwise
null
ungetService
public static final void ungetService(String bundleSymbolicName,
String serviceName,
BundleContext context)
- Ungets the service identified through given bundle's symbolic name and "name"
property.
- Parameters:
bundleSymbolicName
- The bundle's symbolic name which offers the serviceserviceName
- The service's name provided through "name" propertycontext
- The bundle context (on which
BundleContext#ungetService(ServiceReference)
is
invoked)