Author: norman Date: Tue Dec 20 14:59:43 2011 New Revision: 1221300 URL: http://svn.apache.org/viewvc?rev=1221300&view=rev Log: rename classes and remove the LMTP prefix.
Added: james/protocols/trunk/lmtp/src/main/java/org/apache/james/protocols/lmtp/core/DataLineMessageHookHandler.java (contents, props changed) - copied, changed from r1221287, james/protocols/trunk/lmtp/src/main/java/org/apache/james/protocols/lmtp/core/LMTPDataLineMessageHookHandler.java james/protocols/trunk/lmtp/src/main/java/org/apache/james/protocols/lmtp/core/ReceivedDataLineFilter.java - copied, changed from r1221287, james/protocols/trunk/lmtp/src/main/java/org/apache/james/protocols/lmtp/core/LMTPReceivedDataLineFilter.java james/protocols/trunk/lmtp/src/main/java/org/apache/james/protocols/lmtp/core/WelcomeMessageHandler.java Removed: james/protocols/trunk/lmtp/src/main/java/org/apache/james/protocols/lmtp/core/LMTPDataLineMessageHookHandler.java james/protocols/trunk/lmtp/src/main/java/org/apache/james/protocols/lmtp/core/LMTPReceivedDataLineFilter.java Modified: james/protocols/trunk/lmtp/src/main/java/org/apache/james/protocols/lmtp/LMTPProtocolHandlerChain.java james/protocols/trunk/smtp/src/main/java/org/apache/james/protocols/smtp/core/WelcomeMessageHandler.java Modified: james/protocols/trunk/lmtp/src/main/java/org/apache/james/protocols/lmtp/LMTPProtocolHandlerChain.java URL: http://svn.apache.org/viewvc/james/protocols/trunk/lmtp/src/main/java/org/apache/james/protocols/lmtp/LMTPProtocolHandlerChain.java?rev=1221300&r1=1221299&r2=1221300&view=diff ============================================================================== --- james/protocols/trunk/lmtp/src/main/java/org/apache/james/protocols/lmtp/LMTPProtocolHandlerChain.java (original) +++ james/protocols/trunk/lmtp/src/main/java/org/apache/james/protocols/lmtp/LMTPProtocolHandlerChain.java Tue Dec 20 14:59:43 2011 @@ -23,9 +23,10 @@ import java.util.List; import org.apache.james.protocols.api.handler.ProtocolHandler; import org.apache.james.protocols.api.handler.WiringException; -import org.apache.james.protocols.lmtp.core.LMTPDataLineMessageHookHandler; -import org.apache.james.protocols.lmtp.core.LMTPReceivedDataLineFilter; +import org.apache.james.protocols.lmtp.core.DataLineMessageHookHandler; +import org.apache.james.protocols.lmtp.core.ReceivedDataLineFilter; import org.apache.james.protocols.lmtp.core.LhloCmdHandler; +import org.apache.james.protocols.lmtp.core.WelcomeMessageHandler; import org.apache.james.protocols.smtp.SMTPProtocolHandlerChain; import org.apache.james.protocols.smtp.core.DataCmdHandler; import org.apache.james.protocols.smtp.core.ExpnCmdHandler; @@ -37,7 +38,6 @@ import org.apache.james.protocols.smtp.c import org.apache.james.protocols.smtp.core.RsetCmdHandler; import org.apache.james.protocols.smtp.core.SMTPCommandDispatcherLineHandler; import org.apache.james.protocols.smtp.core.VrfyCmdHandler; -import org.apache.james.protocols.smtp.core.WelcomeMessageHandler; import org.apache.james.protocols.smtp.core.esmtp.MailSizeEsmtpExtension; import org.apache.james.protocols.smtp.core.esmtp.StartTlsCmdHandler; import org.apache.james.protocols.smtp.hook.Hook; @@ -77,8 +77,8 @@ public class LMTPProtocolHandlerChain ex defaultHandlers.add(new DataCmdHandler()); defaultHandlers.add(new MailSizeEsmtpExtension()); defaultHandlers.add(new WelcomeMessageHandler()); - defaultHandlers.add(new LMTPReceivedDataLineFilter()); - defaultHandlers.add(new LMTPDataLineMessageHookHandler()); + defaultHandlers.add(new ReceivedDataLineFilter()); + defaultHandlers.add(new DataLineMessageHookHandler()); defaultHandlers.add(new StartTlsCmdHandler()); return defaultHandlers; } Copied: james/protocols/trunk/lmtp/src/main/java/org/apache/james/protocols/lmtp/core/DataLineMessageHookHandler.java (from r1221287, james/protocols/trunk/lmtp/src/main/java/org/apache/james/protocols/lmtp/core/LMTPDataLineMessageHookHandler.java) URL: http://svn.apache.org/viewvc/james/protocols/trunk/lmtp/src/main/java/org/apache/james/protocols/lmtp/core/DataLineMessageHookHandler.java?p2=james/protocols/trunk/lmtp/src/main/java/org/apache/james/protocols/lmtp/core/DataLineMessageHookHandler.java&p1=james/protocols/trunk/lmtp/src/main/java/org/apache/james/protocols/lmtp/core/LMTPDataLineMessageHookHandler.java&r1=1221287&r2=1221300&rev=1221300&view=diff ============================================================================== --- james/protocols/trunk/lmtp/src/main/java/org/apache/james/protocols/lmtp/core/LMTPDataLineMessageHookHandler.java (original) +++ james/protocols/trunk/lmtp/src/main/java/org/apache/james/protocols/lmtp/core/DataLineMessageHookHandler.java Tue Dec 20 14:59:43 2011 @@ -33,10 +33,9 @@ import org.apache.james.protocols.smtp.S import org.apache.james.protocols.smtp.SMTPRetCode; import org.apache.james.protocols.smtp.SMTPSession; import org.apache.james.protocols.smtp.core.AbstractHookableCmdHandler; -import org.apache.james.protocols.smtp.core.DataLineMessageHookHandler; import org.apache.james.protocols.smtp.dsn.DSNStatus; -public class LMTPDataLineMessageHookHandler extends DataLineMessageHookHandler{ +public class DataLineMessageHookHandler extends org.apache.james.protocols.smtp.core.DataLineMessageHookHandler{ private final List<DeliverToRecipientHook> handlers = new ArrayList<DeliverToRecipientHook>(); Propchange: james/protocols/trunk/lmtp/src/main/java/org/apache/james/protocols/lmtp/core/DataLineMessageHookHandler.java ------------------------------------------------------------------------------ svn:mime-type = text/plain Copied: james/protocols/trunk/lmtp/src/main/java/org/apache/james/protocols/lmtp/core/ReceivedDataLineFilter.java (from r1221287, james/protocols/trunk/lmtp/src/main/java/org/apache/james/protocols/lmtp/core/LMTPReceivedDataLineFilter.java) URL: http://svn.apache.org/viewvc/james/protocols/trunk/lmtp/src/main/java/org/apache/james/protocols/lmtp/core/ReceivedDataLineFilter.java?p2=james/protocols/trunk/lmtp/src/main/java/org/apache/james/protocols/lmtp/core/ReceivedDataLineFilter.java&p1=james/protocols/trunk/lmtp/src/main/java/org/apache/james/protocols/lmtp/core/LMTPReceivedDataLineFilter.java&r1=1221287&r2=1221300&rev=1221300&view=diff ============================================================================== --- james/protocols/trunk/lmtp/src/main/java/org/apache/james/protocols/lmtp/core/LMTPReceivedDataLineFilter.java (original) +++ james/protocols/trunk/lmtp/src/main/java/org/apache/james/protocols/lmtp/core/ReceivedDataLineFilter.java Tue Dec 20 14:59:43 2011 @@ -19,9 +19,8 @@ package org.apache.james.protocols.lmtp.core; import org.apache.james.protocols.smtp.SMTPSession; -import org.apache.james.protocols.smtp.core.ReceivedDataLineFilter; -public class LMTPReceivedDataLineFilter extends ReceivedDataLineFilter { +public class ReceivedDataLineFilter extends org.apache.james.protocols.smtp.core.ReceivedDataLineFilter { private static final String SERVICE_TYPE = "LMTP"; /** Added: james/protocols/trunk/lmtp/src/main/java/org/apache/james/protocols/lmtp/core/WelcomeMessageHandler.java URL: http://svn.apache.org/viewvc/james/protocols/trunk/lmtp/src/main/java/org/apache/james/protocols/lmtp/core/WelcomeMessageHandler.java?rev=1221300&view=auto ============================================================================== --- james/protocols/trunk/lmtp/src/main/java/org/apache/james/protocols/lmtp/core/WelcomeMessageHandler.java (added) +++ james/protocols/trunk/lmtp/src/main/java/org/apache/james/protocols/lmtp/core/WelcomeMessageHandler.java Tue Dec 20 14:59:43 2011 @@ -0,0 +1,31 @@ +/**************************************************************** + * 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.protocols.lmtp.core; + +import org.apache.james.protocols.smtp.SMTPSession; + +public class WelcomeMessageHandler extends org.apache.james.protocols.smtp.core.WelcomeMessageHandler { + + private final static String SERVICE_TYPE = "LMTP"; + + protected String getServiceType(SMTPSession session) { + return SERVICE_TYPE; + } +} Modified: james/protocols/trunk/smtp/src/main/java/org/apache/james/protocols/smtp/core/WelcomeMessageHandler.java URL: http://svn.apache.org/viewvc/james/protocols/trunk/smtp/src/main/java/org/apache/james/protocols/smtp/core/WelcomeMessageHandler.java?rev=1221300&r1=1221299&r2=1221300&view=diff ============================================================================== --- james/protocols/trunk/smtp/src/main/java/org/apache/james/protocols/smtp/core/WelcomeMessageHandler.java (original) +++ james/protocols/trunk/smtp/src/main/java/org/apache/james/protocols/smtp/core/WelcomeMessageHandler.java Tue Dec 20 14:59:43 2011 @@ -31,6 +31,8 @@ import org.apache.james.protocols.smtp.S */ public class WelcomeMessageHandler implements ConnectHandler<SMTPSession> { + private final static String SERVICE_TYPE = "SMTP"; + /** * @see org.apache.james.protocols.api.handler.ConnectHandler#onConnect(org.apache.james.protocols.api.ProtocolSession) */ @@ -44,7 +46,7 @@ public class WelcomeMessageHandler imple welcomeResponse = new SMTPResponse(SMTPRetCode.SERVICE_READY, new StringBuilder(256) .append(session.getConfiguration().getHelloName()) - .append(" SMTP Server (") + .append(" ").append(getServiceType(session)).append(" Server (") .append(session.getConfiguration().getSoftwareName()) .append(") ready")); } else { @@ -53,4 +55,7 @@ public class WelcomeMessageHandler imple return welcomeResponse; } + protected String getServiceType(SMTPSession session) { + return SERVICE_TYPE; + } } --------------------------------------------------------------------- To unsubscribe, e-mail: server-dev-unsubscr...@james.apache.org For additional commands, e-mail: server-dev-h...@james.apache.org