X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fnetconf%2Fmessagebus-netconf%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fmessagebus%2Feventsources%2Fnetconf%2FNotificationTopicRegistration.java;fp=opendaylight%2Fnetconf%2Fmessagebus-netconf%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fmessagebus%2Feventsources%2Fnetconf%2FNotificationTopicRegistration.java;h=0000000000000000000000000000000000000000;hb=9ba2b4eca79bcc0e78099b133296801c8d45a6c4;hp=a452ac59fd8d96b4642dc7fe7aae40cbbf6b8dfa;hpb=b2e81149739c87f0ecc2ce7f06448d7a5d3162b8;p=controller.git diff --git a/opendaylight/netconf/messagebus-netconf/src/main/java/org/opendaylight/controller/messagebus/eventsources/netconf/NotificationTopicRegistration.java b/opendaylight/netconf/messagebus-netconf/src/main/java/org/opendaylight/controller/messagebus/eventsources/netconf/NotificationTopicRegistration.java deleted file mode 100644 index a452ac59fd..0000000000 --- a/opendaylight/netconf/messagebus-netconf/src/main/java/org/opendaylight/controller/messagebus/eventsources/netconf/NotificationTopicRegistration.java +++ /dev/null @@ -1,90 +0,0 @@ -/* - * Copyright (c) 2015 Cisco Systems, Inc. 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 - */ -package org.opendaylight.controller.messagebus.eventsources.netconf; - -import java.util.ArrayList; -import org.opendaylight.yang.gen.v1.urn.cisco.params.xml.ns.yang.messagebus.eventaggregator.rev141202.TopicId; -import org.opendaylight.yangtools.yang.model.api.SchemaPath; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -public abstract class NotificationTopicRegistration implements AutoCloseable { - - private static final Logger LOG = LoggerFactory.getLogger(NotificationTopicRegistration.class); - - public enum NotificationSourceType { - NetconfDeviceStream, - ConnectionStatusChange; - } - - private boolean active; - private final NotificationSourceType notificationSourceType; - private final String sourceName; - private final String notificationUrnPrefix; - private boolean replaySupported; - - protected NotificationTopicRegistration(NotificationSourceType notificationSourceType, String sourceName, - String notificationUrnPrefix) { - this.notificationSourceType = notificationSourceType; - this.sourceName = sourceName; - this.notificationUrnPrefix = notificationUrnPrefix; - this.active = false; - this.setReplaySupported(false); - } - - public boolean isActive() { - return active; - } - - protected void setActive(boolean active) { - this.active = active; - } - - public NotificationSourceType getNotificationSourceType() { - return notificationSourceType; - } - - public String getSourceName() { - return sourceName; - } - - public String getNotificationUrnPrefix() { - return notificationUrnPrefix; - } - - public boolean checkNotificationPath(SchemaPath notificationPath) { - if (notificationPath == null) { - return false; - } - String nameSpace = notificationPath.getLastComponent().toString(); - LOG.debug("CheckNotification - name space {} - NotificationUrnPrefix {}", nameSpace, - getNotificationUrnPrefix()); - return nameSpace.startsWith(getNotificationUrnPrefix()); - } - - abstract void activateNotificationSource(); - - abstract void deActivateNotificationSource(); - - abstract void reActivateNotificationSource(); - - abstract boolean registerNotificationTopic(SchemaPath notificationPath, TopicId topicId); - - abstract void unRegisterNotificationTopic(TopicId topicId); - - abstract ArrayList getNotificationTopicIds(SchemaPath notificationPath); - - public boolean isReplaySupported() { - return replaySupported; - } - - protected void setReplaySupported(boolean replaySupported) { - this.replaySupported = replaySupported; - } - -}