Пример #1
0
 public void start() throws Exception {
   bootstrap.handler(_factory.create(internalGroup, bootstrap));
   if (builder == null || !builder.hasReconnect()) _channel = connect();
   else
     while (_channel == null && !_stop)
       try {
         _channel = connect();
       } catch (Exception ex) {
         if (ex instanceof ConnectException) {
           System.out.println(ex);
           Thread.sleep(builder._reconnectTimeout);
         }
       }
 }
Пример #2
0
 public void unblock() {
   builder.unblock();
 }
Пример #3
0
 public T proxy() throws Exception {
   return builder.proxy();
 }
Пример #4
0
 public void close() {
   builder.close();
   if (getChannel() != null && getChannel().isActive()) getChannel().close();
 }
Пример #5
0
 public void disconnectedListener(ConnectListener listener) {
   builder.disconnectedListener(listener);
 }