org.apache.aries.blueprint.compendium.cm
Class BaseManagedServiceFactory<T>

java.lang.Object
  extended by org.apache.aries.blueprint.compendium.cm.BaseManagedServiceFactory<T>
All Implemented Interfaces:
org.osgi.service.cm.ManagedServiceFactory
Direct Known Subclasses:
CmManagedServiceFactory

public abstract class BaseManagedServiceFactory<T>
extends Object
implements org.osgi.service.cm.ManagedServiceFactory


Field Summary
static int BUNDLE_STOPPING
           
static int CONFIGURATION_ADMIN_OBJECT_DELETED
           
static long DEFAULT_TIMEOUT_BEFORE_INTERRUPT
           
static int INTERNAL_ERROR
           
protected  org.slf4j.Logger LOGGER
           
 
Constructor Summary
BaseManagedServiceFactory(org.osgi.framework.BundleContext context, String name)
           
BaseManagedServiceFactory(org.osgi.framework.BundleContext context, String name, long timeoutBeforeInterrupt)
           
 
Method Summary
protected  void checkConfiguration(String pid, Dictionary properties)
           
 void deleted(String pid)
           
 void destroy()
           
protected abstract  T doCreate(Dictionary properties)
           
protected abstract  void doDestroy(T t, Dictionary properties, int code)
           
protected abstract  T doUpdate(T t, Dictionary properties)
           
protected abstract  String[] getExposedClasses(T t)
           
 String getName()
           
 Map<org.osgi.framework.ServiceRegistration,T> getServices()
           
protected  void postRegister(T t, Dictionary properties, org.osgi.framework.ServiceRegistration registration)
           
protected  void preUnregister(T t, Dictionary properties, org.osgi.framework.ServiceRegistration registration)
           
 void updated(String pid, Dictionary properties)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_TIMEOUT_BEFORE_INTERRUPT

public static final long DEFAULT_TIMEOUT_BEFORE_INTERRUPT
See Also:
Constant Field Values

CONFIGURATION_ADMIN_OBJECT_DELETED

public static final int CONFIGURATION_ADMIN_OBJECT_DELETED
See Also:
Constant Field Values

BUNDLE_STOPPING

public static final int BUNDLE_STOPPING
See Also:
Constant Field Values

INTERNAL_ERROR

public static final int INTERNAL_ERROR
See Also:
Constant Field Values

LOGGER

protected final org.slf4j.Logger LOGGER
Constructor Detail

BaseManagedServiceFactory

public BaseManagedServiceFactory(org.osgi.framework.BundleContext context,
                                 String name)

BaseManagedServiceFactory

public BaseManagedServiceFactory(org.osgi.framework.BundleContext context,
                                 String name,
                                 long timeoutBeforeInterrupt)
Method Detail

getName

public String getName()
Specified by:
getName in interface org.osgi.service.cm.ManagedServiceFactory

getServices

public Map<org.osgi.framework.ServiceRegistration,T> getServices()

updated

public void updated(String pid,
                    Dictionary properties)
             throws org.osgi.service.cm.ConfigurationException
Specified by:
updated in interface org.osgi.service.cm.ManagedServiceFactory
Throws:
org.osgi.service.cm.ConfigurationException

deleted

public void deleted(String pid)
Specified by:
deleted in interface org.osgi.service.cm.ManagedServiceFactory

checkConfiguration

protected void checkConfiguration(String pid,
                                  Dictionary properties)
                           throws org.osgi.service.cm.ConfigurationException
Throws:
org.osgi.service.cm.ConfigurationException

doCreate

protected abstract T doCreate(Dictionary properties)
                       throws Exception
Throws:
Exception

doUpdate

protected abstract T doUpdate(T t,
                              Dictionary properties)
                       throws Exception
Throws:
Exception

doDestroy

protected abstract void doDestroy(T t,
                                  Dictionary properties,
                                  int code)
                           throws Exception
Throws:
Exception

getExposedClasses

protected abstract String[] getExposedClasses(T t)

postRegister

protected void postRegister(T t,
                            Dictionary properties,
                            org.osgi.framework.ServiceRegistration registration)

preUnregister

protected void preUnregister(T t,
                             Dictionary properties,
                             org.osgi.framework.ServiceRegistration registration)

destroy

public void destroy()


Copyright © 2009-2012 The Apache Software Foundation. All Rights Reserved.