geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: r796354 - /geronimo/specs/trunk/geronimo-servlet_3.0_spec/src/main/java/javax/servlet/ServletContext.java
Date Tue, 21 Jul 2009 15:57:57 GMT
Author: djencks
Date: Tue Jul 21 15:57:57 2009
New Revision: 796354

URL: http://svn.apache.org/viewvc?rev=796354&view=rev
Log:
Glassfish servlet api has been updated since the last spec snapshot.  Update ServletContext

Modified:
    geronimo/specs/trunk/geronimo-servlet_3.0_spec/src/main/java/javax/servlet/ServletContext.java

Modified: geronimo/specs/trunk/geronimo-servlet_3.0_spec/src/main/java/javax/servlet/ServletContext.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-servlet_3.0_spec/src/main/java/javax/servlet/ServletContext.java?rev=796354&r1=796353&r2=796354&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-servlet_3.0_spec/src/main/java/javax/servlet/ServletContext.java
(original)
+++ geronimo/specs/trunk/geronimo-servlet_3.0_spec/src/main/java/javax/servlet/ServletContext.java
Tue Jul 21 15:57:57 2009
@@ -25,6 +25,8 @@
 import java.util.EnumSet;
 import java.util.Enumeration;
 import java.util.Set;
+import java.util.Map;
+import java.util.EventListener;
 
 
 /**
@@ -562,7 +564,15 @@
      * @return ServletRegistration for servlet you want
      * @since 3.0
      */
-    ServletRegistration findServletRegistration(String servletName);
+    ServletRegistration getServletRegistration(String servletName);
+
+    /**
+     * Fish out the servlet registration for a named servlet
+     *
+     * @return Map of name to ServletRegistration for all registered servlets
+     * @since 3.0
+     */
+    Map<String, ServletRegistration> getServletRegistrations();
 
     /**
      * Add a filter to this context
@@ -611,11 +621,50 @@
     <T extends Filter> T createFilter(Class<T> clazz) throws ServletException;
 
     /**
+     * Return the FilterRegistration corresponding to the named filter
      * @param filterName Name of filter you want to configure
      * @return FilterRegistration allowing configuration of filter
      * @since 3.0
      */
-    FilterRegistration findFilterRegistration(String filterName);
+    FilterRegistration getFilterRegistration(String filterName);
+
+    /**
+     * Return a possibly empty immutable map of registrations for all filters.
+     * @return FilterRegistration allowing configuration of filter
+     * @since 3.0
+     */
+    Map<String, FilterRegistration > getFilterRegistrations();
+
+    /**
+     * Add a listener created from the specified class
+     * @param listenerClass class of listener to add
+     * @since Servlet 3.0
+     */
+    void addListener(Class<? extends EventListener> listenerClass);
+
+    /**
+     * Add a listener created from the specified class name
+     * @param className name of class of listener to add
+     * @since Servlet 3.0
+     */
+    void addListener(String className);
+
+    /**
+     * add the listener instance
+     * @param t listener instance
+     * @param <T> type of listener
+     * @since Servlet 3.0
+     */
+    <T extends EventListener> void addListener(T t);
+
+    /**
+     * create a fully initialized listener
+     * @param clazz listener class
+     * @param <T> type of listener class
+     * @return fully initialized listener object
+     * @since Servlet 3.0
+     */
+    <T extends EventListener> T createListener(Class<T> clazz);
 
     /**
      * @param sessionCookieConfig configuration of session cookie



Mime
View raw message