Esempio n. 1
0
 public void stopTcpConnector() throws Exception {
   if (tcpConnector == null || tcpConnThread == null) {
     return;
   }
   tcpConnector.stop();
   tcpConnThread.join();
 }
Esempio n. 2
0
 public void initTcpConnector() throws Exception {
   if (!"YES".equalsIgnoreCase(PropertyUtil.getProperty("TCP_CONNECTOR_ENABLE"))) {
     return;
   }
   tcpConnector = new NIOTcpConnector();
   tcpConnThread = new Thread(tcpConnector, "IMServer-NIOTcpConnector");
   synchronized (tcpConnector) {
     tcpConnThread.start();
     tcpConnector.wait();
   }
 }