Search in sources :

Example 1 with Converter

use of org.apache.felix.service.command.Converter in project karaf by apache.

the class SecuredCommandProcessorImpl method trackConverters.

private ServiceTracker<Converter, Converter> trackConverters(BundleContext context) {
    return new ServiceTracker<Converter, Converter>(context, Converter.class.getName(), null) {

        @Override
        public Converter addingService(ServiceReference<Converter> reference) {
            Converter converter = super.addingService(reference);
            addConverter(converter);
            return converter;
        }

        @Override
        public void removedService(ServiceReference<Converter> reference, Converter service) {
            removeConverter(service);
            super.removedService(reference, service);
        }
    };
}
Also used : ServiceTracker(org.osgi.util.tracker.ServiceTracker) Converter(org.apache.felix.service.command.Converter) ServiceReference(org.osgi.framework.ServiceReference)

Aggregations

Converter (org.apache.felix.service.command.Converter)1 ServiceReference (org.osgi.framework.ServiceReference)1 ServiceTracker (org.osgi.util.tracker.ServiceTracker)1