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

domino.java.ServiceWatcherContext Maven / Gradle / Ivy

There is a newer version: 0.3.1
Show newest version
package domino.java;

import org.osgi.framework.ServiceReference;
import org.osgi.util.tracker.ServiceTracker;

/**
 * Contains details about the current service event. Might be expanded in
 * future.
 *
 * @param tracker
 *            Underlying service tracker
 * @param reference
 *            Service reference
 */
public class ServiceWatcherContext {

	private final ServiceTracker tracker;
	private final ServiceReference reference;

	public ServiceWatcherContext(final ServiceTracker tracker, final ServiceReference reference) {
		this.tracker = tracker;
		this.reference = reference;
	}

	public ServiceReference reference() {
		return reference;
	}

	public ServiceTracker tracker() {
		return tracker;
	}

	@Override
	public String toString() {
		return getClass().getSimpleName() +
				"(tracker=" + tracker +
				",reference=" + reference +
				")";
	}

}