Class ExceptionListenerDispatcher

    • Constructor Detail

      • ExceptionListenerDispatcher

        public ExceptionListenerDispatcher​(java.lang.Object source)
    • Method Detail

      • errorOccurred

        public void errorOccurred​(java.lang.Object source,
                                  java.sql.SQLException exception)
        Description copied from interface: ExceptionListener
        Notify about a SQLException
        Specified by:
        errorOccurred in interface ExceptionListener
        source - The source of the event; note for caller: this should be the object this listener is registered at.
        exception - error that occurred.
      • errorOccurred

        public void errorOccurred​(java.sql.SQLException exception)
      • addListener

        public void addListener​(ExceptionListener listener)
        Adds the supplied listener to this dispatcher.

        A call to this method has no effect after shutdown() has been called.

        listener - Listener object
      • removeListener

        public void removeListener​(ExceptionListener listener)
        Removes the supplied listener from this dispatcher.
        listener - Listener object
      • removeAllListeners

        public void removeAllListeners()
        Removes all listeners from this dispatcher.
      • shutdown

        public void shutdown()
        Shuts down this dispatcher and removes all listeners.

        After shutdown calls to addListener(ExceptionListener) are ignored.

      • isShutdown

        public boolean isShutdown()
        true when this dispatcher has been shut down.