james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nor...@apache.org
Subject svn commit: r1054459 - in /james/server/trunk/imapserver/src/main/java/org/apache/james/imapserver/netty: IMAPServer.java ImapStreamChannelUpstreamHandler.java
Date Sun, 02 Jan 2011 18:56:38 GMT
Author: norman
Date: Sun Jan  2 18:56:37 2011
New Revision: 1054459

URL: http://svn.apache.org/viewvc?rev=1054459&view=rev
Log:
Make sure we share the same instance of HashedWheelTimer for IMAP connections. See JAMES-1170

Modified:
    james/server/trunk/imapserver/src/main/java/org/apache/james/imapserver/netty/IMAPServer.java
    james/server/trunk/imapserver/src/main/java/org/apache/james/imapserver/netty/ImapStreamChannelUpstreamHandler.java

Modified: james/server/trunk/imapserver/src/main/java/org/apache/james/imapserver/netty/IMAPServer.java
URL: http://svn.apache.org/viewvc/james/server/trunk/imapserver/src/main/java/org/apache/james/imapserver/netty/IMAPServer.java?rev=1054459&r1=1054458&r2=1054459&view=diff
==============================================================================
--- james/server/trunk/imapserver/src/main/java/org/apache/james/imapserver/netty/IMAPServer.java
(original)
+++ james/server/trunk/imapserver/src/main/java/org/apache/james/imapserver/netty/IMAPServer.java
Sun Jan  2 18:56:37 2011
@@ -126,9 +126,9 @@ public class IMAPServer extends Abstract
                 final ImapRequestStreamHandler handler = new ImapRequestStreamHandler(decoder,
processor, encoder);
                 
                 if (isStartTLSSupported())  {
-                    pipeline.addLast("coreHandler",  new ImapStreamChannelUpstreamHandler(hello,
handler, getLogger(), IMAPServer.this.getTimeout(), getSSLContext(), getEnabledCipherSuites()));
+                    pipeline.addLast("coreHandler",  new ImapStreamChannelUpstreamHandler(hello,
handler, getLogger(), timer, IMAPServer.this.getTimeout(), getSSLContext(), getEnabledCipherSuites()));
                 } else {
-                    pipeline.addLast("coreHandler",  new ImapStreamChannelUpstreamHandler(hello,
handler, getLogger(), IMAPServer.this.getTimeout()));
+                    pipeline.addLast("coreHandler",  new ImapStreamChannelUpstreamHandler(hello,
handler, getLogger(), timer, IMAPServer.this.getTimeout()));
                 }
                 
                 return pipeline;

Modified: james/server/trunk/imapserver/src/main/java/org/apache/james/imapserver/netty/ImapStreamChannelUpstreamHandler.java
URL: http://svn.apache.org/viewvc/james/server/trunk/imapserver/src/main/java/org/apache/james/imapserver/netty/ImapStreamChannelUpstreamHandler.java?rev=1054459&r1=1054458&r2=1054459&view=diff
==============================================================================
--- james/server/trunk/imapserver/src/main/java/org/apache/james/imapserver/netty/ImapStreamChannelUpstreamHandler.java
(original)
+++ james/server/trunk/imapserver/src/main/java/org/apache/james/imapserver/netty/ImapStreamChannelUpstreamHandler.java
Sun Jan  2 18:56:37 2011
@@ -40,7 +40,7 @@ import org.jboss.netty.channel.ChannelHa
 import org.jboss.netty.channel.ChannelStateEvent;
 import org.jboss.netty.channel.ExceptionEvent;
 import org.jboss.netty.handler.ssl.SslHandler;
-import org.jboss.netty.util.HashedWheelTimer;
+import org.jboss.netty.util.Timer;
 
 /**
  * {@link StreamHandler} which handles IMAP
@@ -62,13 +62,13 @@ public class ImapStreamChannelUpstreamHa
     private final static String IMAP_SESSION = "IMAP_SESSION"; 
     private final static String BUFFERED_OUT = "BUFFERED_OUT";
     
-    public ImapStreamChannelUpstreamHandler(final String hello, final ImapRequestStreamHandler
handler, final Log logger, final long readTimeout) {
-        this(hello, handler, logger, readTimeout, null, null);
+    public ImapStreamChannelUpstreamHandler(final String hello, final ImapRequestStreamHandler
handler, final Log logger, final Timer timer, final long readTimeout) {
+        this(hello, handler, logger, timer, readTimeout, null, null);
     }
     
 
-    public ImapStreamChannelUpstreamHandler(final String hello, final ImapRequestStreamHandler
handler, final Log logger, final long readTimeout, SSLContext context, String[] enabledCipherSuites)
{
-        super(new HashedWheelTimer(), readTimeout, TimeUnit.SECONDS);
+    public ImapStreamChannelUpstreamHandler(final String hello, final ImapRequestStreamHandler
handler, final Log logger, final Timer timer, final long readTimeout, SSLContext context,
String[] enabledCipherSuites) {
+        super(timer, readTimeout, TimeUnit.SECONDS);
         this.logger = logger;
         this.hello = hello;
         this.handler = handler;



---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


Mime
View raw message