I'm having a hard time understanding the DEM (Delegation Event Model) in Java. After reading this question with answers I didn't get the explanation I needed.
What are the motivations for using DEM?
My observations in the examples I've seen are:
- There is a model with a list of listeners.
- That model also has a methods like
fireThisOrThat()
that are called from other methods likeaddThisOrThat
.
I will get this on an upcoming exam, that's why I need to understand it and how to use it.