Class AbstractEventStream

    • Constructor Detail

      • AbstractEventStream

        public AbstractEventStream()
    • Method Detail

      • getListenerCount

        public int getListenerCount()
        Helper method that returns the current number of subscribed listeners.
        Specified by:
        getListenerCount in interface EventStream
        Returns:
        The current number listeners.
      • notifyListeners

        protected void notifyListeners​(Event event)
        Notifies all listeners of an event
        Parameters:
        event - the event
      • clearListeners

        protected void clearListeners​(int code,
                                      String phrase)
        Removes all listeners.
        Parameters:
        code - an integer code to represent the reason for closing
        phrase - a String representation of code