Joke Collection Website - Blessing messages - How to implement push message technology with Java, is there a great god who can explain it?

How to implement push message technology with Java, is there a great god who can explain it?

How to implement push message technology with Java is as follows:

1, the mobile client 1 sends a short message of "msg 1" to the server;

2. After receiving the message "msg 1" from client 1, the server adds it to the message list;

3. The server detects that the messageList contains messages (when the server is started, a thread for detecting the messageList is newly created, and there is an infinite loop in the thread to continuously detect whether the messageList contains messages);

4. The server reads the message data. If the server reads the message "msg 1" sent by client 1 to client2, it pushes "msg 1" to client2;

5.client2 detects the message pushed by the server and takes corresponding actions (such as shaking, ringing, displaying messages, etc.). );

6. After the client 2 receives the message "msg 1" pushed by the server, the client 2 also replies a short message "msg2" to the client 1, which is the same as the process that the client 1 sends a message to the client 2.

7. Finally, client2 can display the message "msg 1" sent by client 1, and client 1 can display the reply message "msg2" of client2.

It is more convenient to push SMS with aurora. Properly using push, the improvement of activity is obviously a tool class. Aurora personalized push meets users' various push needs, effectively improves user experience, uses big data artificial intelligence technology to realize intelligent user grouping, improves message click-through rate, pushes security packages to ensure accurate push content, and refuses to operate accidents.