Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/serviceregistry/ServiceRegistrationImpl.java')
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/serviceregistry/ServiceRegistrationImpl.java16
1 files changed, 16 insertions, 0 deletions
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/serviceregistry/ServiceRegistrationImpl.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/serviceregistry/ServiceRegistrationImpl.java
index 6ad73da28..fbe499653 100644
--- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/serviceregistry/ServiceRegistrationImpl.java
+++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/serviceregistry/ServiceRegistrationImpl.java
@@ -387,6 +387,22 @@ public class ServiceRegistrationImpl<S> implements ServiceRegistration<S>, Compa
}
/**
+ * Get a copy of the service's properties.
+ *
+ * <p>This method will continue to return the properties after the
+ * service has been unregistered. This is so that references to
+ * unregistered service can be interrogated.
+ * (For example: ServiceReference objects stored in the log.)
+ *
+ * @return A copy of the properties.
+ */
+ Dictionary<String, Object> getPropertiesCopy() {
+ synchronized (registrationLock) {
+ return new ServiceProperties(properties);
+ }
+ }
+
+ /**
* Return the service id for this service.
* @return The service id for this service.
*/

Back to the top