com.openexchange.admin.daemons
Class AdminDaemon

java.lang.Object
  extended by com.openexchange.admin.daemons.AdminDaemon

public class AdminDaemon
extends Object


Nested Class Summary
 class AdminDaemon.LocalServerFactory
           
 
Constructor Summary
AdminDaemon()
           
 
Method Summary
static ArrayList<Bundle> getBundlelist()
           
 void getCurrentBundleStatus(BundleContext context)
          This method is used for initialization of the list of current running bundles.
static PropertyHandler getProp()
           
static Registry getRegistry()
           
static
<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().
 void initAccessCombinationsInCache()
           
 void initCache()
           
 void initRMI(BundleContext context)
           
 void registerBundleListener(BundleContext context)
           
static void ungetService(String bundleSymbolicName, String serviceName, BundleContext context)
          Ungets the service identified through given bundle's symbolic name and "name" property.
 void unregisterRMI()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AdminDaemon

public AdminDaemon()
Method Detail

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 service
serviceName - The service's name provided through "name" property
context - 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 service
serviceName - The service's name provided through "name" property
context - The bundle context (on which BundleContext#ungetService(ServiceReference) is invoked)