# Path: src/pubsub/core/listener.py
# class Listener:
#     """Wrapper of a UserListener"""
#     pass
# 
# Path: src/pubsub/core/topicobj.py
# class Topic:
#     pass


from typing import List, Mapping
from .listener import Listener
from .topicobj import Topic
        import atexit
"""




class INotificationHandler:
    """
    Defines the interface expected by pubsub for pubsub activity
    notifications. Any instance that supports the same methods, or
    derives from this class, will work as a notification handler
    for pubsub events (see pub.addNotificationHandler).
    """

    def notifySubscribe(self, pubListener: Listener, topicObj: Topic, newSub: bool):
        """
        Called when a listener is subscribed to a topic.
        :param pubListener: the pubsub.core.Listener that wraps subscribed listener.
        :param topicObj: the pubsub.core.Topic object subscribed to.
        :param newSub: false if pubListener was already subscribed.
        """
        raise NotImplementedError

    def notifyUnsubscribe(self, pubListener: Listener, topicObj: Topic):
        """
        Called when a listener is unsubscribed from given topic.
        :param pubListener: the pubsub.core.Listener that wraps unsubscribed listener.
        :param topicObj: the pubsub.core.Topic object unsubscribed from.
        """
        raise NotImplementedError


# Path: src/pubsub/core/listener.py
# class Listener:
#     """Wrapper of a UserListener"""
#     pass
# 
# Path: src/pubsub/core/topicobj.py
# class Topic:
#     pass


# Path: src/pubsub/core/notificationmgr.py
from typing import List, Mapping
from .listener import Listener
from .topicobj import Topic
        import atexit

"""




class INotificationHandler:
    """
    Defines the interface expected by pubsub for pubsub activity
    notifications. Any instance that supports the same methods, or
    derives from this class, will work as a notification handler
    for pubsub events (see pub.addNotificationHandler).
    """

    def notifySubscribe(self, pubListener: Listener, topicObj: Topic, newSub: bool):
        """
        Called when a listener is subscribed to a topic.
        :param pubListener: the pubsub.core.Listener that wraps subscribed listener.
        :param topicObj: the pubsub.core.Topic object subscribed to.
        :param newSub: false if pubListener was already subscribed.
        """
        raise NotImplementedError

    def notifyUnsubscribe(self, pubListener: Listener, topicObj: Topic):
        """
        Called when a listener is unsubscribed from given topic.
        :param pubListener: the pubsub.core.Listener that wraps unsubscribed listener.
        :param topicObj: the pubsub.core.Topic object unsubscribed from.
        """
        raise NotImplementedError


    def notifyDeadListener(self, pubListener: Listener, topicObj: Topic):