/** * Adds a filter mapping with the given url patterns and dispatcher * types for the Filter represented by this FilterRegistration. * * <p>Filter mappings are matched in the order in which they were * added. * * <p>If this method is called multiple times, each successive call * adds to the effects of the former. * * @param dispatcherTypes the dispatcher types of the filter mapping, * or null if the default <tt>DispatcherType.REQUEST</tt> is to be used * @param urlPatterns the url patterns of the filter mapping * * @throws IllegalArgumentException if <tt>urlPatterns</tt> is null or * empty * @throws IllegalStateException if the ServletContext from which this * FilterRegistration was obtained has already been initialized */ public void addMappingForUrlPatterns(EnumSet<DispatcherType> dispatcherTypes, String... urlPatterns) { addMappingForUrlPatterns(dispatcherTypes, true, urlPatterns); }
/** * Adds a filter mapping with the given servlet names and dispatcher * types for the Filter represented by this FilterRegistration. * * <p>Filter mappings are matched in the order in which they were * added. * * <p>If this method is called multiple times, each successive call * adds to the effects of the former. * * @param dispatcherTypes the dispatcher types of the filter mapping, * or null if the default <tt>DispatcherType.REQUEST</tt> is to be used * @param servletNames the servlet names of the filter mapping * * @throws IllegalArgumentException if <tt>servletNames</tt> is null or * empty * @throws IllegalStateException if the ServletContext from which this * FilterRegistration was obtained has already been initialized */ public void addMappingForServletNames(EnumSet<DispatcherType> dispatcherTypes, String... servletNames) { addMappingForServletNames(dispatcherTypes, true, servletNames); }
/** * Gets the currently available URL pattern mappings of the Filter * represented by this <code>FilterRegistration</code>. * * <p>If permitted, any changes to the returned <code>Collection</code> must not * affect this <code>FilterRegistration</code>. * * @return a (possibly empty) <code>Collection</code> of the currently * available URL pattern mappings of the Filter represented by this * <code>FilterRegistration</code> */ @Override public Collection<String> getUrlPatternMappings() { return ctx.getUrlPatternFilterMappings(getName()); }
displayName, registration.className, registration.getUrlPatternMappings(), registration.getServletNameMappings()});
registration = new FilterRegistration(this, filterName, filterClass); filterRegistrations.put(filterName, registration); } else {
context.addFilter(filterDescriptor.getFilterName(), filterDescriptor.getFilterClass()); filterRegistration.setInitParameters(filterDescriptor.getInitParams()); filterRegistration.addMappingForUrlPatterns( grizzlyDispatcherTypes(filterDescriptor.getDispatcherTypes()), servletPathLocal);
displayName, registration.className, registration.getUrlPatternMappings(), registration.getServletNameMappings()});
registration = new FilterRegistration(this, filterName, className); filterRegistrations.put(filterName, registration); } else {
/** * Gets the currently available URL pattern mappings of the Filter * represented by this <code>FilterRegistration</code>. * * <p>If permitted, any changes to the returned <code>Collection</code> must not * affect this <code>FilterRegistration</code>. * * @return a (possibly empty) <code>Collection</code> of the currently * available URL pattern mappings of the Filter represented by this * <code>FilterRegistration</code> */ @Override public Collection<String> getUrlPatternMappings() { return ctx.getUrlPatternFilterMappings(getName()); }
displayName, registration.className, registration.getUrlPatternMappings(), registration.getServletNameMappings()});
/** * Adds a filter mapping with the given url patterns and dispatcher * types for the Filter represented by this FilterRegistration. * * <p>Filter mappings are matched in the order in which they were * added. * * <p>If this method is called multiple times, each successive call * adds to the effects of the former. * * @param dispatcherTypes the dispatcher types of the filter mapping, * or null if the default <tt>DispatcherType.REQUEST</tt> is to be used * @param urlPatterns the url patterns of the filter mapping * * @throws IllegalArgumentException if <tt>urlPatterns</tt> is null or * empty * @throws IllegalStateException if the ServletContext from which this * FilterRegistration was obtained has already been initialized */ public void addMappingForUrlPatterns(EnumSet<DispatcherType> dispatcherTypes, String... urlPatterns) { addMappingForUrlPatterns(dispatcherTypes, true, urlPatterns); }
registration = new FilterRegistration(this, filterName, className); filterRegistrations.put(filterName, registration); } else {
/** * Adds a filter mapping with the given servlet names and dispatcher * types for the Filter represented by this FilterRegistration. * * <p>Filter mappings are matched in the order in which they were * added. * * <p>If this method is called multiple times, each successive call * adds to the effects of the former. * * @param dispatcherTypes the dispatcher types of the filter mapping, * or null if the default <tt>DispatcherType.REQUEST</tt> is to be used * @param servletNames the servlet names of the filter mapping * * @throws IllegalArgumentException if <tt>servletNames</tt> is null or * empty * @throws IllegalStateException if the ServletContext from which this * FilterRegistration was obtained has already been initialized */ public void addMappingForServletNames(EnumSet<DispatcherType> dispatcherTypes, String... servletNames) { addMappingForServletNames(dispatcherTypes, true, servletNames); }
/** * Gets the currently available servlet name mappings * of the Filter represented by this <code>FilterRegistration</code>. * * <p>If permitted, any changes to the returned <code>Collection</code> must not * affect this <code>FilterRegistration</code>. * * @return a (possibly empty) <code>Collection</code> of the currently * available servlet name mappings of the Filter represented by this * <code>FilterRegistration</code> */ @Override public Collection<String> getServletNameMappings() { return ctx.getServletNameFilterMappings(getName()); }
displayName, registration.className, registration.getUrlPatternMappings(), registration.getServletNameMappings()});
/** * Adds a filter mapping with the given url patterns and dispatcher * types for the Filter represented by this FilterRegistration. * * <p>Filter mappings are matched in the order in which they were * added. * * <p>If this method is called multiple times, each successive call * adds to the effects of the former. * * @param dispatcherTypes the dispatcher types of the filter mapping, * or null if the default <tt>DispatcherType.REQUEST</tt> is to be used * @param urlPatterns the url patterns of the filter mapping * * @throws IllegalArgumentException if <tt>urlPatterns</tt> is null or * empty * @throws IllegalStateException if the ServletContext from which this * FilterRegistration was obtained has already been initialized */ public void addMappingForUrlPatterns(EnumSet<DispatcherType> dispatcherTypes, String... urlPatterns) { addMappingForUrlPatterns(dispatcherTypes, true, urlPatterns); }
registration = new FilterRegistration(this, filterName, filterClass); filterRegistrations.put(filterName, registration); } else {
/** * Adds a filter mapping with the given servlet names and dispatcher * types for the Filter represented by this FilterRegistration. * * <p>Filter mappings are matched in the order in which they were * added. * * <p>If this method is called multiple times, each successive call * adds to the effects of the former. * * @param dispatcherTypes the dispatcher types of the filter mapping, * or null if the default <tt>DispatcherType.REQUEST</tt> is to be used * @param servletNames the servlet names of the filter mapping * * @throws IllegalArgumentException if <tt>servletNames</tt> is null or * empty * @throws IllegalStateException if the ServletContext from which this * FilterRegistration was obtained has already been initialized */ public void addMappingForServletNames(EnumSet<DispatcherType> dispatcherTypes, String... servletNames) { addMappingForServletNames(dispatcherTypes, true, servletNames); }
/** * Gets the currently available servlet name mappings * of the Filter represented by this <code>FilterRegistration</code>. * * <p>If permitted, any changes to the returned <code>Collection</code> must not * affect this <code>FilterRegistration</code>. * * @return a (possibly empty) <code>Collection</code> of the currently * available servlet name mappings of the Filter represented by this * <code>FilterRegistration</code> */ @Override public Collection<String> getServletNameMappings() { return ctx.getServletNameFilterMappings(getName()); }
displayName, registration.className, registration.getUrlPatternMappings(), registration.getServletNameMappings()});