简体   繁体   中英

Sending commands to application via JSON call

I wrote a java application that is supposed to run on a server in the background 24/7. I would like implement a possibility to communicate a change of parameters to this application over the internet. The easiest way that came to my mind was if the application would just get parameters via a JSON call. It checks this JSON every now and then and thereby "retrieves" new commands, instead of "receiving" them.

To realize this I was looking for a simple way to create and edit a JSON online that can be called by a single URL. I have found http://www.json-generator.com/ but unfortunately it doesn't let me edit an existing JSON.

Does anyone know a solution for this? Or does anyone know a simpler way to communicate with your application over the internet?

Thanks!

Hi maybe it's not the most correct and beautiful way to achieve your goal but I suggest you Netty.io

You can create a kind of "snoop server" or custom server protocol for sending commands to your application and receive an answer about your request (for example if everything went OK or if you crushed on some error).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM