domino.java.ServiceWatcherContext Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of domino-java Show documentation
Show all versions of domino-java Show documentation
A lightweight Java library for writing elegant OSGi bundle activators
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 +
")";
}
}