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); } } }
public void unblock() { builder.unblock(); }
public T proxy() throws Exception { return builder.proxy(); }
public void close() { builder.close(); if (getChannel() != null && getChannel().isActive()) getChannel().close(); }
public void disconnectedListener(ConnectListener listener) { builder.disconnectedListener(listener); }