Class DefaultExceptionHandler
java.lang.Object
io.github.astrapi69.design.pattern.observer.exception.handlers.AbstractExceptionHandler
io.github.astrapi69.design.pattern.observer.exception.handlers.DefaultExceptionHandler
- All Implemented Interfaces:
Serializable
The class
DefaultExceptionHandler
provides a default implementation for handling
exception events It extends AbstractExceptionHandler
and propagates exception events to
the registered listeners- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
updateEvent
(ExceptionListener listener, ExceptionEvent event) Updates the specified listener with the given exception event This method must be implemented by subclasses to define how the event is propagated to the listenervoid
updateOnException
(ExceptionEvent event) Updates all registered listeners with the given exception event
-
Constructor Details
-
DefaultExceptionHandler
public DefaultExceptionHandler()
-
-
Method Details
-
updateEvent
Updates the specified listener with the given exception event This method must be implemented by subclasses to define how the event is propagated to the listener- Specified by:
updateEvent
in classAbstractExceptionHandler
- Parameters:
listener
- the listener to be updatedevent
- the exception event to be propagated to the listener
-
updateOnException
Updates all registered listeners with the given exception event- Parameters:
event
- the exception event to be propagated to the listeners
-