org.apache.james.protocols.smtp.core
Class DataCmdHandler

java.lang.Object
  extended by org.apache.james.protocols.smtp.core.DataCmdHandler
All Implemented Interfaces:
CommandHandler<SMTPSession>, ExtensibleHandler, ProtocolHandler

public class DataCmdHandler
extends Object
implements CommandHandler<SMTPSession>, ExtensibleHandler

handles DATA command


Nested Class Summary
static class DataCmdHandler.DataConsumerLineHandler
           
static class DataCmdHandler.DataLineFilterWrapper
           
 
Field Summary
static String MAILENV
           
 
Constructor Summary
DataCmdHandler()
           
 
Method Summary
protected  MailEnvelope createEnvelope(SMTPSession session, org.apache.mailet.MailAddress sender, List<org.apache.mailet.MailAddress> recipients)
           
protected  SMTPResponse doDATA(SMTPSession session, String argument)
          Handler method called upon receipt of a DATA command.
protected  SMTPResponse doDATAFilter(SMTPSession session, String argument)
           
 Collection<String> getImplCommands()
           
protected  LineHandler<SMTPSession> getLineHandler()
           
 List getMarkerInterfaces()
           
 Response onCommand(SMTPSession session, Request request)
          process DATA command
 void wireExtensions(Class interfaceName, List extension)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MAILENV

public static final String MAILENV
See Also:
Constant Field Values
Constructor Detail

DataCmdHandler

public DataCmdHandler()
Method Detail

onCommand

public Response onCommand(SMTPSession session,
                          Request request)
process DATA command

Specified by:
onCommand in interface CommandHandler<SMTPSession>

doDATA

protected SMTPResponse doDATA(SMTPSession session,
                              String argument)
Handler method called upon receipt of a DATA command. Reads in message data, creates header, and delivers to mail server service for delivery.

Parameters:
session - SMTP session object
argument - the argument passed in with the command by the SMTP client

createEnvelope

protected MailEnvelope createEnvelope(SMTPSession session,
                                      org.apache.mailet.MailAddress sender,
                                      List<org.apache.mailet.MailAddress> recipients)

getImplCommands

public Collection<String> getImplCommands()
Specified by:
getImplCommands in interface CommandHandler<SMTPSession>
See Also:
CommandHandler.getImplCommands()

getMarkerInterfaces

public List getMarkerInterfaces()
Specified by:
getMarkerInterfaces in interface ExtensibleHandler
See Also:
ExtensibleHandler.getMarkerInterfaces()

wireExtensions

public void wireExtensions(Class interfaceName,
                           List extension)
                    throws WiringException
Specified by:
wireExtensions in interface ExtensibleHandler
Throws:
WiringException
See Also:
ExtensibleHandler.wireExtensions(java.lang.Class, java.util.List)

doDATAFilter

protected SMTPResponse doDATAFilter(SMTPSession session,
                                    String argument)

getLineHandler

protected LineHandler<SMTPSession> getLineHandler()


Copyright © 2010-2011 The Apache Software Foundation. All Rights Reserved.