/** * 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); }
/** * 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)); }
/** * Override the <code>getAttributeNames()</code> method of the wrapped * request. */ public Enumeration getAttributeNames() { synchronized (attributes) { return (new Enumerator(attributes.keySet())); } }
/** * 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())); } }
/** * 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())); }
/** * 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())); } }
/** * 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)); } }
/** * Return the names of all headers received with this request. */ public Enumeration getHeaderNames() { synchronized (headers) { return (new Enumerator(headers.keySet())); } }
/** * 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); }
/** * 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); }
/** * 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())); } }
/** * 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)); }
/** * Return an enumeration of the names of the context attributes * associated with this context. */ public Enumeration getAttributeNames() { synchronized (attributes) { return (new Enumerator(attributes.keySet())); } }
/** * 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())); } }
/** * Override the <code>getParameterNames()</code> method of the * wrapped request. */ public Enumeration getParameterNames() { synchronized (parameters) { return (new Enumerator(parameters.keySet())); } }
@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<>()); } }
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)); } }
/** * 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)); }
@SuppressWarnings("unchecked") @Override public Enumeration<String> getAttributeNames() { return new MultiEnumeration<String>(new Enumeration[] { super.getAttributeNames(), new Enumerator<String>(tomcatAttributes.keySet(), true)}); }
/** * 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)); }
/** * 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); }