Deprecate messagebus for removal 30/95230/1
authorRobert Varga <robert.varga@pantheon.tech>
Fri, 19 Feb 2021 06:43:50 +0000 (07:43 +0100)
committerRobert Varga <robert.varga@pantheon.tech>
Fri, 19 Feb 2021 06:44:24 +0000 (07:44 +0100)
This component is going away, deprecate it.

JIRA: CONTROLLER-1973
Change-Id: I993cf6311c30b37bc64c9d7dbd244d54c26c8da5
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
15 files changed:
opendaylight/md-sal/messagebus-impl/src/main/java/org/opendaylight/controller/messagebus/app/impl/EventSourceRegistrationImpl.java
opendaylight/md-sal/messagebus-impl/src/main/java/org/opendaylight/controller/messagebus/app/impl/EventSourceTopic.java
opendaylight/md-sal/messagebus-impl/src/main/java/org/opendaylight/controller/messagebus/app/impl/EventSourceTopology.java
opendaylight/md-sal/messagebus-impl/src/main/java/org/opendaylight/controller/messagebus/app/impl/OSGiEventSourceRegistry.java
opendaylight/md-sal/messagebus-impl/src/test/java/org/opendaylight/controller/messagebus/app/impl/EventSourceRegistrationImplTest.java
opendaylight/md-sal/messagebus-impl/src/test/java/org/opendaylight/controller/messagebus/app/impl/EventSourceTopicTest.java
opendaylight/md-sal/messagebus-impl/src/test/java/org/opendaylight/controller/messagebus/app/impl/EventSourceTopologyTest.java
opendaylight/md-sal/messagebus-spi/src/main/java/org/opendaylight/controller/messagebus/spi/EventSource.java
opendaylight/md-sal/messagebus-spi/src/main/java/org/opendaylight/controller/messagebus/spi/EventSourceRegistration.java
opendaylight/md-sal/messagebus-spi/src/main/java/org/opendaylight/controller/messagebus/spi/EventSourceRegistry.java
opendaylight/md-sal/messagebus-util/pom.xml
opendaylight/md-sal/messagebus-util/src/main/java/org/opendaylight/controller/messagebus/app/util/TopicDOMNotification.java
opendaylight/md-sal/messagebus-util/src/main/java/org/opendaylight/controller/messagebus/app/util/Util.java
opendaylight/md-sal/messagebus-util/src/test/java/org/opendaylight/controller/messagebus/app/util/TopicDOMNotificationTest.java
opendaylight/md-sal/messagebus-util/src/test/java/org/opendaylight/controller/messagebus/app/util/UtilTest.java

index 89b8a9c..1779ad8 100644 (file)
@@ -13,6 +13,7 @@ import org.opendaylight.controller.messagebus.spi.EventSource;
 import org.opendaylight.controller.messagebus.spi.EventSourceRegistration;
 import org.opendaylight.yangtools.concepts.AbstractObjectRegistration;
 
+@Deprecated(forRemoval = true)
 class EventSourceRegistrationImpl<T extends EventSource> extends AbstractObjectRegistration<T>
         implements EventSourceRegistration<T> {
 
@@ -24,7 +25,7 @@ class EventSourceRegistrationImpl<T extends EventSource> extends AbstractObjectR
      * @param instance of EventSource that has been registered by
      *     {@link EventSourceRegistryImpl#registerEventSource(Node, EventSource)}
      */
-    EventSourceRegistrationImpl(T instance, EventSourceTopology eventSourceTopology) {
+    EventSourceRegistrationImpl(final T instance, final EventSourceTopology eventSourceTopology) {
         super(instance);
         this.eventSourceTopology = requireNonNull(eventSourceTopology);
     }
index 2deb357..af2099c 100644 (file)
@@ -42,14 +42,16 @@ import org.opendaylight.yangtools.yang.common.RpcError;
 import org.opendaylight.yangtools.yang.common.RpcResult;
 import org.slf4j.LoggerFactory;
 
+@Deprecated(forRemoval = true)
 public final class EventSourceTopic implements DataTreeChangeListener<Node>, AutoCloseable {
     private static final org.slf4j.Logger LOG = LoggerFactory.getLogger(EventSourceTopic.class);
+
+    private final CopyOnWriteArraySet<InstanceIdentifier<?>> joinedEventSources = new CopyOnWriteArraySet<>();
     private final NotificationPattern notificationPattern;
     private final EventSourceService sourceService;
     private final Pattern nodeIdPattern;
     private final TopicId topicId;
     private ListenerRegistration<?> listenerRegistration;
-    private final CopyOnWriteArraySet<InstanceIdentifier<?>> joinedEventSources = new CopyOnWriteArraySet<>();
 
     public static EventSourceTopic create(final NotificationPattern notificationPattern,
             final String nodeIdRegexPattern, final EventSourceTopology eventSourceTopology) {
index 7f53a53..b22eee2 100644 (file)
@@ -57,6 +57,7 @@ import org.opendaylight.yangtools.yang.common.RpcResult;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+@Deprecated(forRemoval = true)
 public class EventSourceTopology implements EventAggregatorService, EventSourceRegistry {
     private static final Logger LOG = LoggerFactory.getLogger(EventSourceTopology.class);
 
@@ -79,7 +80,7 @@ public class EventSourceTopology implements EventAggregatorService, EventSourceR
     private final RpcProviderService rpcRegistry;
 
     public EventSourceTopology(final DataBroker dataBroker, final RpcProviderService providerService,
-            RpcConsumerRegistry rpcService) {
+            final RpcConsumerRegistry rpcService) {
 
         this.dataBroker = dataBroker;
         this.rpcRegistry = providerService;
index 29389ab..07e66d2 100644 (file)
@@ -23,6 +23,7 @@ import org.slf4j.LoggerFactory;
 
 @Beta
 @Component(immediate = true)
+@Deprecated(forRemoval = true)
 public final class OSGiEventSourceRegistry implements EventSourceRegistry {
     private static final Logger LOG = LoggerFactory.getLogger(OSGiEventSourceRegistry.class);
 
index 838d174..82ef60d 100644 (file)
@@ -17,6 +17,7 @@ import org.junit.BeforeClass;
 import org.junit.Test;
 import org.opendaylight.controller.messagebus.spi.EventSource;
 
+@Deprecated(forRemoval = true)
 public class EventSourceRegistrationImplTest {
 
     EventSourceRegistrationImplLocal eventSourceRegistrationImplLocal;
@@ -42,7 +43,7 @@ public class EventSourceRegistrationImplTest {
 
 
     private class EventSourceRegistrationImplLocal extends EventSourceRegistrationImpl<EventSource> {
-        EventSourceRegistrationImplLocal(EventSource instance, EventSourceTopology eventSourceTopology) {
+        EventSourceRegistrationImplLocal(final EventSource instance, final EventSourceTopology eventSourceTopology) {
             super(instance, eventSourceTopology);
         }
     }
index d785287..6059d9a 100644 (file)
@@ -39,6 +39,7 @@ import org.opendaylight.yangtools.yang.binding.DataObject;
 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
 import org.opendaylight.yangtools.yang.common.RpcResultBuilder;
 
+@Deprecated(forRemoval = true)
 public class EventSourceTopicTest {
 
     EventSourceTopic eventSourceTopic;
index 868dd9d..2022869 100644 (file)
@@ -49,6 +49,7 @@ import org.opendaylight.yangtools.concepts.Registration;
 import org.opendaylight.yangtools.yang.binding.DataObject;
 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
 
+@Deprecated(forRemoval = true)
 public class EventSourceTopologyTest {
 
     EventSourceTopology eventSourceTopology;
index 3221e13..6d57b4d 100644 (file)
@@ -20,9 +20,8 @@ import org.opendaylight.yangtools.yang.model.api.SchemaPath;
  * EventSourceRegistry will call method JoinTopic to request EventSource to publish notification.
  * Event source must implement method JoinTopic (from superinterface {@link EventSourceService}).
  */
-
+@Deprecated(forRemoval = true)
 public interface EventSource extends EventSourceService, AutoCloseable {
-
     /**
      * Identifier of node associated with event source.
      *
index dd6cc1a..d885461 100644 (file)
@@ -12,10 +12,9 @@ import org.opendaylight.yangtools.concepts.ObjectRegistration;
 /**
  * Instance of EventSourceRegistration is returned by {@link EventSourceRegistry#registerEventSource(EventSource)}
  * and it is used to unregister EventSource.
- *
  */
+@Deprecated(forRemoval = true)
 public interface EventSourceRegistration<T extends EventSource> extends ObjectRegistration<T> {
-
     @Override
     void close();
 }
index e5d617f..75ba7d0 100644 (file)
@@ -39,7 +39,6 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
         <dependency>
               <groupId>org.glassfish.jersey.test-framework.providers</groupId>
               <artifactId>jersey-test-framework-provider-grizzly2</artifactId>
-              <version>2.4</version>
               <scope>test</scope>
         </dependency>
     </dependencies>
index 348abad..7afb381 100644 (file)
@@ -13,6 +13,7 @@ import org.opendaylight.yang.gen.v1.urn.cisco.params.xml.ns.yang.messagebus.even
 import org.opendaylight.yangtools.yang.data.api.schema.ContainerNode;
 import org.opendaylight.yangtools.yang.model.api.stmt.SchemaNodeIdentifier.Absolute;
 
+@Deprecated(forRemoval = true)
 public class TopicDOMNotification implements DOMNotification {
     private static final @NonNull Absolute TOPIC_NOTIFICATION_ID = Absolute.of(TopicNotification.QNAME);
 
index 0b28e55..8546f9a 100644 (file)
@@ -17,6 +17,7 @@ import org.opendaylight.yangtools.yang.common.RpcResult;
 import org.opendaylight.yangtools.yang.common.RpcResultBuilder;
 import org.opendaylight.yangtools.yang.model.api.SchemaPath;
 
+@Deprecated(forRemoval = true)
 public final class Util {
     private Util() {
     }
index be11b10..fec1f5e 100644 (file)
@@ -19,6 +19,7 @@ import org.opendaylight.yang.gen.v1.urn.cisco.params.xml.ns.yang.messagebus.even
 import org.opendaylight.yangtools.yang.data.api.schema.ContainerNode;
 import org.opendaylight.yangtools.yang.model.api.stmt.SchemaNodeIdentifier.Absolute;
 
+@Deprecated(forRemoval = true)
 public class TopicDOMNotificationTest {
 
     private static final String CONTAINER_NODE_BODY_MOCK_TO_STRING = "containerNodeBodyMock";