You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by no...@apache.org on 2011/04/02 16:02:59 UTC

svn commit: r1088028 - /james/server/trunk/imapserver/src/main/java/org/apache/james/imapserver/netty/ImapIdleStateHandler.java

Author: norman
Date: Sat Apr  2 14:02:59 2011
New Revision: 1088028

URL: http://svn.apache.org/viewvc?rev=1088028&view=rev
Log:
Replace tabs with spaces

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

Modified: james/server/trunk/imapserver/src/main/java/org/apache/james/imapserver/netty/ImapIdleStateHandler.java
URL: http://svn.apache.org/viewvc/james/server/trunk/imapserver/src/main/java/org/apache/james/imapserver/netty/ImapIdleStateHandler.java?rev=1088028&r1=1088027&r2=1088028&view=diff
==============================================================================
--- james/server/trunk/imapserver/src/main/java/org/apache/james/imapserver/netty/ImapIdleStateHandler.java (original)
+++ james/server/trunk/imapserver/src/main/java/org/apache/james/imapserver/netty/ImapIdleStateHandler.java Sat Apr  2 14:02:59 2011
@@ -29,32 +29,31 @@ import org.jboss.netty.handler.timeout.I
 import org.jboss.netty.util.Timer;
 
 /**
- * {@link IdleStateHandler} which will call {@link ImapSession#logout()} if the connected client did not receive or send any traffic in a given timeframe
+ * {@link IdleStateHandler} which will call {@link ImapSession#logout()} if the
+ * connected client did not receive or send any traffic in a given timeframe
+ * 
  * 
- *
  */
-public class ImapIdleStateHandler extends IdleStateHandler implements ChannelAttributeSupport{
+public class ImapIdleStateHandler extends IdleStateHandler implements ChannelAttributeSupport {
+
+    public ImapIdleStateHandler(Timer timer, long allIdleTime, TimeUnit unit) {
+        super(timer, 0, 0, allIdleTime, unit);
+    }
+
+    @Override
+    protected void channelIdle(ChannelHandlerContext ctx, IdleState state, long lastActivityTimeMillis) throws Exception {
+
+        // check if the client did nothing for too long
+        if (state.equals(IdleState.ALL_IDLE)) {
+            ImapSession session = (ImapSession) attributes.get(ctx.getChannel());
+            InetSocketAddress address = (InetSocketAddress) ctx.getChannel().getRemoteAddress();
+
+            session.getLog().info("Logout client " + address.getHostName() + " (" + address.getAddress().getHostAddress() + ") because it idled for too long...");
 
-	public ImapIdleStateHandler(Timer timer, long allIdleTime, TimeUnit unit) {
-		super(timer, 0, 0, allIdleTime, unit);
-	}
-
-	@Override
-	protected void channelIdle(ChannelHandlerContext ctx, IdleState state,
-			long lastActivityTimeMillis) throws Exception {
-		
-		// check if the client did nothing for too long
-		if (state.equals(IdleState.ALL_IDLE)) {
-	        ImapSession session = (ImapSession) attributes.get(ctx.getChannel());
-	        InetSocketAddress address = (InetSocketAddress) ctx.getChannel().getRemoteAddress();
-	        
-	       
-	        session.getLog().info("Logout client "+ address.getHostName() + " (" + address.getAddress().getHostAddress()+ ") because it idled for too long...");
-	        
-	        // logout the client
-	        session.logout();
+            // logout the client
+            session.logout();
 
-		}
-	}
+        }
+    }
 
 }



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