Re: [Asterisk-java-users] Multihost events monitoring
Brought to you by:
srt
From: Maciek T. <mlo...@gm...> - 2008-05-21 08:49:31
|
Hi, there is way to find out form wich host we've got event. I've wrote appliction that initializes several ManagerConnection instances to several hosts, main application is listnerer to every connection. In onManagerEvent function I do something like that: String host=((ManagerConnection)(event.getSource())).getHostname(); and now host variable holds the hostname. Regards, Maciek 2008/4/10 Maciek Tokarski <mlo...@gm...>: > Hi all, > I want to develop application that will monitor cluster of Asterisk hosts. > I'm wondering if asterisk-java is able to handle events form many boxes. My > first idea was one main class implementing EventListner and several manager > connections with main class as event listener. But problem comes up when > main class have to find out origin of event (eg. Hostname or IP address). > There is no property such "Source" in events classes. > > Next attempt may be multithread application with some common synchronized > resources. > > Any more ideas?? > > Regards, Maciek > > -- Pozdrawiam Maciek Tokarski |