/** * クライアントにTelegramを送信する。 * * @param telegram 送信する電文。 */ public void sendTelegram(Telegram telegram) { if (telegram == null) { return; } boolean isSweep = false; List<byte[]> byteList = TelegramUtil.createTelegram(telegram); for (byte[] bytes : byteList) { List<JavelinClientThread> clientList = this.clientList_; int size = clientList.size(); for (int index = size - 1; index >= 0; index--) { JavelinClientThread client = null; synchronized (clientList) { if (index < clientList.size()) { client = clientList.get(index); } else { continue; } } if (client.isClosed()) { isSweep = true; continue; } client.sendAlarm(bytes); if (LOGGER.isDebugEnabled()) { client.logTelegram(telegram, bytes); } } } if (isSweep == true) { sweepClient(); } }