class TransportWorker {
    private static LinkedBlockingQueue<JSONObject> dataQueue = new LinkedBlockingQueue<>();
    public static ExecutorService cachedThreadPool = Executors.newCachedThreadPool();
    public static TransportClient client = null;
    public static Boolean isKeyAuth = true;

    public static void send(JSONObject jsonObject) {
        dataQueue.offer(jsonObject);
    }

    public static void readQueue() {<FILL_FUNCTION_BODY>}
}

        cachedThreadPool.execute(() -> {
            while (isKeyAuth) {
                try {
                    if (client != null && client.isOpen()) {
                        if (!dataQueue.isEmpty()) {
                            JSONObject m = dataQueue.poll();
                            m.put("agentId", BytesTool.agentId);
                            client.send(m.toJSONString());
                        } else {
                            Thread.sleep(1000);
                        }
                    } else {
                        Thread.sleep(5000);
                    }
                } catch (Exception e) {
                    e.printStackTrace();
                }
            }
        });
    
<no_super_class>