Package com.linkedin.databus.client.netty.AbstractNettyHttpConnection

Examples of com.linkedin.databus.client.netty.AbstractNettyHttpConnection.ConnectResultListener


  private void informConnectListener(Channel channel, Throwable cause) {
    boolean success = (cause == null);
    _log.debug("informRequestListener: success=" + success + ";ch=" + channel, cause);

    // listener is nullified (under sync) to guarantee it is called only once
    ConnectResultListener tempListener = null;

    synchronized(this) {
      if(cause != null)
        _lastError = cause;

      if(_connectListener != null) {
        tempListener = _connectListener;
        _connectListener = null;
      }
    }

    if(tempListener != null) {
      _log.info("Notify about connection completed. success=" + success);
      if(success)
        tempListener.onConnectSuccess(channel);
      else
        tempListener.onConnectFailure(cause);

    } else {
      _log.warn("informConnectListener called with listener==null; ch=" + channel, cause);
    }
  }
View Full Code Here

TOP

Related Classes of com.linkedin.databus.client.netty.AbstractNettyHttpConnection.ConnectResultListener

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.