All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.effectiveosgi.rt.command.CommandProcessorTracker Maven / Gradle / Ivy

There is a newer version: 0.0.6
Show newest version
package com.effectiveosgi.rt.command;

import org.apache.felix.service.command.CommandProcessor;
import org.osgi.framework.BundleContext;
import org.osgi.framework.ServiceReference;
import org.osgi.util.tracker.ServiceTracker;

class CommandProcessorTracker extends ServiceTracker {

	CommandProcessorTracker(BundleContext context) {
		super(context, CommandProcessor.class, null);
	}

	@Override
	public CommandArgsTracker addingService(ServiceReference reference) {
		final CommandProcessor processor = context.getService(reference);

		CommandArgsTracker argsTracker = new CommandArgsTracker(context, processor);
		argsTracker.open();
		return argsTracker;
	}

	@Override
	public void removedService(ServiceReference reference, CommandArgsTracker tracker) {
		tracker.close();
		context.ungetService(reference);
	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy