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 Object implements org.osgi.service.cm.ManagedServiceFactory

## Field Summary

Fields
Modifier and Type
Field
Description
`static final long`
`DEFAULT_TIMEOUT_BEFORE_INTERRUPT`

## Constructor Summary

Constructors
Constructor
Description
`BaseManagedServiceFactory(org.osgi.framework.BundleContext context, String name)`
`BaseManagedServiceFactory(org.osgi.framework.BundleContext context, String name, long timeoutBeforeInterrupt)`

## Method Summary

Modifier and Type
Method
Description
`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)`
`protected T`
`doUpdate(T t, Dictionary properties)`
`protected abstract String[]`
`getExposedClasses(T t)`
`String`
`getName()`
`protected abstract void`
`info(String message, Throwable t)`
`void`
`updated(String pid, Dictionary properties)`
`protected abstract void`
`warn(String message, Throwable t)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Field Details

### DEFAULT_TIMEOUT_BEFORE_INTERRUPT

public static final long DEFAULT_TIMEOUT_BEFORE_INTERRUPT

See Also:
  - Constant Field Values

## Constructor Details

### BaseManagedServiceFactory

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

### BaseManagedServiceFactory

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

## Method Details

### getName

public String getName()

Specified by:
  `getName` in interface `org.osgi.service.cm.ManagedServiceFactory`

### 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 T doUpdate(T t, Dictionary properties) throws Exception

Throws:
  `Exception`

### doDestroy

protected abstract void doDestroy(T t) throws Exception

Throws:
  `Exception`

### getExposedClasses

protected abstract String[] getExposedClasses(T t)

### warn

protected abstract void warn(String message, Throwable t)

### info

protected abstract void info(String message, Throwable t)

### destroy

public void destroy()