deltaspike-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ch...@apache.org
Subject git commit: DELTASPIKE-464 Unify naming (Broadcaster vs Emitter)
Date Fri, 13 Dec 2013 06:48:58 GMT
Updated Branches:
  refs/heads/master a00c7e2f6 -> fc25a1722


DELTASPIKE-464 Unify naming (Broadcaster vs Emitter)


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

Branch: refs/heads/master
Commit: fc25a17225c3b314f8e92d91ae18068d3cda8329
Parents: a00c7e2
Author: Christian Kaltepoth <chkal@apache.org>
Authored: Fri Dec 13 07:44:26 2013 +0100
Committer: Christian Kaltepoth <chkal@apache.org>
Committed: Fri Dec 13 07:44:26 2013 +0100

----------------------------------------------------------------------
 .../impl/event/EventBridgeContextListener.java  |  2 +-
 .../servlet/impl/event/EventBridgeFilter.java   |  2 +-
 .../impl/event/EventBridgeSessionListener.java  |  2 +-
 .../servlet/impl/event/EventBroadcaster.java    | 71 ++++++++++++++++++++
 .../servlet/impl/event/EventEmitter.java        | 71 --------------------
 5 files changed, 74 insertions(+), 74 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/deltaspike/blob/fc25a172/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 aa121dd..8bdbb2b 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
@@ -27,7 +27,7 @@ import org.apache.deltaspike.servlet.api.literal.InitializedLiteral;
 /**
  * This class listens for servlet context events and forwards them to the CDI event bus.
  */
-public class EventBridgeContextListener extends EventEmitter implements ServletContextListener
+public class EventBridgeContextListener extends EventBroadcaster implements ServletContextListener
 {
 
     @Override

http://git-wip-us.apache.org/repos/asf/deltaspike/blob/fc25a172/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 5bcc153..905bc29 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
@@ -33,7 +33,7 @@ import org.apache.deltaspike.servlet.api.literal.InitializedLiteral;
 /**
  * This filter sends events to the CDI event bus when requests and responses get created
and destroyed.
  */
-public class EventBridgeFilter extends EventEmitter implements Filter
+public class EventBridgeFilter extends EventBroadcaster implements Filter
 {
 
     @Override

http://git-wip-us.apache.org/repos/asf/deltaspike/blob/fc25a172/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 afa476d..bd1ed5d 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
@@ -27,7 +27,7 @@ import org.apache.deltaspike.servlet.api.literal.InitializedLiteral;
 /**
  * This class listens for HTTP session events and forwards them to the CDI event bus.
  */
-public class EventBridgeSessionListener extends EventEmitter implements HttpSessionListener
+public class EventBridgeSessionListener extends EventBroadcaster implements HttpSessionListener
 {
 
     @Override

http://git-wip-us.apache.org/repos/asf/deltaspike/blob/fc25a172/deltaspike/modules/servlet/impl/src/main/java/org/apache/deltaspike/servlet/impl/event/EventBroadcaster.java
----------------------------------------------------------------------
diff --git a/deltaspike/modules/servlet/impl/src/main/java/org/apache/deltaspike/servlet/impl/event/EventBroadcaster.java
b/deltaspike/modules/servlet/impl/src/main/java/org/apache/deltaspike/servlet/impl/event/EventBroadcaster.java
new file mode 100644
index 0000000..b3c95ca
--- /dev/null
+++ b/deltaspike/modules/servlet/impl/src/main/java/org/apache/deltaspike/servlet/impl/event/EventBroadcaster.java
@@ -0,0 +1,71 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.deltaspike.servlet.impl.event;
+
+import java.lang.annotation.Annotation;
+
+import javax.enterprise.inject.spi.BeanManager;
+
+import org.apache.deltaspike.core.api.provider.BeanManagerProvider;
+import org.apache.deltaspike.core.spi.activation.Deactivatable;
+import org.apache.deltaspike.core.util.ClassDeactivationUtils;
+
+/**
+ * Base class for classes which send servlet events to the CDI event bus. This class uses
{@link BeanManagerProvider} to
+ * obtain the BeanManager.
+ */
+abstract class EventBroadcaster implements Deactivatable
+{
+
+    private volatile BeanManager beanManager;
+
+    private final boolean activated;
+
+    public EventBroadcaster()
+    {
+        this.activated = ClassDeactivationUtils.isActivated(getClass());
+    }
+
+    protected void fireEvent(Object event, Annotation... qualifier)
+    {
+        getBeanManager().fireEvent(event, qualifier);
+    }
+
+    protected BeanManager getBeanManager()
+    {
+        if (beanManager == null)
+        {
+            synchronized (this)
+            {
+                if (beanManager == null)
+                {
+                    beanManager = BeanManagerProvider.getInstance().getBeanManager();
+                }
+            }
+        }
+
+        return beanManager;
+    }
+
+    protected boolean isActivated()
+    {
+        return activated;
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/deltaspike/blob/fc25a172/deltaspike/modules/servlet/impl/src/main/java/org/apache/deltaspike/servlet/impl/event/EventEmitter.java
----------------------------------------------------------------------
diff --git a/deltaspike/modules/servlet/impl/src/main/java/org/apache/deltaspike/servlet/impl/event/EventEmitter.java
b/deltaspike/modules/servlet/impl/src/main/java/org/apache/deltaspike/servlet/impl/event/EventEmitter.java
deleted file mode 100644
index d01a67c..0000000
--- a/deltaspike/modules/servlet/impl/src/main/java/org/apache/deltaspike/servlet/impl/event/EventEmitter.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.deltaspike.servlet.impl.event;
-
-import java.lang.annotation.Annotation;
-
-import javax.enterprise.inject.spi.BeanManager;
-
-import org.apache.deltaspike.core.api.provider.BeanManagerProvider;
-import org.apache.deltaspike.core.spi.activation.Deactivatable;
-import org.apache.deltaspike.core.util.ClassDeactivationUtils;
-
-/**
- * Base class for classes which send servlet events to the CDI event bus. This class uses
{@link BeanManagerProvider} to
- * obtain the BeanManager.
- */
-abstract class EventEmitter implements Deactivatable
-{
-
-    private volatile BeanManager beanManager;
-
-    private final boolean activated;
-
-    public EventEmitter()
-    {
-        this.activated = ClassDeactivationUtils.isActivated(getClass());
-    }
-
-    protected void fireEvent(Object event, Annotation... qualifier)
-    {
-        getBeanManager().fireEvent(event, qualifier);
-    }
-
-    protected BeanManager getBeanManager()
-    {
-        if (beanManager == null)
-        {
-            synchronized (this)
-            {
-                if (beanManager == null)
-                {
-                    beanManager = BeanManagerProvider.getInstance().getBeanManager();
-                }
-            }
-        }
-
-        return beanManager;
-    }
-
-    protected boolean isActivated()
-    {
-        return activated;
-    }
-
-}


Mime
View raw message