deltaspike-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ch...@apache.org
Subject [08/10] git commit: No more @Web qualifier for servlet events
Date Thu, 13 Jun 2013 05:02:57 GMT
No more @Web qualifier for servlet events


Project: http://git-wip-us.apache.org/repos/asf/deltaspike/repo
Commit: http://git-wip-us.apache.org/repos/asf/deltaspike/commit/12dea17b
Tree: http://git-wip-us.apache.org/repos/asf/deltaspike/tree/12dea17b
Diff: http://git-wip-us.apache.org/repos/asf/deltaspike/diff/12dea17b

Branch: refs/heads/master
Commit: 12dea17b93b95e0098deaa537ac285c0f2c475f3
Parents: 7df63a8
Author: Christian Kaltepoth <christian@kaltepoth.de>
Authored: Tue Jun 11 07:10:54 2013 +0200
Committer: Christian Kaltepoth <christian@kaltepoth.de>
Committed: Thu Jun 13 06:53:29 2013 +0200

----------------------------------------------------------------------
 .../servlet/impl/event/EventBridgeContextListener.java      | 5 ++---
 .../deltaspike/servlet/impl/event/EventBridgeFilter.java    | 9 ++++-----
 .../servlet/impl/event/EventBridgeSessionListener.java      | 5 ++---
 .../impl/event/context/ServletContextEventsObserver.java    | 5 ++---
 .../impl/event/request/RequestResponseEventsObserver.java   | 9 ++++-----
 .../servlet/impl/event/session/SessionEventsObserver.java   | 5 ++---
 6 files changed, 16 insertions(+), 22 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/deltaspike/blob/12dea17b/deltaspike/modules/servlet/impl/src/main/java/org/apache/deltaspike/servlet/impl/event/EventBridgeContextListener.java
----------------------------------------------------------------------
diff --git a/deltaspike/modules/servlet/impl/src/main/java/org/apache/deltaspike/servlet/impl/event/EventBridgeContextListener.java
b/deltaspike/modules/servlet/impl/src/main/java/org/apache/deltaspike/servlet/impl/event/EventBridgeContextListener.java
index a993bce..0872834 100644
--- a/deltaspike/modules/servlet/impl/src/main/java/org/apache/deltaspike/servlet/impl/event/EventBridgeContextListener.java
+++ b/deltaspike/modules/servlet/impl/src/main/java/org/apache/deltaspike/servlet/impl/event/EventBridgeContextListener.java
@@ -23,7 +23,6 @@ import javax.servlet.ServletContextListener;
 
 import org.apache.deltaspike.servlet.api.literal.DestroyedLiteral;
 import org.apache.deltaspike.servlet.api.literal.InitializedLiteral;
-import org.apache.deltaspike.servlet.api.literal.WebLiteral;
 
 /**
  * This class listens for servlet context events and forwards them to the CDI event bus.
@@ -36,13 +35,13 @@ public class EventBridgeContextListener extends EventEmitter implements
ServletC
     @Override
     public void contextInitialized(ServletContextEvent sce)
     {
-        fireEvent(sce.getServletContext(), WebLiteral.INSTANCE, InitializedLiteral.INSTANCE);
+        fireEvent(sce.getServletContext(), InitializedLiteral.INSTANCE);
     }
 
     @Override
     public void contextDestroyed(ServletContextEvent sce)
     {
-        fireEvent(sce.getServletContext(), WebLiteral.INSTANCE, DestroyedLiteral.INSTANCE);
+        fireEvent(sce.getServletContext(), DestroyedLiteral.INSTANCE);
     }
 
 }

http://git-wip-us.apache.org/repos/asf/deltaspike/blob/12dea17b/deltaspike/modules/servlet/impl/src/main/java/org/apache/deltaspike/servlet/impl/event/EventBridgeFilter.java
----------------------------------------------------------------------
diff --git a/deltaspike/modules/servlet/impl/src/main/java/org/apache/deltaspike/servlet/impl/event/EventBridgeFilter.java
b/deltaspike/modules/servlet/impl/src/main/java/org/apache/deltaspike/servlet/impl/event/EventBridgeFilter.java
index 79db1a7..641063b 100644
--- a/deltaspike/modules/servlet/impl/src/main/java/org/apache/deltaspike/servlet/impl/event/EventBridgeFilter.java
+++ b/deltaspike/modules/servlet/impl/src/main/java/org/apache/deltaspike/servlet/impl/event/EventBridgeFilter.java
@@ -29,7 +29,6 @@ import javax.servlet.ServletResponse;
 
 import org.apache.deltaspike.servlet.api.literal.DestroyedLiteral;
 import org.apache.deltaspike.servlet.api.literal.InitializedLiteral;
-import org.apache.deltaspike.servlet.api.literal.WebLiteral;
 
 /**
  * This filter sends events to the CDI event bus when requests and responses get created
and destroyed.
@@ -51,8 +50,8 @@ public class EventBridgeFilter extends EventEmitter implements Filter
     {
 
         // fire @Initialized events
-        fireEvent(request, WebLiteral.INSTANCE, InitializedLiteral.INSTANCE);
-        fireEvent(response, WebLiteral.INSTANCE, InitializedLiteral.INSTANCE);
+        fireEvent(request, InitializedLiteral.INSTANCE);
+        fireEvent(response, InitializedLiteral.INSTANCE);
 
         try
         {
@@ -61,8 +60,8 @@ public class EventBridgeFilter extends EventEmitter implements Filter
         finally
         {
             // fire @Destroyed events
-            fireEvent(request, WebLiteral.INSTANCE, DestroyedLiteral.INSTANCE);
-            fireEvent(response, WebLiteral.INSTANCE, DestroyedLiteral.INSTANCE);
+            fireEvent(request, DestroyedLiteral.INSTANCE);
+            fireEvent(response, DestroyedLiteral.INSTANCE);
         }
 
     }

http://git-wip-us.apache.org/repos/asf/deltaspike/blob/12dea17b/deltaspike/modules/servlet/impl/src/main/java/org/apache/deltaspike/servlet/impl/event/EventBridgeSessionListener.java
----------------------------------------------------------------------
diff --git a/deltaspike/modules/servlet/impl/src/main/java/org/apache/deltaspike/servlet/impl/event/EventBridgeSessionListener.java
b/deltaspike/modules/servlet/impl/src/main/java/org/apache/deltaspike/servlet/impl/event/EventBridgeSessionListener.java
index 691f3b9..7438893 100644
--- a/deltaspike/modules/servlet/impl/src/main/java/org/apache/deltaspike/servlet/impl/event/EventBridgeSessionListener.java
+++ b/deltaspike/modules/servlet/impl/src/main/java/org/apache/deltaspike/servlet/impl/event/EventBridgeSessionListener.java
@@ -23,7 +23,6 @@ import javax.servlet.http.HttpSessionListener;
 
 import org.apache.deltaspike.servlet.api.literal.DestroyedLiteral;
 import org.apache.deltaspike.servlet.api.literal.InitializedLiteral;
-import org.apache.deltaspike.servlet.api.literal.WebLiteral;
 
 /**
  * This class listens for HTTP session events and forwards them to the CDI event bus.
@@ -36,12 +35,12 @@ public class EventBridgeSessionListener extends EventEmitter implements
HttpSess
     @Override
     public void sessionCreated(HttpSessionEvent se)
     {
-        fireEvent(se.getSession(), WebLiteral.INSTANCE, InitializedLiteral.INSTANCE);
+        fireEvent(se.getSession(), InitializedLiteral.INSTANCE);
     }
 
     @Override
     public void sessionDestroyed(HttpSessionEvent se)
     {
-        fireEvent(se.getSession(), WebLiteral.INSTANCE, DestroyedLiteral.INSTANCE);
+        fireEvent(se.getSession(), DestroyedLiteral.INSTANCE);
     }
 }

http://git-wip-us.apache.org/repos/asf/deltaspike/blob/12dea17b/deltaspike/modules/servlet/impl/src/test/java/org/apache/deltaspike/test/servlet/impl/event/context/ServletContextEventsObserver.java
----------------------------------------------------------------------
diff --git a/deltaspike/modules/servlet/impl/src/test/java/org/apache/deltaspike/test/servlet/impl/event/context/ServletContextEventsObserver.java
b/deltaspike/modules/servlet/impl/src/test/java/org/apache/deltaspike/test/servlet/impl/event/context/ServletContextEventsObserver.java
index 9e9d1b4..e426414 100644
--- a/deltaspike/modules/servlet/impl/src/test/java/org/apache/deltaspike/test/servlet/impl/event/context/ServletContextEventsObserver.java
+++ b/deltaspike/modules/servlet/impl/src/test/java/org/apache/deltaspike/test/servlet/impl/event/context/ServletContextEventsObserver.java
@@ -28,7 +28,6 @@ import javax.servlet.ServletContext;
 
 import org.apache.deltaspike.servlet.api.Destroyed;
 import org.apache.deltaspike.servlet.api.Initialized;
-import org.apache.deltaspike.servlet.api.Web;
 
 /**
  * Application scoped observer which listens for {@link ServletContext} events on the CDI
event bus.
@@ -41,12 +40,12 @@ public class ServletContextEventsObserver
 
     private final List<String> eventLog = new ArrayList<String>();
 
-    public void contextInitialized(@Observes @Web @Initialized ServletContext context)
+    public void contextInitialized(@Observes @Initialized ServletContext context)
     {
         eventLog.add("Initialized ServletContext: " + context.getServletContextName());
     }
 
-    public void contextDestroyed(@Observes @Web @Destroyed ServletContext context)
+    public void contextDestroyed(@Observes @Destroyed ServletContext context)
     {
         eventLog.add("Destroyed ServletContext: " + context.getServletContextName());
     }

http://git-wip-us.apache.org/repos/asf/deltaspike/blob/12dea17b/deltaspike/modules/servlet/impl/src/test/java/org/apache/deltaspike/test/servlet/impl/event/request/RequestResponseEventsObserver.java
----------------------------------------------------------------------
diff --git a/deltaspike/modules/servlet/impl/src/test/java/org/apache/deltaspike/test/servlet/impl/event/request/RequestResponseEventsObserver.java
b/deltaspike/modules/servlet/impl/src/test/java/org/apache/deltaspike/test/servlet/impl/event/request/RequestResponseEventsObserver.java
index 50dd6f1..7e8d9af 100644
--- a/deltaspike/modules/servlet/impl/src/test/java/org/apache/deltaspike/test/servlet/impl/event/request/RequestResponseEventsObserver.java
+++ b/deltaspike/modules/servlet/impl/src/test/java/org/apache/deltaspike/test/servlet/impl/event/request/RequestResponseEventsObserver.java
@@ -29,7 +29,6 @@ import javax.servlet.http.HttpServletResponse;
 
 import org.apache.deltaspike.servlet.api.Destroyed;
 import org.apache.deltaspike.servlet.api.Initialized;
-import org.apache.deltaspike.servlet.api.Web;
 
 /**
  * Application scoped observer which listens for {@link HttpServletRequest} and {@link HttpServletResponse}
events on
@@ -43,22 +42,22 @@ public class RequestResponseEventsObserver
 
     private final List<String> eventLog = new ArrayList<String>();
 
-    public void requestInitialized(@Observes @Web @Initialized HttpServletRequest request)
+    public void requestInitialized(@Observes @Initialized HttpServletRequest request)
     {
         eventLog.add("Initialized HttpServletRequest: " + request.getRequestURI());
     }
 
-    public void responseInitialized(@Observes @Web @Initialized HttpServletResponse response)
+    public void responseInitialized(@Observes @Initialized HttpServletResponse response)
     {
         eventLog.add("Initialized HttpServletResponse");
     }
 
-    public void requestDestroyed(@Observes @Web @Destroyed HttpServletRequest request)
+    public void requestDestroyed(@Observes @Destroyed HttpServletRequest request)
     {
         eventLog.add("Destroyed HttpServletRequest: " + request.getRequestURI());
     }
 
-    public void responseDestroyed(@Observes @Web @Destroyed HttpServletResponse response)
+    public void responseDestroyed(@Observes @Destroyed HttpServletResponse response)
     {
         eventLog.add("Destroyed HttpServletResponse");
     }

http://git-wip-us.apache.org/repos/asf/deltaspike/blob/12dea17b/deltaspike/modules/servlet/impl/src/test/java/org/apache/deltaspike/test/servlet/impl/event/session/SessionEventsObserver.java
----------------------------------------------------------------------
diff --git a/deltaspike/modules/servlet/impl/src/test/java/org/apache/deltaspike/test/servlet/impl/event/session/SessionEventsObserver.java
b/deltaspike/modules/servlet/impl/src/test/java/org/apache/deltaspike/test/servlet/impl/event/session/SessionEventsObserver.java
index 9db5be6..6ccb4e6 100644
--- a/deltaspike/modules/servlet/impl/src/test/java/org/apache/deltaspike/test/servlet/impl/event/session/SessionEventsObserver.java
+++ b/deltaspike/modules/servlet/impl/src/test/java/org/apache/deltaspike/test/servlet/impl/event/session/SessionEventsObserver.java
@@ -28,7 +28,6 @@ import javax.servlet.http.HttpSession;
 
 import org.apache.deltaspike.servlet.api.Destroyed;
 import org.apache.deltaspike.servlet.api.Initialized;
-import org.apache.deltaspike.servlet.api.Web;
 
 /**
  * Application scoped observer which listens for {@link HttpSession} events on the CDI event
bus.
@@ -41,12 +40,12 @@ public class SessionEventsObserver
 
     private final List<String> eventLog = new ArrayList<String>();
 
-    public void sessionInitialized(@Observes @Web @Initialized HttpSession session)
+    public void sessionInitialized(@Observes @Initialized HttpSession session)
     {
         eventLog.add("Initialized HttpSession");
     }
 
-    public void sessionDestroyed(@Observes @Web @Destroyed HttpSession session)
+    public void sessionDestroyed(@Observes @Destroyed HttpSession session)
     {
         eventLog.add("Destroyed HttpSession");
     }


Mime
View raw message