I am writing a XML gui editor using java, which edits the xml file and there are programs which would read that xml file and act according the changes immediately. For that purpose, I need to invoke an <ip-address>:<portnumber>, I need to send a small amount of textual data "/n" too. To be precise I need to alert a particular ip adress that some changes has been made to the xml file, and that it should re-read it, so that the changes can take affect. Now any ideas as to how to go about it?
I am writing a XML gui editor using java, which edits the xml file
Share
The easiest solution is to implement a small UDP or TCP/IP based solution. Unless the other system already defines an API telling you how to send a notification.
Java based client/server are described on several locations, here’s a SO question that asks for a tutorial. For this question, I suggest you look at the existing API and/or the tutorial, for detailed answers we need more input.
You can start with this snippet – but absolutely no guarantee that it actually works in your environment:
You’ll have to add some exception handling.