james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nor...@apache.org
Subject svn commit: r930703 - in /james/server/trunk: mina-socket/src/main/java/org/apache/james/socket/ mina-socket/src/main/java/org/apache/james/socket/mina/ mina-socket/src/main/java/org/apache/james/socket/mina/filter/ pop3server/src/main/java/org/apache/...
Date Sun, 04 Apr 2010 15:34:50 GMT
Author: norman
Date: Sun Apr  4 15:34:49 2010
New Revision: 930703

URL: http://svn.apache.org/viewvc?rev=930703&view=rev
Log:
Allow to write InputStreams back to the client. This allows us to transfer big chunk of data
to the client without loading it into the memory (JAMES-987)

Added:
    james/server/trunk/mina-socket/src/main/java/org/apache/james/socket/DisposableFileInputStream.java
    james/server/trunk/mina-socket/src/main/java/org/apache/james/socket/DisposeOnCloseInputStream.java
    james/server/trunk/mina-socket/src/main/java/org/apache/james/socket/MessageStream.java
Removed:
    james/server/trunk/mina-socket/src/main/java/org/apache/james/socket/mina/filter/ResponseValidationFilter.java
Modified:
    james/server/trunk/mina-socket/src/main/java/org/apache/james/socket/mina/AbstractAsyncServer.java
    james/server/trunk/mina-socket/src/main/java/org/apache/james/socket/mina/AbstractIoHandler.java
    james/server/trunk/mina-socket/src/main/java/org/apache/james/socket/mina/AbstractMINASession.java
    james/server/trunk/pop3server/src/main/java/org/apache/james/pop3server/core/RetrCmdHandler.java
    james/server/trunk/pop3server/src/main/java/org/apache/james/pop3server/core/TopCmdHandler.java
    james/server/trunk/pop3server/src/main/java/org/apache/james/pop3server/mina/AsyncPOP3Server.java
    james/server/trunk/remotemanager/src/main/java/org/apache/james/remotemanager/mina/AsyncRemoteManager.java
    james/server/trunk/remotemanager/src/main/java/org/apache/james/remotemanager/mina/RemoteManagerSessionImpl.java
    james/server/trunk/smtpserver/src/main/java/org/apache/james/smtpserver/mina/AsyncSMTPServer.java

Added: james/server/trunk/mina-socket/src/main/java/org/apache/james/socket/DisposableFileInputStream.java
URL: http://svn.apache.org/viewvc/james/server/trunk/mina-socket/src/main/java/org/apache/james/socket/DisposableFileInputStream.java?rev=930703&view=auto
==============================================================================
--- james/server/trunk/mina-socket/src/main/java/org/apache/james/socket/DisposableFileInputStream.java
(added)
+++ james/server/trunk/mina-socket/src/main/java/org/apache/james/socket/DisposableFileInputStream.java
Sun Apr  4 15:34:49 2010
@@ -0,0 +1,50 @@
+/****************************************************************
+ * 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.james.socket;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+
+import org.apache.james.lifecycle.Disposable;
+
+/**
+ * {@link FileInputStream} which offers a method to dispose the underlying {@link File}
+ * 
+ *
+ */
+public class DisposableFileInputStream extends FileInputStream implements Disposable{
+
+    private File file;
+
+    public DisposableFileInputStream(File file) throws FileNotFoundException {
+        super(file);
+        this.file = file;
+    }
+
+    /**
+     * Dispose file
+     */
+    public void dispose() {
+        file.delete();
+    }
+    
+
+}

Added: james/server/trunk/mina-socket/src/main/java/org/apache/james/socket/DisposeOnCloseInputStream.java
URL: http://svn.apache.org/viewvc/james/server/trunk/mina-socket/src/main/java/org/apache/james/socket/DisposeOnCloseInputStream.java?rev=930703&view=auto
==============================================================================
--- james/server/trunk/mina-socket/src/main/java/org/apache/james/socket/DisposeOnCloseInputStream.java
(added)
+++ james/server/trunk/mina-socket/src/main/java/org/apache/james/socket/DisposeOnCloseInputStream.java
Sun Apr  4 15:34:49 2010
@@ -0,0 +1,48 @@
+/****************************************************************
+ * 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.james.socket;
+
+import java.io.FilterInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+
+import org.apache.james.lifecycle.LifecycleUtil;
+/**
+ * {@link FilterInputStream} which dispose wrapped {@link InputStream} after close is called
+ * 
+ *
+ */
+public class DisposeOnCloseInputStream extends FilterInputStream{
+
+    protected DisposeOnCloseInputStream(InputStream in) {
+        super(in);
+    }
+
+    /**
+     * Close the wrapped {@link InputStream} and dispose it
+     * 
+     */
+    public void close() throws IOException {
+        super.close();
+        LifecycleUtil.dispose(in);
+    }
+
+    
+}

Added: james/server/trunk/mina-socket/src/main/java/org/apache/james/socket/MessageStream.java
URL: http://svn.apache.org/viewvc/james/server/trunk/mina-socket/src/main/java/org/apache/james/socket/MessageStream.java?rev=930703&view=auto
==============================================================================
--- james/server/trunk/mina-socket/src/main/java/org/apache/james/socket/MessageStream.java
(added)
+++ james/server/trunk/mina-socket/src/main/java/org/apache/james/socket/MessageStream.java
Sun Apr  4 15:34:49 2010
@@ -0,0 +1,64 @@
+/****************************************************************
+ * 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.james.socket;
+
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.OutputStream;
+
+/**
+ * Helper class to write to temporary file for transfer data. This is mostly useful for writing
+ * large chunk of data back the the client. This Object is designed for one time use..
+ * 
+ *
+ */
+public class MessageStream {
+    private File file;
+
+    /**
+     * Create new MessageStream on a temporary File
+     * 
+     * @throws IOException 
+     */
+    public MessageStream() throws IOException {
+        this.file = File.createTempFile("messagestream", ".ms");
+    }
+
+    /**
+     * Return the {@link OutputStream} of the temporary file
+     * 
+     * @return out
+     * @throws IOException
+     */
+    public OutputStream getOutputStream() throws IOException {
+        return new FileOutputStream(file);
+    }
+    
+    /**
+     * Return the {@link DisposeOnCloseInputStream} of the temporary file
+     * 
+     * @return in
+     * @throws IOException
+     */
+    public DisposeOnCloseInputStream getInputStream() throws IOException {
+        return new DisposeOnCloseInputStream(new DisposableFileInputStream(file));
+    }
+}

Modified: james/server/trunk/mina-socket/src/main/java/org/apache/james/socket/mina/AbstractAsyncServer.java
URL: http://svn.apache.org/viewvc/james/server/trunk/mina-socket/src/main/java/org/apache/james/socket/mina/AbstractAsyncServer.java?rev=930703&r1=930702&r2=930703&view=diff
==============================================================================
--- james/server/trunk/mina-socket/src/main/java/org/apache/james/socket/mina/AbstractAsyncServer.java
(original)
+++ james/server/trunk/mina-socket/src/main/java/org/apache/james/socket/mina/AbstractAsyncServer.java
Sun Apr  4 15:34:49 2010
@@ -45,6 +45,7 @@ import org.apache.mina.filter.ssl.BogusT
 import org.apache.mina.filter.ssl.KeyStoreFactory;
 import org.apache.mina.filter.ssl.SslContextFactory;
 import org.apache.mina.filter.ssl.SslFilter;
+import org.apache.mina.filter.stream.StreamWriteFilter;
 import org.apache.mina.transport.socket.SocketAcceptor;
 import org.apache.mina.transport.socket.nio.NioSocketAcceptor;
 
@@ -275,7 +276,7 @@ public abstract class AbstractAsyncServe
             // add connectionfilter in the first of the chain
             DefaultIoFilterChainBuilder builder = createIoFilterChainBuilder();
             builder.addFirst("connectionFilter", new ConnectionFilter(getLogger(), connectionLimit,
connPerIP));
-           
+            builder.addLast("streamFilter", new StreamWriteFilter());
             // add the sslfilter if needed
             if (isSSLSocket()) {
                 builder.addFirst( "sslFilter", new SslFilter(contextFactory.newInstance()));

Modified: james/server/trunk/mina-socket/src/main/java/org/apache/james/socket/mina/AbstractIoHandler.java
URL: http://svn.apache.org/viewvc/james/server/trunk/mina-socket/src/main/java/org/apache/james/socket/mina/AbstractIoHandler.java?rev=930703&r1=930702&r2=930703&view=diff
==============================================================================
--- james/server/trunk/mina-socket/src/main/java/org/apache/james/socket/mina/AbstractIoHandler.java
(original)
+++ james/server/trunk/mina-socket/src/main/java/org/apache/james/socket/mina/AbstractIoHandler.java
Sun Apr  4 15:34:49 2010
@@ -19,6 +19,7 @@
 
 package org.apache.james.socket.mina;
 
+import java.io.InputStream;
 import java.util.LinkedList;
 import java.util.List;
 
@@ -45,6 +46,17 @@ public abstract class AbstractIoHandler 
         this.chain = chain;
     }
 
+    
+    @Override
+    public final void messageSent(IoSession session, Object message) throws Exception {
+        if (message instanceof InputStream) {
+            // we need to close the Stream after message was sent
+            ((InputStream) message).close();
+        }
+        super.messageSent(session, message);
+    }
+
+
     /**
      * @see org.apache.mina.core.service.IoHandlerAdapter#messageReceived(org.apache.mina.core.session.IoSession,
java.lang.Object)
      */

Modified: james/server/trunk/mina-socket/src/main/java/org/apache/james/socket/mina/AbstractMINASession.java
URL: http://svn.apache.org/viewvc/james/server/trunk/mina-socket/src/main/java/org/apache/james/socket/mina/AbstractMINASession.java?rev=930703&r1=930702&r2=930703&view=diff
==============================================================================
--- james/server/trunk/mina-socket/src/main/java/org/apache/james/socket/mina/AbstractMINASession.java
(original)
+++ james/server/trunk/mina-socket/src/main/java/org/apache/james/socket/mina/AbstractMINASession.java
Sun Apr  4 15:34:49 2010
@@ -20,6 +20,7 @@
 package org.apache.james.socket.mina;
 
 import java.io.IOException;
+import java.io.InputStream;
 import java.net.InetSocketAddress;
 
 import javax.net.ssl.SSLContext;
@@ -139,4 +140,16 @@ public abstract class AbstractMINASessio
         }
     }
 
+    /*
+     * (non-Javadoc)
+     * @see org.apache.james.protocols.api.ProtocolSession#writeStream(java.io.InputStream)
+     */
+    public void writeStream(InputStream stream) {
+        if (getIoSession().isConnected()) {
+            getIoSession().write(stream);
+        }
+    }
+    
+    
+
 }

Modified: james/server/trunk/pop3server/src/main/java/org/apache/james/pop3server/core/RetrCmdHandler.java
URL: http://svn.apache.org/viewvc/james/server/trunk/pop3server/src/main/java/org/apache/james/pop3server/core/RetrCmdHandler.java?rev=930703&r1=930702&r2=930703&view=diff
==============================================================================
--- james/server/trunk/pop3server/src/main/java/org/apache/james/pop3server/core/RetrCmdHandler.java
(original)
+++ james/server/trunk/pop3server/src/main/java/org/apache/james/pop3server/core/RetrCmdHandler.java
Sun Apr  4 15:34:49 2010
@@ -21,6 +21,16 @@
 
 package org.apache.james.pop3server.core;
 
+import java.io.IOException;
+import java.io.OutputStream;
+import java.nio.channels.Channels;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.List;
+
+import javax.mail.MessagingException;
+
 import org.apache.james.imap.mailbox.MailboxSession;
 import org.apache.james.imap.mailbox.MessageRange;
 import org.apache.james.imap.mailbox.MessageResult;
@@ -31,20 +41,7 @@ import org.apache.james.pop3server.POP3S
 import org.apache.james.protocols.api.CommandHandler;
 import org.apache.james.protocols.api.Request;
 import org.apache.james.protocols.api.Response;
-import org.apache.mailet.Mail;
-
-import javax.mail.MessagingException;
-import javax.mail.internet.MimeMessage;
-
-import java.io.BufferedReader;
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.io.InputStreamReader;
-import java.nio.channels.Channels;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.List;
+import org.apache.james.socket.MessageStream;
 
 /**
   * Handles RETR command
@@ -78,20 +75,23 @@ public class RetrCmdHandler implements C
                 MailboxSession mailboxSession = (MailboxSession) session.getState().get(POP3Session.MAILBOX_SESSION);
             	Long uid = uidList.get(num -1);
                 if (deletedUidList.contains(uid) == false) {
-                	Iterator<MessageResult> results =  session.getUserMailbox().getMessages(MessageRange.one(uid),
new FetchGroupImpl(FetchGroup.FULL_CONTENT), mailboxSession);
-
-                    response = new POP3Response(POP3Response.OK_RESPONSE, "Message follows");
+                    Iterator<MessageResult> results =  session.getUserMailbox().getMessages(MessageRange.one(uid),
new FetchGroupImpl(FetchGroup.FULL_CONTENT), mailboxSession);
+                    MessageStream stream = new MessageStream();
+                    OutputStream out = stream.getOutputStream();
+                    out.write((POP3Response.OK_RESPONSE + " Message follows\r\n").getBytes());
+                    //response = new POP3Response(POP3Response.OK_RESPONSE, "Message follows");
                     try {
                     	MessageResult result = results.next();
-                    	ByteArrayOutputStream out = new ByteArrayOutputStream();
                     	result.getFullContent().writeTo(Channels.newChannel(out));
                     	
-                    	response.appendLine(new String(out.toByteArray()));
                     } finally {
-                    	response.appendLine(".");
+                        out.write((".\r\n").getBytes());
+                        out.flush();
                     }
                     
-                	return response;	
+                    session.writeStream(stream.getInputStream());
+                    
+                	return null;	
                 } else {
                     
                     StringBuilder responseBuffer =

Modified: james/server/trunk/pop3server/src/main/java/org/apache/james/pop3server/core/TopCmdHandler.java
URL: http://svn.apache.org/viewvc/james/server/trunk/pop3server/src/main/java/org/apache/james/pop3server/core/TopCmdHandler.java?rev=930703&r1=930702&r2=930703&view=diff
==============================================================================
--- james/server/trunk/pop3server/src/main/java/org/apache/james/pop3server/core/TopCmdHandler.java
(original)
+++ james/server/trunk/pop3server/src/main/java/org/apache/james/pop3server/core/TopCmdHandler.java
Sun Apr  4 15:34:49 2010
@@ -21,7 +21,6 @@
 
 package org.apache.james.pop3server.core;
 
-import java.io.ByteArrayOutputStream;
 import java.io.FilterOutputStream;
 import java.io.IOException;
 import java.io.OutputStream;
@@ -44,6 +43,7 @@ import org.apache.james.pop3server.POP3R
 import org.apache.james.pop3server.POP3Session;
 import org.apache.james.protocols.api.Request;
 import org.apache.james.protocols.api.Response;
+import org.apache.james.socket.MessageStream;
 
 /**
   * Handles TOP command
@@ -99,11 +99,13 @@ public class TopCmdHandler extends RetrC
                 	FetchGroupImpl fetchGroup = new FetchGroupImpl(FetchGroup.BODY_CONTENT);
                 	fetchGroup.or(FetchGroup.HEADERS);
                 	Iterator<MessageResult> results =  session.getUserMailbox().getMessages(MessageRange.one(uid),
fetchGroup, mailboxSession);
-
-                    response = new POP3Response(POP3Response.OK_RESPONSE, "Message follows");
+                	MessageStream stream = new MessageStream();
+                    OutputStream out = stream.getOutputStream();
+                    out.write((POP3Response.OK_RESPONSE + " Message follows\r\n").getBytes());
+                    //response = new POP3Response(POP3Response.OK_RESPONSE, "Message follows");
                     try {
                     	MessageResult result = results.next();
-                    	ByteArrayOutputStream out = new ByteArrayOutputStream();
+                    	
                     	WritableByteChannel outChannel = Channels.newChannel(out);
                     	
                     	// write headers
@@ -121,12 +123,13 @@ public class TopCmdHandler extends RetrC
                     	// write body
                     	result.getBody().writeTo(Channels.newChannel(new CountingBodyOutputStream(out,
lines)));
                     	
-                    	response.appendLine(new String(out.toByteArray()));
                     } finally {
-                    	response.appendLine(".");
+                        out.write((".\r\n").getBytes());
+                        out.flush();
                     }
+                    session.writeStream(stream.getInputStream());
                     
-                	return response;	
+                	return null;	
 
                 } else {
                     StringBuilder responseBuffer =

Modified: james/server/trunk/pop3server/src/main/java/org/apache/james/pop3server/mina/AsyncPOP3Server.java
URL: http://svn.apache.org/viewvc/james/server/trunk/pop3server/src/main/java/org/apache/james/pop3server/mina/AsyncPOP3Server.java?rev=930703&r1=930702&r2=930703&view=diff
==============================================================================
--- james/server/trunk/pop3server/src/main/java/org/apache/james/pop3server/mina/AsyncPOP3Server.java
(original)
+++ james/server/trunk/pop3server/src/main/java/org/apache/james/pop3server/mina/AsyncPOP3Server.java
Sun Apr  4 15:34:49 2010
@@ -23,12 +23,10 @@ package org.apache.james.pop3server.mina
 import org.apache.commons.configuration.ConfigurationException;
 import org.apache.commons.configuration.HierarchicalConfiguration;
 import org.apache.james.pop3server.POP3HandlerConfigurationData;
-import org.apache.james.pop3server.POP3Response;
 import org.apache.james.pop3server.POP3ServerMBean;
 import org.apache.james.pop3server.mina.filter.POP3ResponseFilter;
 import org.apache.james.protocols.api.ProtocolHandlerChain;
 import org.apache.james.socket.mina.AbstractAsyncServer;
-import org.apache.james.socket.mina.filter.ResponseValidationFilter;
 import org.apache.mina.core.filterchain.DefaultIoFilterChainBuilder;
 import org.apache.mina.core.service.IoHandler;
 
@@ -94,7 +92,6 @@ public class AsyncPOP3Server extends Abs
         
         // response and validation filter to the chain
         builder.addLast("pop3ResponseFilter", new POP3ResponseFilter());
-        builder.addLast("responseValidationFilter", new ResponseValidationFilter<POP3Response>(getLogger(),
POP3Response.class));
         return builder;
     }
 

Modified: james/server/trunk/remotemanager/src/main/java/org/apache/james/remotemanager/mina/AsyncRemoteManager.java
URL: http://svn.apache.org/viewvc/james/server/trunk/remotemanager/src/main/java/org/apache/james/remotemanager/mina/AsyncRemoteManager.java?rev=930703&r1=930702&r2=930703&view=diff
==============================================================================
--- james/server/trunk/remotemanager/src/main/java/org/apache/james/remotemanager/mina/AsyncRemoteManager.java
(original)
+++ james/server/trunk/remotemanager/src/main/java/org/apache/james/remotemanager/mina/AsyncRemoteManager.java
Sun Apr  4 15:34:49 2010
@@ -28,10 +28,8 @@ import org.apache.commons.configuration.
 import org.apache.james.protocols.api.ProtocolHandlerChain;
 import org.apache.james.remotemanager.RemoteManagerHandlerConfigurationData;
 import org.apache.james.remotemanager.RemoteManagerMBean;
-import org.apache.james.remotemanager.RemoteManagerResponse;
 import org.apache.james.remotemanager.mina.filter.RemoteManagerResponseFilter;
 import org.apache.james.socket.mina.AbstractAsyncServer;
-import org.apache.james.socket.mina.filter.ResponseValidationFilter;
 import org.apache.mina.core.filterchain.DefaultIoFilterChainBuilder;
 import org.apache.mina.core.service.IoHandler;
 
@@ -76,7 +74,6 @@ public class AsyncRemoteManager extends 
         
         // response and validation filter to the chain
         builder.addLast(RemoteManagerResponseFilter.NAME, new RemoteManagerResponseFilter());
-        builder.addLast("requestValidationFilter", new ResponseValidationFilter<RemoteManagerResponse>(getLogger(),RemoteManagerResponse.class));
         return builder;
     }
     

Modified: james/server/trunk/remotemanager/src/main/java/org/apache/james/remotemanager/mina/RemoteManagerSessionImpl.java
URL: http://svn.apache.org/viewvc/james/server/trunk/remotemanager/src/main/java/org/apache/james/remotemanager/mina/RemoteManagerSessionImpl.java?rev=930703&r1=930702&r2=930703&view=diff
==============================================================================
--- james/server/trunk/remotemanager/src/main/java/org/apache/james/remotemanager/mina/RemoteManagerSessionImpl.java
(original)
+++ james/server/trunk/remotemanager/src/main/java/org/apache/james/remotemanager/mina/RemoteManagerSessionImpl.java
Sun Apr  4 15:34:49 2010
@@ -19,6 +19,7 @@
 
 package org.apache.james.remotemanager.mina;
 
+import java.io.InputStream;
 import java.net.InetSocketAddress;
 import java.util.HashMap;
 import java.util.Map;
@@ -130,4 +131,14 @@ public class RemoteManagerSessionImpl im
             session.write(response);    
         }
     }
+
+    /*
+     * (non-Javadoc)
+     * @see org.apache.james.protocols.api.ProtocolSession#writeStream(java.io.InputStream)
+     */
+    public void writeStream(InputStream stream) {
+        if (session.isConnected()) {
+            session.write(stream);    
+        }
+    }
 }

Modified: james/server/trunk/smtpserver/src/main/java/org/apache/james/smtpserver/mina/AsyncSMTPServer.java
URL: http://svn.apache.org/viewvc/james/server/trunk/smtpserver/src/main/java/org/apache/james/smtpserver/mina/AsyncSMTPServer.java?rev=930703&r1=930702&r2=930703&view=diff
==============================================================================
--- james/server/trunk/smtpserver/src/main/java/org/apache/james/smtpserver/mina/AsyncSMTPServer.java
(original)
+++ james/server/trunk/smtpserver/src/main/java/org/apache/james/smtpserver/mina/AsyncSMTPServer.java
Sun Apr  4 15:34:49 2010
@@ -29,11 +29,9 @@ import org.apache.commons.configuration.
 import org.apache.james.api.dnsservice.util.NetMatcher;
 import org.apache.james.protocols.api.ProtocolHandlerChain;
 import org.apache.james.protocols.smtp.SMTPConfiguration;
-import org.apache.james.protocols.smtp.SMTPResponse;
 import org.apache.james.protocols.smtp.SMTPServerMBean;
 import org.apache.james.smtpserver.mina.filter.SMTPResponseFilter;
 import org.apache.james.socket.mina.AbstractAsyncServer;
-import org.apache.james.socket.mina.filter.ResponseValidationFilter;
 import org.apache.mina.core.filterchain.DefaultIoFilterChainBuilder;
 import org.apache.mina.core.service.IoHandler;
 
@@ -304,7 +302,6 @@ public class AsyncSMTPServer extends Abs
         
         // response and validation filter to the chain
         builder.addLast(SMTPResponseFilter.NAME, new SMTPResponseFilter());
-        builder.addLast("responseValidationFilter", new ResponseValidationFilter<SMTPResponse>(getLogger(),SMTPResponse.class));
         return builder;
     }
 



---------------------------------------------------------------------
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