Re: [Asterisk-java-users] Are ConnectEvent:s delivered?
Brought to you by:
srt
From: Jan E. <jan...@pl...> - 2005-08-17 11:09:59
|
On Wednesday 17 August 2005 13:58, Stefan Reuter wrote: > Hi Jan, > > ConnectEvents are not dispatched because they don't represent "real" > Asterisk events. We could easily change that but I am not sure if that > leads to some confusion. > I recently added getVersion() and getVersion(String) to > DefaultAsteriskManager. These two methods also use a CommandAction to > query Asterisk state. I implemented them using lazy initialization so i > check if the corresponding attribute is null or not and if it is null i > fetch the stuff from Asterisk, otherwise I just return the cached result. > Would that work for you, too? Hi, I don't really see how that example would help me with my problem. I'm interested in known when I can send my own CommandAction:s to get some initial data (users, conferences etc) and populate my UI. The ConnectEvent would be handy as I'd then know that I'm now connected ok. Or, (after thinking a bit more) am I right to assume that when I've initialized a ManagerConnection and assigned it to DefaultAsteriskManager using setManagerConnection(), that the connection is ok at that point? I see that DefaultAsteriskManager.initialize() sends off CommandAction:s, so probably I can do it as well at this point. I'll have to test... -- Jan Ekholm jan...@pl... |