Re: [Asterisk-java-users] Intergrating DefaultAsteriskManager
Brought to you by:
srt
From: Stefan R. <sr...@re...> - 2005-07-06 10:33:35
|
> This little brief should go in the docs somewhere, it gives a better > understanding of what is what. I missed some kind of short overview of = the > relations between the major classes. You are right! I will prepare a short design overview of Asterisk-Java so= on. > Yes, so true. I had used ManagerConnection.addEventHandler() in my firs= t > tests, but then somehow got the idea that I couldn't use it anymore onc= e I > used an AsteriskManager. Of course I can, and it works ok too. I assume > that AsteriskManager gets to handle the event before my own event handl= er > does, so the new channels etc are already in place. That's a valid question. I had a look at the source of DefaultManagerConnection and noticed that a HashSet is used to store the event handlers. Therefore with the current release it is impossible to predict which even= t handler will be notified first. I will change that to a List. Then the event handlers are called in the same order as they were added to the ManagerConnection, i.e. if you pass the ManagerConnection to DefaultAsteriskManager before adding your own event handler it will work as you described above. > Well, my application will basically do similar tasks to the Flash Opera= tor > Panel (http://www.asternic.org/), although with a very different UI. So > monitoring what is going and changing active channels/queues etc is ver= y > central. I like the action/event/response framework, it is quite handy = for > my case, especially a notification based one. Ok, then Channel and Queue state change events will work fine for you. Cheers, Stefan |