Author: edeoliveira
Date: Sun Jun 21 15:58:51 2009
New Revision: 787043

URL: http://svn.apache.org/viewvc?rev=787043&view=rev
Log:
Fix for DIRMINA-714: changes default event ordered to be all but the 
SESSION_CREATED event
This allow the filter to behave like it should for basic usage leaving the 
ability of fine grain control for advanced users

Modified:
    
mina/trunk/core/src/main/java/org/apache/mina/filter/executor/ExecutorFilter.java

Modified: 
mina/trunk/core/src/main/java/org/apache/mina/filter/executor/ExecutorFilter.java
URL: 
http://svn.apache.org/viewvc/mina/trunk/core/src/main/java/org/apache/mina/filter/executor/ExecutorFilter.java?rev=787043&r1=787042&r2=787043&view=diff
==============================================================================
--- 
mina/trunk/core/src/main/java/org/apache/mina/filter/executor/ExecutorFilter.java
 (original)
+++ 
mina/trunk/core/src/main/java/org/apache/mina/filter/executor/ExecutorFilter.java
 Sun Jun 21 15:58:51 2009
@@ -137,15 +137,23 @@
     private static final boolean NOT_MANAGEABLE_EXECUTOR = false;
     
     /** A list of default EventTypes to be handled by the executor */
-    private static IoEventType[] DEFAULT_EVENT_SET = new IoEventType[] {
-        IoEventType.EXCEPTION_CAUGHT,
-        IoEventType.MESSAGE_RECEIVED, 
-        IoEventType.MESSAGE_SENT,
-        IoEventType.SESSION_CLOSED, 
-        IoEventType.SESSION_IDLE,
-        IoEventType.SESSION_OPENED
-    };
+    private static final IoEventType[] DEFAULT_EVENT_SET;
     
+    /**
+     * Add all {...@link IoEventType} except {...@link 
IoEventType.SESSION_CREATED}
+     * as required by {...@link #initEventTypes(IoEventType...)}.
+     */
+    static {
+        IoEventType[] all = IoEventType.values();
+        DEFAULT_EVENT_SET = new IoEventType[all.length-1];
+        int i=0;
+        for (IoEventType type : all) {
+            if (type != IoEventType.SESSION_CREATED) {
+                DEFAULT_EVENT_SET[i] = type;
+                i++;
+            }                
+        }
+    }
 
     /**
      * (Convenience constructor) Creates a new instance with a new


Reply via email to