Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorslewis2009-10-17 15:26:08 -0400
committerslewis2009-10-17 15:26:08 -0400
commit872988c48f4c3d2bd9fa80950d1603878ff0fbcc (patch)
treef5a8ac4aee7c2568f5c6fe46903c2d79c327fe90 /framework/bundles/org.eclipse.ecf.identity/src
parent67e4c5c66e38b83c55708328429ecf0d252f3be2 (diff)
downloadorg.eclipse.ecf-872988c48f4c3d2bd9fa80950d1603878ff0fbcc.tar.gz
org.eclipse.ecf-872988c48f4c3d2bd9fa80950d1603878ff0fbcc.tar.xz
org.eclipse.ecf-872988c48f4c3d2bd9fa80950d1603878ff0fbcc.zip
Added IDFactory service tracker utility class
Diffstat (limited to 'framework/bundles/org.eclipse.ecf.identity/src')
-rw-r--r--framework/bundles/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/util/IDFactoryTracker.java31
1 files changed, 31 insertions, 0 deletions
diff --git a/framework/bundles/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/util/IDFactoryTracker.java b/framework/bundles/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/util/IDFactoryTracker.java
new file mode 100644
index 000000000..187758f4d
--- /dev/null
+++ b/framework/bundles/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/util/IDFactoryTracker.java
@@ -0,0 +1,31 @@
+/*******************************************************************************
+ * Copyright (c) 2009 EclipseSource and others. All rights reserved. This
+ * program and the accompanying materials are made available under the terms of
+ * the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * EclipseSource - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.ecf.core.util;
+
+import org.eclipse.ecf.core.identity.IIDFactory;
+import org.osgi.framework.BundleContext;
+import org.osgi.util.tracker.ServiceTracker;
+
+/**
+ * Service tracker customized to handle tracking the ECF id factory service
+ * (singleton).
+ *
+ */
+public class IDFactoryTracker extends ServiceTracker {
+
+ public IDFactoryTracker(BundleContext context) {
+ super(context, IIDFactory.class.getName(), null);
+ }
+
+ public IIDFactory getIDFactory() {
+ return (IIDFactory) getService();
+ }
+
+}

Back to the top