org.apache.catalina.connector.Request.parseLocales()方法的使用及代码示例

x33g5p2x  于2022-01-28 转载在 其他  
字(9.4k)|赞(0)|评价(0)|浏览(98)

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

Request.parseLocales介绍

[英]Parse request locales.
[中]解析请求区域设置。

代码示例

代码示例来源:origin: org.osivia.portal.core/osivia-portal-jbossas-jbossweb-lib

/*      */   public Locale getLocale()
/*      */   {
/*  998 */     if (!this.localesParsed) {
/*  999 */       parseLocales();
/*      */     }
/* 1001 */     if (this.locales.size() > 0) {
/* 1002 */       return (Locale)this.locales.get(0);
/*      */     }
/* 1004 */     return defaultLocale;
/*      */   }
/*      */

代码示例来源:origin: org.apache.tomcat/tomcat-catalina

/**
 * @return the preferred Locale that the client will accept content in,
 * based on the value for the first <code>Accept-Language</code> header
 * that was encountered.  If the request did not specify a preferred
 * language, the server's default Locale is returned.
 */
@Override
public Locale getLocale() {
  if (!localesParsed) {
    parseLocales();
  }
  if (locales.size() > 0) {
    return locales.get(0);
  }
  return defaultLocale;
}

代码示例来源:origin: tomcat/catalina

/**
 * Return the preferred Locale that the client will accept content in,
 * based on the value for the first <code>Accept-Language</code> header
 * that was encountered.  If the request did not specify a preferred
 * language, the server's default Locale is returned.
 */
public Locale getLocale() {
  if (!localesParsed)
    parseLocales();
  if (locales.size() > 0) {
    return ((Locale) locales.get(0));
  } else {
    return (defaultLocale);
  }
}

代码示例来源:origin: org.jboss.web/jbossweb

/**
 * Return the preferred Locale that the client will accept content in,
 * based on the value for the first <code>Accept-Language</code> header
 * that was encountered.  If the request did not specify a preferred
 * language, the server's default Locale is returned.
 */
public Locale getLocale() {
  if (!localesParsed)
    parseLocales();
  if (locales.size() > 0) {
    return ((Locale) locales.get(0));
  } else {
    return (defaultLocale);
  }
}

代码示例来源:origin: jboss.web/jbossweb

/**
 * Return the preferred Locale that the client will accept content in,
 * based on the value for the first <code>Accept-Language</code> header
 * that was encountered.  If the request did not specify a preferred
 * language, the server's default Locale is returned.
 */
public Locale getLocale() {
  if (!localesParsed)
    parseLocales();
  if (locales.size() > 0) {
    return ((Locale) locales.get(0));
  } else {
    return (defaultLocale);
  }
}

代码示例来源:origin: com.ovea.tajin.server/tajin-server-jetty9

/**
 * Return the preferred Locale that the client will accept content in,
 * based on the value for the first <code>Accept-Language</code> header
 * that was encountered.  If the request did not specify a preferred
 * language, the server's default Locale is returned.
 */
@Override
public Locale getLocale() {
  if (!localesParsed)
    parseLocales();
  if (locales.size() > 0) {
    return locales.get(0);
  }
  return defaultLocale;
}

代码示例来源:origin: com.ovea.tajin.servers/tajin-server-jetty9

/**
 * Return the preferred Locale that the client will accept content in,
 * based on the value for the first <code>Accept-Language</code> header
 * that was encountered.  If the request did not specify a preferred
 * language, the server's default Locale is returned.
 */
@Override
public Locale getLocale() {
  if (!localesParsed)
    parseLocales();
  if (locales.size() > 0) {
    return locales.get(0);
  }
  return defaultLocale;
}

代码示例来源:origin: com.ovea.tajin.server/tajin-server-tomcat7

/**
 * Return the preferred Locale that the client will accept content in,
 * based on the value for the first <code>Accept-Language</code> header
 * that was encountered.  If the request did not specify a preferred
 * language, the server's default Locale is returned.
 */
@Override
public Locale getLocale() {
  if (!localesParsed)
    parseLocales();
  if (locales.size() > 0) {
    return locales.get(0);
  }
  return defaultLocale;
}

代码示例来源:origin: org.apache.geronimo.ext.tomcat/catalina

/**
 * Return the preferred Locale that the client will accept content in,
 * based on the value for the first <code>Accept-Language</code> header
 * that was encountered.  If the request did not specify a preferred
 * language, the server's default Locale is returned.
 */
@Override
public Locale getLocale() {
  if (!localesParsed) {
    parseLocales();
  }
  if (locales.size() > 0) {
    return locales.get(0);
  }
  return defaultLocale;
}

代码示例来源:origin: org.ops4j.pax.tipi/org.ops4j.pax.tipi.tomcat-embed-core

/**
 * @return the preferred Locale that the client will accept content in,
 * based on the value for the first <code>Accept-Language</code> header
 * that was encountered.  If the request did not specify a preferred
 * language, the server's default Locale is returned.
 */
@Override
public Locale getLocale() {
  if (!localesParsed) {
    parseLocales();
  }
  if (locales.size() > 0) {
    return locales.get(0);
  }
  return defaultLocale;
}

代码示例来源:origin: codefollower/Tomcat-Research

/**
 * Return the preferred Locale that the client will accept content in,
 * based on the value for the first <code>Accept-Language</code> header
 * that was encountered.  If the request did not specify a preferred
 * language, the server's default Locale is returned.
 */
@Override
public Locale getLocale() {
  if (!localesParsed) {
    parseLocales();
  }
  if (locales.size() > 0) {
    return locales.get(0);
  }
  return defaultLocale;
}

代码示例来源:origin: org.apache.catalina/com.springsource.org.apache.catalina

/**
 * Return the preferred Locale that the client will accept content in,
 * based on the value for the first <code>Accept-Language</code> header
 * that was encountered.  If the request did not specify a preferred
 * language, the server's default Locale is returned.
 */
@Override
public Locale getLocale() {
  if (!localesParsed) {
    parseLocales();
  }
  if (locales.size() > 0) {
    return locales.get(0);
  }
  return defaultLocale;
}

代码示例来源:origin: org.apache.tomcat/tomcat-catalina

/**
 * @return the set of preferred Locales that the client will accept
 * content in, based on the values for any <code>Accept-Language</code>
 * headers that were encountered.  If the request did not specify a
 * preferred language, the server's default Locale is returned.
 */
@Override
public Enumeration<Locale> getLocales() {
  if (!localesParsed) {
    parseLocales();
  }
  if (locales.size() > 0) {
    return Collections.enumeration(locales);
  }
  ArrayList<Locale> results = new ArrayList<>();
  results.add(defaultLocale);
  return Collections.enumeration(results);
}

代码示例来源:origin: org.apache.geronimo.ext.tomcat/catalina

/**
 * Return the set of preferred Locales that the client will accept
 * content in, based on the values for any <code>Accept-Language</code>
 * headers that were encountered.  If the request did not specify a
 * preferred language, the server's default Locale is returned.
 */
@Override
public Enumeration<Locale> getLocales() {
  if (!localesParsed) {
    parseLocales();
  }
  if (locales.size() > 0) {
    return Collections.enumeration(locales);
  }
  ArrayList<Locale> results = new ArrayList<Locale>();
  results.add(defaultLocale);
  return Collections.enumeration(results);
}

代码示例来源:origin: org.osivia.portal.core/osivia-portal-jbossas-jbossweb-lib

/*      */   public Enumeration getLocales()
/*      */   {
/* 1018 */     if (!this.localesParsed) {
/* 1019 */       parseLocales();
/*      */     }
/* 1021 */     if (this.locales.size() > 0)
/* 1022 */       return new Enumerator(this.locales);
/* 1023 */     ArrayList results = new ArrayList();
/* 1024 */     results.add(defaultLocale);
/* 1025 */     return new Enumerator(results);
/*      */   }
/*      */

代码示例来源:origin: tomcat/catalina

/**
 * Return the set of preferred Locales that the client will accept
 * content in, based on the values for any <code>Accept-Language</code>
 * headers that were encountered.  If the request did not specify a
 * preferred language, the server's default Locale is returned.
 */
public Enumeration getLocales() {
  if (!localesParsed)
    parseLocales();
  if (locales.size() > 0)
    return (new Enumerator(locales));
  ArrayList results = new ArrayList();
  results.add(defaultLocale);
  return (new Enumerator(results));
}

代码示例来源:origin: jboss.web/jbossweb

/**
 * Return the set of preferred Locales that the client will accept
 * content in, based on the values for any <code>Accept-Language</code>
 * headers that were encountered.  If the request did not specify a
 * preferred language, the server's default Locale is returned.
 */
public Enumeration getLocales() {
  if (!localesParsed)
    parseLocales();
  if (locales.size() > 0)
    return (new Enumerator(locales));
  ArrayList results = new ArrayList();
  results.add(defaultLocale);
  return (new Enumerator(results));
}

代码示例来源:origin: org.jboss.web/jbossweb

/**
 * Return the set of preferred Locales that the client will accept
 * content in, based on the values for any <code>Accept-Language</code>
 * headers that were encountered.  If the request did not specify a
 * preferred language, the server's default Locale is returned.
 */
public Enumeration getLocales() {
  if (!localesParsed)
    parseLocales();
  if (locales.size() > 0)
    return (new Enumerator(locales));
  ArrayList results = new ArrayList();
  results.add(defaultLocale);
  return (new Enumerator(results));
}

代码示例来源:origin: com.ovea.tajin.server/tajin-server-jetty9

/**
 * Return the set of preferred Locales that the client will accept
 * content in, based on the values for any <code>Accept-Language</code>
 * headers that were encountered.  If the request did not specify a
 * preferred language, the server's default Locale is returned.
 */
@Override
public Enumeration<Locale> getLocales() {
  if (!localesParsed)
    parseLocales();
  if (locales.size() > 0)
    return (new Enumerator<Locale>(locales));
  ArrayList<Locale> results = new ArrayList<Locale>();
  results.add(defaultLocale);
  return new Enumerator<Locale>(results);
}

代码示例来源:origin: com.ovea.tajin.servers/tajin-server-jetty9

/**
 * Return the set of preferred Locales that the client will accept
 * content in, based on the values for any <code>Accept-Language</code>
 * headers that were encountered.  If the request did not specify a
 * preferred language, the server's default Locale is returned.
 */
@Override
public Enumeration<Locale> getLocales() {
  if (!localesParsed)
    parseLocales();
  if (locales.size() > 0)
    return (new Enumerator<Locale>(locales));
  ArrayList<Locale> results = new ArrayList<Locale>();
  results.add(defaultLocale);
  return new Enumerator<Locale>(results);
}

相关文章

微信公众号

最新文章

更多

Request类方法