Java 类org.apache.catalina.util.Enumerator 实例源码

项目:lams    文件:Request.java   
/**
 * Return the names of all request attributes for this Request, or an
 * empty <code>Enumeration</code> if there are none.
 */
public Enumeration getAttributeNames() {
    if (isSecure()) {
        getAttribute(Globals.CERTIFICATES_ATTR);
    }
    return new Enumerator(attributes.keySet(), true);
}
项目:lams    文件:Request.java   
/**
 * 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));

}
项目:lams    文件:ApplicationRequest.java   
/**
 * Override the <code>getAttributeNames()</code> method of the wrapped
 * request.
 */
public Enumeration getAttributeNames() {

    synchronized (attributes) {
        return (new Enumerator(attributes.keySet()));
    }

}
项目:lams    文件:StandardWrapper.java   
/**
 * Return the set of initialization parameter names defined for this
 * servlet.  If none are defined, an empty Enumeration is returned.
 */
public Enumeration getInitParameterNames() {

    synchronized (parameters) {
        return (new Enumerator(parameters.keySet()));
    }

}
项目:lams    文件:ApplicationFilterConfig.java   
/**
 * Return an <code>Enumeration</code> of the names of the initialization
 * parameters for this Filter.
 */
public Enumeration getInitParameterNames() {

    Map map = filterDef.getParameterMap();
    if (map == null)
        return (new Enumerator(new ArrayList()));
    else
        return (new Enumerator(map.keySet()));

}
项目:jerrydog    文件:StandardSession.java   
/**
 * Return an <code>Enumeration</code> of <code>String</code> objects
 * containing the names of the objects bound to this session.
 *
 * @exception IllegalStateException if this method is called on an
 *  invalidated session
 */
public Enumeration getAttributeNames() {

    if (!isValid)
        throw new IllegalStateException
            (sm.getString("standardSession.getAttributeNames.ise"));

    synchronized (attributes) {
        return (new Enumerator(attributes.keySet()));
    }

}
项目:jerrydog    文件:HttpRequestBase.java   
/**
 * Return all of the values of the specified header, if any; otherwise,
 * return an empty enumeration.
 *
 * @param name Name of the requested header
 */
public Enumeration getHeaders(String name) {

    name = name.toLowerCase();
    synchronized (headers) {
        ArrayList values = (ArrayList) headers.get(name);
        if (values != null)
            return (new Enumerator(values));
        else
            return (new Enumerator(empty));
    }

}
项目:jerrydog    文件:HttpRequestBase.java   
/**
 * Return the names of all headers received with this request.
 */
public Enumeration getHeaderNames() {

    synchronized (headers) {
        return (new Enumerator(headers.keySet()));
    }

}
项目:jerrydog    文件:HttpRequestImpl.java   
/**
 * Return all of the values of the specified header, if any; otherwise,
 * return an empty enumeration.
 *
 * @param name Name of the requested header
 */
public Enumeration getHeaders(String name) {

    name = name.toLowerCase();
    ArrayList tempArrayList = new ArrayList();
    for (int i = 0; i < nextHeader; i++) {
        if (headerPool[i].equals(name))
            tempArrayList.add(new String(headerPool[i].value, 0,
                                         headerPool[i].valueEnd));
    }
    return (Enumeration) new Enumerator(tempArrayList);

}
项目:jerrydog    文件:HttpRequestImpl.java   
/**
 * Return the names of all headers received with this request.
 */
public Enumeration getHeaderNames() {
    ArrayList tempArrayList = new ArrayList();
    for (int i = 0; i < nextHeader; i++) {
        tempArrayList.add(new String(headerPool[i].name, 0,
                                     headerPool[i].nameEnd));
    }
    return (Enumeration) new Enumerator(tempArrayList);

}
项目:jerrydog    文件:RequestBase.java   
/**
 * Return the names of all request attributes for this Request, or an
 * empty <code>Enumeration</code> if there are none.
 */
public Enumeration getAttributeNames() {

    synchronized (attributes) {
        return (new Enumerator(attributes.keySet()));
    }

}
项目:jerrydog    文件:RequestBase.java   
/**
 * 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() {

    synchronized (locales) {
        if (locales.size() > 0)
            return (new Enumerator(locales));
    }
    ArrayList results = new ArrayList();
    results.add(defaultLocale);
    return (new Enumerator(results));

}
项目:jerrydog    文件:ApplicationContext.java   
/**
 * Return an enumeration of the names of the context attributes
 * associated with this context.
 */
public Enumeration getAttributeNames() {

    synchronized (attributes) {
        return (new Enumerator(attributes.keySet()));
    }

}
项目:jerrydog    文件:ApplicationContext.java   
/**
 * Return the names of the context's initialization parameters, or an
 * empty enumeration if the context has no initialization parameters.
 */
public Enumeration getInitParameterNames() {

    mergeParameters();
    synchronized (parameters) {
        return (new Enumerator(parameters.keySet()));
    }

}
项目:jerrydog    文件:ApplicationRequest.java   
/**
 * Override the <code>getAttributeNames()</code> method of the wrapped
 * request.
 */
public Enumeration getAttributeNames() {

    synchronized (attributes) {
        return (new Enumerator(attributes.keySet()));
    }

}
项目:jerrydog    文件:StandardWrapper.java   
/**
 * Return the set of initialization parameter names defined for this
 * servlet.  If none are defined, an empty Enumeration is returned.
 */
public Enumeration getInitParameterNames() {

    synchronized (parameters) {
        return (new Enumerator(parameters.keySet()));
    }

}
项目:jerrydog    文件:ApplicationFilterConfig.java   
/**
 * Return an <code>Enumeration</code> of the names of the initialization
 * parameters for this Filter.
 */
public Enumeration getInitParameterNames() {

    Map map = filterDef.getParameterMap();
    if (map == null)
        return (new Enumerator(new ArrayList()));
    else
        return (new Enumerator(map.keySet()));

}
项目:jerrydog    文件:ApplicationHttpRequest.java   
/**
 * Override the <code>getAttributeNames()</code> method of the wrapped
 * request.
 */
public Enumeration getAttributeNames() {

    synchronized (attributes) {
        return (new Enumerator(attributes.keySet()));
    }

}
项目:jerrydog    文件:ApplicationHttpRequest.java   
/**
 * Override the <code>getParameterNames()</code> method of the
 * wrapped request.
 */
public Enumeration getParameterNames() {

    synchronized (parameters) {
        return (new Enumerator(parameters.keySet()));
    }

}
项目:tip    文件:HttpRequest.java   
@Override
public Enumeration<?> getHeaders(String name) {
    name = name.toLowerCase();
       List<Object> values = headers.get(name);
       if (values != null) {
           return new Enumerator(values);
       } else {
           return new Enumerator(new ArrayList<>());
       }
}
项目:studyTomcat    文件:HttpRequest.java   
public Enumeration getHeaders(String name) {
  name = name.toLowerCase();
  synchronized (headers) {
    ArrayList values = (ArrayList) headers.get(name);
    if (values != null)
      return (new Enumerator(values));
    else
      return (new Enumerator(empty));
  }
}
项目:hazelcast-archive    文件:HazelcastSession.java   
/**
 * Return an <code>Enumeration</code> of <code>String</code> objects
 * containing the names of the objects bound to this session.
 *
 * @throws IllegalStateException if this method is called on an
 *                               invalidated session
 */
public Enumeration getAttributeNames() {
    if (!isValidInternal())
        throw new IllegalStateException
                (sm.getString("standardSession.getAttributeNames.ise"));
    Set keySet = attributes.keySet();
    keySet.remove(SESSION_MARK);
    return (new Enumerator(keySet, true));
}
项目:HowTomcatWorks    文件:StandardSession.java   
/**
 * Return an <code>Enumeration</code> of <code>String</code> objects
 * containing the names of the objects bound to this session.
 *
 * @exception IllegalStateException if this method is called on an
 *  invalidated session
 */
public Enumeration getAttributeNames() {

    if (!isValid)
        throw new IllegalStateException
            (sm.getString("standardSession.getAttributeNames.ise"));

    synchronized (attributes) {
        return (new Enumerator(attributes.keySet()));
    }

}
项目:HowTomcatWorks    文件:HttpRequestBase.java   
/**
 * Return all of the values of the specified header, if any; otherwise,
 * return an empty enumeration.
 *
 * @param name Name of the requested header
 */
public Enumeration getHeaders(String name) {

    name = name.toLowerCase();
    synchronized (headers) {
        ArrayList values = (ArrayList) headers.get(name);
        if (values != null)
            return (new Enumerator(values));
        else
            return (new Enumerator(empty));
    }

}
项目:HowTomcatWorks    文件:HttpRequestBase.java   
/**
 * Return the names of all headers received with this request.
 */
public Enumeration getHeaderNames() {

    synchronized (headers) {
        return (new Enumerator(headers.keySet()));
    }

}
项目:HowTomcatWorks    文件:HttpRequestImpl.java   
/**
 * Return all of the values of the specified header, if any; otherwise,
 * return an empty enumeration.
 *
 * @param name Name of the requested header
 */
public Enumeration getHeaders(String name) {

    name = name.toLowerCase();
    ArrayList tempArrayList = new ArrayList();
    for (int i = 0; i < nextHeader; i++) {
        if (headerPool[i].equals(name))
            tempArrayList.add(new String(headerPool[i].value, 0,
                                         headerPool[i].valueEnd));
    }
    return (Enumeration) new Enumerator(tempArrayList);

}
项目:HowTomcatWorks    文件:HttpRequestImpl.java   
/**
 * Return the names of all headers received with this request.
 */
public Enumeration getHeaderNames() {
    ArrayList tempArrayList = new ArrayList();
    for (int i = 0; i < nextHeader; i++) {
        tempArrayList.add(new String(headerPool[i].name, 0,
                                     headerPool[i].nameEnd));
    }
    return (Enumeration) new Enumerator(tempArrayList);

}
项目:HowTomcatWorks    文件:RequestBase.java   
/**
 * Return the names of all request attributes for this Request, or an
 * empty <code>Enumeration</code> if there are none.
 */
public Enumeration getAttributeNames() {

    synchronized (attributes) {
        return (new Enumerator(attributes.keySet()));
    }

}
项目:HowTomcatWorks    文件:RequestBase.java   
/**
 * 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() {

    synchronized (locales) {
        if (locales.size() > 0)
            return (new Enumerator(locales));
    }
    ArrayList results = new ArrayList();
    results.add(defaultLocale);
    return (new Enumerator(results));

}
项目:HowTomcatWorks    文件:ApplicationContext.java   
/**
 * Return an enumeration of the names of the context attributes
 * associated with this context.
 */
public Enumeration getAttributeNames() {

    synchronized (attributes) {
        return (new Enumerator(attributes.keySet()));
    }

}
项目:HowTomcatWorks    文件:ApplicationContext.java   
/**
 * Return the names of the context's initialization parameters, or an
 * empty enumeration if the context has no initialization parameters.
 */
public Enumeration getInitParameterNames() {

    mergeParameters();
    synchronized (parameters) {
        return (new Enumerator(parameters.keySet()));
    }

}
项目:HowTomcatWorks    文件:ApplicationRequest.java   
/**
 * Override the <code>getAttributeNames()</code> method of the wrapped
 * request.
 */
public Enumeration getAttributeNames() {

    synchronized (attributes) {
        return (new Enumerator(attributes.keySet()));
    }

}
项目:HowTomcatWorks    文件:StandardWrapper.java   
/**
 * Return the set of initialization parameter names defined for this
 * servlet.  If none are defined, an empty Enumeration is returned.
 */
public Enumeration getInitParameterNames() {

    synchronized (parameters) {
        return (new Enumerator(parameters.keySet()));
    }

}
项目:HowTomcatWorks    文件:ApplicationFilterConfig.java   
/**
 * Return an <code>Enumeration</code> of the names of the initialization
 * parameters for this Filter.
 */
public Enumeration getInitParameterNames() {

    Map map = filterDef.getParameterMap();
    if (map == null)
        return (new Enumerator(new ArrayList()));
    else
        return (new Enumerator(map.keySet()));

}
项目:HowTomcatWorks    文件:ApplicationHttpRequest.java   
/**
 * Override the <code>getAttributeNames()</code> method of the wrapped
 * request.
 */
public Enumeration getAttributeNames() {

    synchronized (attributes) {
        return (new Enumerator(attributes.keySet()));
    }

}
项目:HowTomcatWorks    文件:ApplicationHttpRequest.java   
/**
 * Override the <code>getParameterNames()</code> method of the
 * wrapped request.
 */
public Enumeration getParameterNames() {

    synchronized (parameters) {
        return (new Enumerator(parameters.keySet()));
    }

}
项目:HowTomcatWorks    文件:HttpRequest.java   
public Enumeration getHeaders(String name) {
  name = name.toLowerCase();
  synchronized (headers) {
    ArrayList values = (ArrayList) headers.get(name);
    if (values != null)
      return (new Enumerator(values));
    else
      return (new Enumerator(empty));
  }
}
项目:WBSAirback    文件:ReplicatedContext.java   
@SuppressWarnings("unchecked")
@Override
public Enumeration<String> getAttributeNames() {
    return new MultiEnumeration<String>(new Enumeration[] {
            super.getAttributeNames(),
            new Enumerator<String>(tomcatAttributes.keySet(), true)});
}
项目:WBSAirback    文件:StandardSession.java   
/**
 * Return an <code>Enumeration</code> of <code>String</code> objects
 * containing the names of the objects bound to this session.
 *
 * @exception IllegalStateException if this method is called on an
 *  invalidated session
 */
@Override
public Enumeration<String> getAttributeNames() {

    if (!isValidInternal())
        throw new IllegalStateException
            (sm.getString("standardSession.getAttributeNames.ise"));

    return (new Enumerator<String>(attributes.keySet(), true));

}
项目:WBSAirback    文件:Request.java   
/**
 * 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);

}