diff options
author | 2017-09-06 12:03:51 -0400 | |
---|---|---|
committer | 2017-09-06 12:04:45 -0400 | |
commit | 4ca4e0d5b321d3f4f321b49df02498d66b547d11 (patch) | |
tree | f148f54336b2ecadaa5200d836eb1c4238c0540a /filters/provider/src/main/java | |
parent | b6ad62d01b1045ff03c03aa05ee1beeaabc633c7 (diff) |
Fix SDNC service registration
Convert the BundleActivator to a POJO provider, and do the service registration
through blueprint instead.
Issue-Id: SDNC-54
Change-Id: Ia5618ef443967803b31da1ac9e020d1092c3ab8d
Signed-off-by: Ryan Goulding <ryandgoulding@gmail.com>
Diffstat (limited to 'filters/provider/src/main/java')
-rw-r--r-- | filters/provider/src/main/java/org/onap/ccsdk/sli/core/filters/FiltersService.java | 4 | ||||
-rw-r--r-- | filters/provider/src/main/java/org/onap/ccsdk/sli/core/filters/FiltersServiceImpl.java (renamed from filters/provider/src/main/java/org/onap/ccsdk/sli/core/filters/Activator.java) | 38 |
2 files changed, 8 insertions, 34 deletions
diff --git a/filters/provider/src/main/java/org/onap/ccsdk/sli/core/filters/FiltersService.java b/filters/provider/src/main/java/org/onap/ccsdk/sli/core/filters/FiltersService.java new file mode 100644 index 000000000..9587e8d96 --- /dev/null +++ b/filters/provider/src/main/java/org/onap/ccsdk/sli/core/filters/FiltersService.java @@ -0,0 +1,4 @@ +package org.onap.ccsdk.sli.core.filters; + +public interface FiltersService { +} diff --git a/filters/provider/src/main/java/org/onap/ccsdk/sli/core/filters/Activator.java b/filters/provider/src/main/java/org/onap/ccsdk/sli/core/filters/FiltersServiceImpl.java index 6cac336a1..12370ca9a 100644 --- a/filters/provider/src/main/java/org/onap/ccsdk/sli/core/filters/Activator.java +++ b/filters/provider/src/main/java/org/onap/ccsdk/sli/core/filters/FiltersServiceImpl.java @@ -21,43 +21,13 @@ package org.onap.ccsdk.sli.core.filters; -import org.osgi.framework.BundleActivator; -import org.osgi.framework.BundleContext; -import org.osgi.framework.ServiceRegistration; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +public class FiltersServiceImpl implements FiltersService { + private static final Logger LOG = LoggerFactory.getLogger(FiltersServiceImpl.class); -public class Activator implements BundleActivator { - - private ServiceRegistration registration = null; - - private static final Logger LOG = LoggerFactory.getLogger(Activator.class); - - @Override - public void start(BundleContext ctx) throws Exception { - - - - Object impl = new String(); - String regName = impl.getClass().getName(); - - if (registration == null) - { - LOG.debug("Registering Filters service "+regName); - registration = ctx.registerService(regName, impl, null); - } - - } - - @Override - public void stop(BundleContext ctx) throws Exception { - - if (registration != null) - { - registration.unregister(); - registration = null; - } + public FiltersServiceImpl() { + LOG.debug("Registering {}", FiltersServiceImpl.class.getName()); } - } |