public void addListener(ChannelFutureListener listener) { try { listener.operationComplete(this); } catch (Throwable t) { if (logger.isWarnEnabled()) { logger.warn( "An exception was thrown by " + ChannelFutureListener.class.getSimpleName() + '.', t); } } }
private void notifyListener(ChannelFutureListener l) { try { l.operationComplete(this); } catch (Throwable t) { if (logger.isWarnEnabled()) { logger.warn( "An exception was thrown by " + ChannelFutureListener.class.getSimpleName() + '.', t); } } }
private void notifyListener(ChannelFutureListener l) { try { l.operationComplete(this); } catch (Throwable t) { if (logger.isWarnEnabled()) { logger.warn( "An exception was thrown by " + ChannelFutureListener.class.getSimpleName() + '.', t); } } }
@Override public void operationComplete(ChannelFuture future) throws Exception { boolean retry = false; if (future.isSuccess()) { if (asyncHandlerExtensions != null) asyncHandlerExtensions.onConnectionSuccess(future.getChannel(), remoteAddress.getAddress()); } else { if (asyncHandlerExtensions != null) asyncHandlerExtensions.onConnectionFailure(remoteAddress.getAddress()); retry = pickNextRemoteAddress(); } if (retry) NettyChannelConnector.this.connect(bootstrap, listener); else listener.operationComplete(future); } });