hudson.model.Messages.UpdateCenter_Status_UnknownHostException()方法的使用及代码示例

x33g5p2x  于2022-01-25 转载在 其他  
字(4.7k)|赞(0)|评价(0)|浏览(116)

本文整理了Java中hudson.model.Messages.UpdateCenter_Status_UnknownHostException()方法的一些代码示例,展示了Messages.UpdateCenter_Status_UnknownHostException()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Messages.UpdateCenter_Status_UnknownHostException()方法的具体详情如下:
包路径:hudson.model.Messages
类名称:Messages
方法名:UpdateCenter_Status_UnknownHostException

Messages.UpdateCenter_Status_UnknownHostException介绍

[英]<span class=error>Failed to resolve host name {0}. Perhaps you need to <a href="../pluginManager/advanced">configure HTTP proxy?</a></span>
[中]未能解析主机名{0}。也许你需要<a href=“../pluginManager/advanced”>配置HTTP代理</a></span>

代码示例

代码示例来源:origin: jenkinsci/jenkins

} catch (UnknownHostException e) {
  connectionStates.put(ConnectionStatus.UPDATE_SITE, ConnectionStatus.FAILED);
  statuses.add(Messages.UpdateCenter_Status_UnknownHostException(e.getMessage()));
  addStatus(e);
  error = e;

代码示例来源:origin: hudson/hudson-2.x

public void run() {
  LOGGER.fine("Doing a connectivity check");
  try {
    String connectionCheckUrl = site.getConnectionCheckUrl();
    if (connectionCheckUrl!=null) {
      statuses.add(Messages.UpdateCenter_Status_CheckingInternet());
      try {
        config.checkConnection(this, connectionCheckUrl);
      } catch (IOException e) {
        if(e.getMessage().contains("Connection timed out")) {
          // Google can't be down, so this is probably a proxy issue
          statuses.add(Messages.UpdateCenter_Status_ConnectionFailed(connectionCheckUrl));
          return;
        }
      }
    }
    statuses.add(Messages.UpdateCenter_Status_CheckingJavaNet());
    config.checkUpdateCenter(this, site.getUrl());
    statuses.add(Messages.UpdateCenter_Status_Success());
  } catch (UnknownHostException e) {
    statuses.add(Messages.UpdateCenter_Status_UnknownHostException(e.getMessage()));
    addStatus(e);
  } catch (IOException e) {
    statuses.add(Functions.printThrowable(e));
  }
}

代码示例来源:origin: org.eclipse.hudson.main/hudson-core

public void run() {
  LOGGER.fine("Doing a connectivity check");
  try {
    String connectionCheckUrl = site.getConnectionCheckUrl();
    if (connectionCheckUrl!=null) {
      statuses.add(Messages.UpdateCenter_Status_CheckingInternet());
      try {
        config.checkConnection(this, connectionCheckUrl);
      } catch (IOException e) {
        if(e.getMessage().contains("Connection timed out")) {
          // Google can't be down, so this is probably a proxy issue
          statuses.add(Messages.UpdateCenter_Status_ConnectionFailed(connectionCheckUrl));
          return;
        }
      }
    }
    statuses.add(Messages.UpdateCenter_Status_CheckingJavaNet());
    config.checkUpdateCenter(this, site.getUrl());
    statuses.add(Messages.UpdateCenter_Status_Success());
  } catch (UnknownHostException e) {
    statuses.add(Messages.UpdateCenter_Status_UnknownHostException(e.getMessage()));
    addStatus(e);
  } catch (IOException e) {
    statuses.add(Functions.printThrowable(e));
  }
}

代码示例来源:origin: org.eclipse.hudson/hudson-core

public void run() {
  LOGGER.fine("Doing a connectivity check");
  try {
    String connectionCheckUrl = site.getConnectionCheckUrl();
    if (connectionCheckUrl != null) {
      statuses.add(Messages.UpdateCenter_Status_CheckingInternet());
      try {
        config.checkConnection(this, connectionCheckUrl);
      } catch (IOException e) {
        if (e.getMessage().contains("Connection timed out")) {
          // Google can't be down, so this is probably a proxy issue
          statuses.add(Messages.UpdateCenter_Status_ConnectionFailed(connectionCheckUrl));
          return;
        }
      }
    }
    statuses.add(Messages.UpdateCenter_Status_CheckingJavaNet());
    config.checkUpdateCenter(this, site.getUrl());
    statuses.add(Messages.UpdateCenter_Status_Success());
  } catch (UnknownHostException e) {
    statuses.add(Messages.UpdateCenter_Status_UnknownHostException(e.getMessage()));
    addStatus(e);
  } catch (IOException e) {
    statuses.add(Functions.printThrowable(e));
  }
}

代码示例来源:origin: org.jenkins-ci.main/jenkins-core

} catch (UnknownHostException e) {
  connectionStates.put(ConnectionStatus.UPDATE_SITE, ConnectionStatus.FAILED);
  statuses.add(Messages.UpdateCenter_Status_UnknownHostException(e.getMessage()));
  addStatus(e);
  error = e;

代码示例来源:origin: org.jvnet.hudson.main/hudson-core

public void run() {
  LOGGER.fine("Doing a connectivity check");
  try {
    String connectionCheckUrl = site.getConnectionCheckUrl();
    if (connectionCheckUrl!=null) {
      statuses.add(Messages.UpdateCenter_Status_CheckingInternet());
      try {
        config.checkConnection(this, connectionCheckUrl);
      } catch (IOException e) {
        if(e.getMessage().contains("Connection timed out")) {
          // Google can't be down, so this is probably a proxy issue
          statuses.add(Messages.UpdateCenter_Status_ConnectionFailed(connectionCheckUrl));
          return;
        }
      }
    }
    statuses.add(Messages.UpdateCenter_Status_CheckingJavaNet());
    config.checkUpdateCenter(this, site.getUrl());
    statuses.add(Messages.UpdateCenter_Status_Success());
  } catch (UnknownHostException e) {
    statuses.add(Messages.UpdateCenter_Status_UnknownHostException(e.getMessage()));
    addStatus(e);
  } catch (IOException e) {
    statuses.add(Functions.printThrowable(e));
  }
}

相关文章

Messages类方法