hey Norm, sorry, my english is very bad, im from Brazil, the turnstiles are access turnstiles, or call ratchet, they work with socket connection, but, they running in server mode, and read rfid card, when they read the card, if have a "agent" in client mode connected to then,they send a array bytes, containing card chip number, and the "agent", after checking, responds to her whether or not she releases/open.
The "agent" is my application, when the connection drops, switch or power outage, that doesn't affect my application, the server (turnstiles), keep looking for the agent, and the agent does not identify this fall, does not enter a throw exception, just keep waiting.
My solution was to restart the connection every five minutes, regardless of whether or not the connection, but, as there are 8 agents, when calling the method that stops the thread and the connection, not all stop, some threads keep running, and start a new.
The output, after converted, is something like this: s01+RR+000]
00000000000171012132]11/07/2019 17:20:31]1]0}000
what is bold is the number of the card chip that I check whether or not it can pass there.
I hope I have clarified better, once again, sorry for my English, thanks for the help.
postJava.jpg