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
        The current number listeners.
      • notifyListeners

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

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