org.apache.james.smtpserver
Class SMTPHandler

java.lang.Object
  |
  +--org.apache.avalon.framework.logger.AbstractLogEnabled
        |
        +--org.apache.james.BaseConnectionHandler
              |
              +--org.apache.james.smtpserver.SMTPHandler
All Implemented Interfaces:
org.apache.avalon.framework.component.Component, org.apache.avalon.framework.component.Composable, org.apache.avalon.framework.configuration.Configurable, org.apache.avalon.cornerstone.services.connection.ConnectionHandler, org.apache.avalon.framework.logger.LogEnabled, org.apache.avalon.cornerstone.services.scheduler.Target

public class SMTPHandler
extends BaseConnectionHandler
implements org.apache.avalon.cornerstone.services.connection.ConnectionHandler, org.apache.avalon.framework.component.Composable, org.apache.avalon.framework.configuration.Configurable, org.apache.avalon.cornerstone.services.scheduler.Target

This handles an individual incoming message. It handles regular SMTP commands, and when it receives a message, adds it to the spool.

Author:
Serge Knystautas
, Federico Barbieri , Jason Borden , Matthew Pangaro , Danny Angus This is $Revision: 1.17 $ Committed on $Date: 2002/04/17 03:19:32 $ by: $Author: serge $

Field Summary
static java.lang.String AUTH
           
static java.lang.String CURRENT_HELO_MODE
           
static java.lang.String MESG_FAILED
           
static java.lang.String MESG_SIZE
           
static java.lang.String NAME_GIVEN
           
static java.lang.String RCPT_VECTOR
           
static java.lang.String REMOTE_IP
           
static java.lang.String REMOTE_NAME
           
static java.lang.String SENDER
           
static java.lang.String SERVER_NAME
           
static java.lang.String SERVER_TYPE
           
static java.lang.String SMTP_ID
           
static char[] SMTPTerminator
           
 
Fields inherited from class org.apache.james.BaseConnectionHandler
helloName, timeout
 
Constructor Summary
SMTPHandler()
           
 
Method Summary
 void compose(org.apache.avalon.framework.component.ComponentManager componentManager)
           
 void configure(org.apache.avalon.framework.configuration.Configuration configuration)
           
 void handleConnection(java.net.Socket connection)
          Handle a connection.
 void targetTriggered(java.lang.String triggerName)
           
 
Methods inherited from class org.apache.james.BaseConnectionHandler
releaseConnectionHandler
 
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SERVER_NAME

public static final java.lang.String SERVER_NAME
See Also:
Constant Field Values

SERVER_TYPE

public static final java.lang.String SERVER_TYPE
See Also:
Constant Field Values

REMOTE_NAME

public static final java.lang.String REMOTE_NAME
See Also:
Constant Field Values

REMOTE_IP

public static final java.lang.String REMOTE_IP
See Also:
Constant Field Values

NAME_GIVEN

public static final java.lang.String NAME_GIVEN
See Also:
Constant Field Values

CURRENT_HELO_MODE

public static final java.lang.String CURRENT_HELO_MODE
See Also:
Constant Field Values

SENDER

public static final java.lang.String SENDER
See Also:
Constant Field Values

MESG_FAILED

public static final java.lang.String MESG_FAILED
See Also:
Constant Field Values

MESG_SIZE

public static final java.lang.String MESG_SIZE
See Also:
Constant Field Values

RCPT_VECTOR

public static final java.lang.String RCPT_VECTOR
See Also:
Constant Field Values

SMTP_ID

public static final java.lang.String SMTP_ID
See Also:
Constant Field Values

AUTH

public static final java.lang.String AUTH
See Also:
Constant Field Values

SMTPTerminator

public static final char[] SMTPTerminator
Constructor Detail

SMTPHandler

public SMTPHandler()
Method Detail

configure

public void configure(org.apache.avalon.framework.configuration.Configuration configuration)
               throws org.apache.avalon.framework.configuration.ConfigurationException
Specified by:
configure in interface org.apache.avalon.framework.configuration.Configurable
Overrides:
configure in class BaseConnectionHandler
org.apache.avalon.framework.configuration.ConfigurationException

compose

public void compose(org.apache.avalon.framework.component.ComponentManager componentManager)
             throws org.apache.avalon.framework.component.ComponentException
Specified by:
compose in interface org.apache.avalon.framework.component.Composable
org.apache.avalon.framework.component.ComponentException

handleConnection

public void handleConnection(java.net.Socket connection)
                      throws java.io.IOException
Handle a connection. This handler is responsible for processing connections as they occur.

Specified by:
handleConnection in interface org.apache.avalon.cornerstone.services.connection.ConnectionHandler
Parameters:
connection - the connection
Throws:
java.io.IOException - if an error reading from socket occurs
ProtocolException - if an error handling connection occurs

targetTriggered

public void targetTriggered(java.lang.String triggerName)
Specified by:
targetTriggered in interface org.apache.avalon.cornerstone.services.scheduler.Target


"Copyright © 2001 Apache Jakarta Project. All Rights Reserved."