public void bind() throws Exception {
  if (_isBind.getAndSet(true)) {
    return;
  }
  if (_protocol == null) {
    throw new IllegalStateException(L.l("'{0}' must have a configured protocol before starting.",this));
  }
  if (_port < 0 && _unixPath == null) {
    return;
  }
  SocketSystem system=SocketSystem.current();
  if (_throttle == null) {
    _throttle=new ThrottleSocket();
  }
  String ssl=_sslFactory != null ? "s" : "";
  if (_serverSocket != null) {
    InetAddress address=_serverSocket.getLocalAddress();
    if (address != null)     log.info("listening to " + address.getHostName() + ":"+ _serverSocket.getLocalPort());
 else     log.info("listening to *:" + _serverSocket.getLocalPort());
  }
 else   if (_socketAddress != null) {
    _serverSocket=system.openServerSocket(_socketAddress,_port,_acceptListenBacklog,_isEnableJni);
    log.info(_protocol.name() + ssl + " listening to "+ _socketAddress.getHostName()+ ":"+ _serverSocket.getLocalPort());
  }
 else {
    _serverSocket=system.openServerSocket(null,_port,_acceptListenBacklog,_isEnableJni);
    log.info(_protocol.name() + ssl + " listening to *:"+ _serverSocket.getLocalPort());
  }
  assert (_serverSocket != null);
  postBind();
}

public void bind ( ) throws Exception { if ( _isBind . getAndSet ( true ) ) { return ; } if ( _protocol == null ) { throw new IllegalStateException ( L . l ( "'{0}' must have a configured protocol before starting." , this ) ) ; } if ( _port < 0 && _unixPath == null ) { return ; } SocketSystem system = SocketSystem . current ( ) ; if ( _throttle == null ) { _throttle = new ThrottleSocket ( ) ; } String ssl = _sslFactory != null ? "s" : "" ; if ( _serverSocket != null ) { InetAddress address = _serverSocket . getLocalAddress ( ) ; if ( address != null ) log . info ( "listening to " + address . getHostName ( ) + ":" + _serverSocket . getLocalPort ( ) ) ; else log . info ( "listening to *:" + _serverSocket . getLocalPort ( ) ) ; } else if ( _socketAddress != null ) { _serverSocket = system . openServerSocket ( _socketAddress , _port , _acceptListenBacklog , _isEnableJni ) ; log . info ( _protocol . name ( ) + ssl + " listening to " + _socketAddress . getHostName ( ) + ":" + _serverSocket . getLocalPort ( ) ) ; } else { _serverSocket = system . openServerSocket ( null , _port , _acceptListenBacklog , _isEnableJni ) ; log . info ( _protocol . name ( ) + ssl + " listening to *:" + _serverSocket . getLocalPort ( ) ) ; } assert ( _serverSocket != null ) ; postBind ( ) ; }
starts the port listening .
