Package org.apache.felix.utils.service
Class BaseManagedServiceFactory<T>
- java.lang.Object
-
- org.apache.felix.utils.service.BaseManagedServiceFactory<T>
-
- All Implemented Interfaces:
org.osgi.service.cm.ManagedServiceFactory
public abstract class BaseManagedServiceFactory<T> extends java.lang.Object implements org.osgi.service.cm.ManagedServiceFactory
-
-
Field Summary
Fields Modifier and Type Field Description static longDEFAULT_TIMEOUT_BEFORE_INTERRUPT
-
Constructor Summary
Constructors Constructor Description BaseManagedServiceFactory(org.osgi.framework.BundleContext context, java.lang.String name)BaseManagedServiceFactory(org.osgi.framework.BundleContext context, java.lang.String name, long timeoutBeforeInterrupt)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected voidcheckConfiguration(java.lang.String pid, java.util.Dictionary properties)voiddeleted(java.lang.String pid)voiddestroy()protected abstract TdoCreate(java.util.Dictionary properties)protected abstract voiddoDestroy(T t)protected TdoUpdate(T t, java.util.Dictionary properties)protected abstract java.lang.String[]getExposedClasses(T t)java.lang.StringgetName()protected abstract voidinfo(java.lang.String message, java.lang.Throwable t)voidupdated(java.lang.String pid, java.util.Dictionary properties)protected abstract voidwarn(java.lang.String message, java.lang.Throwable t)
-
-
-
Field Detail
-
DEFAULT_TIMEOUT_BEFORE_INTERRUPT
public static final long DEFAULT_TIMEOUT_BEFORE_INTERRUPT
- See Also:
- Constant Field Values
-
-
Method Detail
-
getName
public java.lang.String getName()
- Specified by:
getNamein interfaceorg.osgi.service.cm.ManagedServiceFactory
-
updated
public void updated(java.lang.String pid, java.util.Dictionary properties) throws org.osgi.service.cm.ConfigurationException- Specified by:
updatedin interfaceorg.osgi.service.cm.ManagedServiceFactory- Throws:
org.osgi.service.cm.ConfigurationException
-
deleted
public void deleted(java.lang.String pid)
- Specified by:
deletedin interfaceorg.osgi.service.cm.ManagedServiceFactory
-
checkConfiguration
protected void checkConfiguration(java.lang.String pid, java.util.Dictionary properties) throws org.osgi.service.cm.ConfigurationException- Throws:
org.osgi.service.cm.ConfigurationException
-
doCreate
protected abstract T doCreate(java.util.Dictionary properties) throws java.lang.Exception
- Throws:
java.lang.Exception
-
doUpdate
protected T doUpdate(T t, java.util.Dictionary properties) throws java.lang.Exception
- Throws:
java.lang.Exception
-
doDestroy
protected abstract void doDestroy(T t) throws java.lang.Exception
- Throws:
java.lang.Exception
-
getExposedClasses
protected abstract java.lang.String[] getExposedClasses(T t)
-
warn
protected abstract void warn(java.lang.String message, java.lang.Throwable t)
-
info
protected abstract void info(java.lang.String message, java.lang.Throwable t)
-
destroy
public void destroy()
-
-