Hi Torsten No sample but the basic approach is:
1) Each ULC session that is started registers itself as a listener with a central instance (server-side). 2) If you want to send an event to all clients, send the event to the central instance. All registered listeners are informed about the event and queue the event. 3) A polling timer running for each ULC session processes its queue and updates the client accordingly. The central instance can be anything from a simple self-written event manager class to a message broker to ..., depending on your environment (clustered, etc.). Etienne -----Original Message----- From: Hofmann, Torsten [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 18, 2007 4:04 AM To: [email protected]; Etienne Studer Subject: AW: [ULC-developer] Message to all Clients Hello I tried this out with sending messages to all Clients. But i do not get this running. Where do i have to call the ClientContext.sendMessage() methode, because only one client gets this event(message). When i put the code into the AbstractApplication class only one Client gets the message. In which class do i have to write the code, that the code is executed from the main VM of the server and not in an server thread of one client. Is somewhere an example snipplet how to do this. Regards Würth Phoenix GmbH Torsten Hofmann Dipl. - Informatiker (FH) IT Consultant Business Integration Industriepark Würth Drillberg 6 / Geb. 2 DE-97980 Bad Mergentheim Phone: +49 (0)7931-91-6284 Fax: +49 (0)7931-91-7284 www.wuerth-phoenix.de Sitz: Bad Mergentheim Geschäftsführer: Andreas Braun, Hubert Kofler, Jürg Michel Amtsgericht Ulm HRB 680 842 -----Ursprüngliche Nachricht----- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Im Auftrag von Etienne Studer Gesendet: Mittwoch, 28. März 2007 17:16 An: [email protected]; [EMAIL PROTECTED] Betreff: RE: [ULC-developer] Message to all Clients Hi Daniel Please beware that opening a dialog in the handleMessage() method can cause problems if the user already has a modal dialog open at that time. I have experienced very odd behavior using JDK 1.4 (I think in 1.6 they have improved the modal dialog issue quite a bit, though). For this reason, we display the message in the status bar with some color animation to get the user's attention, rather than using a dialog. Just my two cents worth... Regards, Etienne -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED] Sent: Wednesday, March 28, 2007 6:17 AM To: [email protected] Subject: Re: [ULC-developer] Message to all Clients Hello Torsten. Depending on your question this may be help you: It is possible to build your desired functionality using the IMessageListener on client side. It allows you to handle message which are send by server side code using 'ClientContext.sendMessage("Wake up Neo ...")'. On the client side a class implementing IMessageListener can handle messages in public void handleMessage(String msg) { ... } Using a polling timer to e.g. check for updates or if maintenance is active will send messages to all clients, where a JOptionPane called in above method will inform the current user. This must work for all users who are connected simillary. The functionallity is pretty like using a splash screen. I hope i could help you out a little. Greetings, Daniel [EMAIL PROTECTED] wrote: ----- To: <[email protected]> From: "Hofmann, Torsten" <[EMAIL PROTECTED]> Sent by: [EMAIL PROTECTED] Date: 03/20/2007 10:58 Subject: [ULC-developer] Message to all Clients Hallo Is it possible to send a message to all clients for one server over ULC. We want to open an Dialog with an info for all Clients which are connected to one server. Regards Würth Phoenix GmbH Torsten Hofmann Dipl. - Informatiker (FH) IT Consultant Business Integration Industriepark Würth Drillberg 6 / Geb. 2 DE-97980 Bad Mergentheim Phone: +49 (0)7931-91-6284 Fax: +49 (0)7931-91-7284 www.wuerth-phoenix.de Sitz: Bad Mergentheim Geschäftsführer: Andreas Braun, Hubert Kofler, Jürg Michel Amtsgericht Ulm HRB 680 842 _______________________________________________ ULC-developer mailing list [email protected] http://lists.canoo.com/mailman/listinfo/ulc-developer Disclaimer: Aus Rechts- und Sicherheitsgruenden ist die in dieser E-Mail gegebene Information nicht rechtsverbindlich. Eine rechtsverbindliche Bestaetigung reichen wir Ihnen gerne auf Anforderung in schriftlicher Form nach. Beachten Sie bitte, dass jede Form der unautorisierten Nutzung, Veroeffentlichung, Vervielfaeltigung oder Weitergabe des Inhalts dieser E-Mail nicht gestattet ist. Diese Nachricht ist ausschliesslich fuer den bezeichneten Adressaten oder dessen Vertreter bestimmt. Sollten Sie nicht der vorgesehene Adressat dieser E-Mail oder dessen Vertreter sein, so bitten wir Sie, sich mit dem Absender der E-Mail in Verbindung zu setzen und/oder diese Nachricht mit allen Anhängen zu loeschen. _______________________________________________ ULC-developer mailing list [email protected] http://lists.canoo.com/mailman/listinfo/ulc-developer _______________________________________________ ULC-developer mailing list [email protected] http://lists.canoo.com/mailman/listinfo/ulc-developer _______________________________________________ ULC-developer mailing list [email protected] http://lists.canoo.com/mailman/listinfo/ulc-developer
