Ejemplo n.º 1
0
 public void stopTcpConnector() throws Exception {
   if (tcpConnector == null || tcpConnThread == null) {
     return;
   }
   tcpConnector.stop();
   tcpConnThread.join();
 }
Ejemplo 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();
   }
 }