Hi ,
My task is to monitor all open sessions in a specific time.
My solutions includes Singelton , the Observer design
pattern and HttpSessionBindingListener interface.
As the Subject ,in the Observer design pattern, I will have an object named Controller (singelton) that will store all opened sessions.
As observer I will have an object that will wrap a session which will have a reference to the Controller. (initialize in their constructor).
Each observer will implement the HttpSessionBindingListener this way in valueBound method I will add it to the observer and in valueUnbound i will remove it.
BTW if someone wants to extends the observer class for his personal use all it have to do is to extend it and call super() in his constructor...
WHAT DO YOU THINK?