diff options
author | slewis | 2009-10-17 19:26:08 +0000 |
---|---|---|
committer | slewis | 2009-10-17 19:26:08 +0000 |
commit | 872988c48f4c3d2bd9fa80950d1603878ff0fbcc (patch) | |
tree | f5a8ac4aee7c2568f5c6fe46903c2d79c327fe90 /framework/bundles/org.eclipse.ecf.identity/src/org/eclipse/ecf | |
parent | 67e4c5c66e38b83c55708328429ecf0d252f3be2 (diff) | |
download | org.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/org/eclipse/ecf')
-rw-r--r-- | framework/bundles/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/util/IDFactoryTracker.java | 31 |
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(); + } + +} |