protected ThreadInvocationCounter initialValue() {
return new ThreadInvocationCounter(maxRecursionDepth);
}
};
BundleContext bundleContext = ctx.getBundleContext();
this.queue = new ReferenceQueue<Object>();
this.disposalCallbacks = new ConcurrentHashMap<java.lang.ref.Reference<Object>, DisposalCallbackRegistryImpl>();
Hashtable<Object, Object> properties = new Hashtable<Object, Object>();
properties.put(Constants.SERVICE_VENDOR, "Apache Software Foundation");
properties.put(Constants.SERVICE_DESCRIPTION, "Sling Models OSGi Service Disposal Job");
properties.put("scheduler.concurrent", false);
properties.put("scheduler.period", Long.valueOf(30));
this.jobRegistration = bundleContext.registerService(Runnable.class.getName(), this, properties);
this.listener = new ModelPackageBundleListener(ctx.getBundleContext(), this, this.adapterImplementations);
Hashtable<Object, Object> printerProps = new Hashtable<Object, Object>();
printerProps.put(Constants.SERVICE_VENDOR, "Apache Software Foundation");
printerProps.put(Constants.SERVICE_DESCRIPTION, "Sling Models Configuration Printer");
printerProps.put("felix.webconsole.label", "slingmodels");
printerProps.put("felix.webconsole.title", "Sling Models");
printerProps.put("felix.webconsole.configprinter.modes", "always");
this.configPrinterRegistration = bundleContext.registerService(Object.class.getName(),
new ModelConfigurationPrinter(this), printerProps);
}