gov.nist.toolkit.installation.server.Installation.getServletContextName()方法的使用及代码示例

x33g5p2x  于2022-01-21 转载在 其他  
字(4.4k)|赞(0)|评价(0)|浏览(138)

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

Installation.getServletContextName介绍

暂无

代码示例

代码示例来源:origin: usnistgov/iheos-toolkit2

public String getToolkitAsFhirServerBaseUrl() {
  return "http://" +
      propertyServiceManager().getToolkitHost() + ":" + propertyServiceManager().getToolkitPort() +
      ((getServletContextName().isEmpty()) ? "" : "/" + getServletContextName() ) +
      "/fhir";
}

代码示例来源:origin: usnistgov/iheos-toolkit2

@Obsolete
public String getToolkitProxyBaseUrl() {
  return "http://" +
      propertyServiceManager().getToolkitHost() + ":" + propertyServiceManager().getProxyPort() +
      ((getServletContextName().isEmpty()) ? "" : "/" + getServletContextName() ) +
      "/fhir";
}

代码示例来源:origin: usnistgov/iheos-toolkit2

/**
 * will self initialize to the production manager.  For testing purposes
 * it can be initialized with TestResourceCacheFactory
 * @return
 */
public String getToolkitBaseUrl() {
  boolean ssl = propertyServiceMgr.isUsingSSL();
  return ((ssl) ? "https://" : "http://")
      + propertyServiceMgr.getToolkitHost()
      + ":"
      + ((ssl) ? propertyServiceMgr.getSSLPort() : propertyServiceMgr.getToolkitPort())
      + getServletContextName()
      + "/Xdstools2.html";
}

代码示例来源:origin: usnistgov/iheos-toolkit2

public void init(ServletConfig sConfig) {
  configuredHost = Installation.instance().propertyServiceManager().getToolkitHost();
  configuredPort = Installation.instance().propertyServiceManager().getToolkitPort();
  configuredTlsPort = Installation.instance().propertyServiceManager().getToolkitTlsPort();
  configuredProxyPort = Installation.instance().propertyServiceManager().getProxyPort();
  configuredContext = Installation.instance().getServletContextName();
  if (configuredContext.startsWith("/"))
    configuredContext = configuredContext.substring(1);
  logger.info("Reconfiguring Simulators to host " + getConfiguredHost() + " port " + getConfiguredPort() + " context " + getConfiguredContext());
  logger.info("Reconfiguring simulators in " + Installation.instance().getTestSessions());
  for (TestSession testSession : Installation.instance().getTestSessions()) {
    for (SimId simId : SimDb.getAllSimIds(testSession)) {
      try {
        reconfigure(simId);
      } catch (Throwable e) {
        logger.fatal("Reconfigure of sim " + simId + " failed - " + ExceptionUtil.exception_details(e));
      }
    }
  }
}

代码示例来源:origin: usnistgov/iheos-toolkit2

protected String mkEndpoint(SimulatorConfig asc, SimulatorConfigElement ele, String actor, boolean isTLS, boolean isProxy) throws Exception {
    String transtype = SimDb.getTransactionDirName(ele.transType);

    String contextName = Installation.instance().getServletContextName();

    return "http"
    + ((isTLS) ? "s" : "")
    + "://" 
    + Installation.instance().propertyServiceManager().getToolkitHost()
    + ":"
        + getEndpointPort(isTLS, isProxy)
//        + ((isTLS) ? Installation.instance().propertyServiceManager().getToolkitTlsPort() : Installation.instance().propertyServiceManager().getToolkitPort())
//        + "/"  context name includes preceding /
    + contextName  
    + (ele.transType.isHttpOnly() ? "/httpsim/" : "/sim/" )
    + asc.getId() 
    + "/" +
    actor           //asc.getActorType().toLowerCase()
    + "/" 
    + transtype;
  }

代码示例来源:origin: usnistgov/iheos-toolkit2

protected String mkFhirEndpoint(SimulatorConfig asc, SimulatorConfigElement ele, String actor, TransactionType transactionType, boolean isTLS, boolean isProxy) throws Exception {
//        String transtype = SimDb.getTransactionDirName(ele.transType);

    String contextName = Installation.instance().getServletContextName();

    return "http"
        + ((isTLS) ? "s" : "")
        + "://"
        + Installation.instance().propertyServiceManager().getToolkitHost()
        + ":"
        + getEndpointPort(isTLS, isProxy)
//                + ((isTLS) ? Installation.instance().propertyServiceManager().getToolkitTlsPort() : Installation.instance().propertyServiceManager().getToolkitPort())
//        + "/"  context name includes preceding /
        + contextName
//                + "/sim/"
        + ((isSimProxy) ? "/sim/" : "/fsim/")
        + asc.getId()
        + "/" + actor
  //			+ "/fhir"
        + ((transactionType != null && transactionType.getFhirVerb() == FhirVerb.TRANSACTION ? "/" + transactionType.getShortName() : ""))
        ;
  }

相关文章