org.apache.james.smtpserver
Class SMTPServer

java.lang.Object
  |
  +--org.apache.avalon.framework.logger.AbstractLogEnabled
        |
        +--org.apache.avalon.cornerstone.services.connection.AbstractHandlerFactory
              |
              +--org.apache.james.core.AbstractJamesService
                    |
                    +--org.apache.james.smtpserver.SMTPServer
All Implemented Interfaces:
Component, Composable, Configurable, ConnectionHandlerFactory, Contextualizable, Disposable, Initializable, LogEnabled

public class SMTPServer
extends AbstractJamesService
implements Component

Accepts SMTP connections on a server socket and dispatches them to SMTPHandlers.

Also responsible for loading and parsing SMTP specific configuration.

Version:
1.1.0, 06/02/2001
Author:
Federico Barbieri , Matthew Pangaro , Peter Donald, Danny Angus, Peter M. Goldstein

Field Summary
 
Fields inherited from class org.apache.james.core.AbstractJamesService
bindTo, connectionLimit, connectionName, DEFAULT_TIMEOUT, HELLO_NAME, helloName, port, serverSocket, serverSocketType, threadGroup, threadPool, timeout, TIMEOUT_NAME
 
Fields inherited from class org.apache.avalon.cornerstone.services.connection.AbstractHandlerFactory
m_componentManager, m_configuration, m_context
 
Constructor Summary
SMTPServer()
           
 
Method Summary
 void compose(ComponentManager componentManager)
           
 void configure(Configuration configuration)
           
protected  int getDefaultPort()
          Get the default port for this server type.
 String getServiceType()
          This method returns the type of service provided by this server.
 void initialize()
           
protected  ConnectionHandler newHandler()
          Overide this method to create actual instance of connection handler.
 void releaseConnectionHandler(ConnectionHandler connectionHandler)
           
 
Methods inherited from class org.apache.james.core.AbstractJamesService
dispose, getWatchdogFactory, isDefaultTLSEnabled, isEnabled
 
Methods inherited from class org.apache.avalon.cornerstone.services.connection.AbstractHandlerFactory
contextualize, createConnectionHandler
 
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
 
Methods inherited from interface org.apache.avalon.cornerstone.services.connection.ConnectionHandlerFactory
createConnectionHandler
 

Constructor Detail

SMTPServer

public SMTPServer()
Method Detail

compose

public void compose(ComponentManager componentManager)
             throws ComponentException
Specified by:
compose in interface Composable
Overrides:
compose in class AbstractJamesService
ComponentException
See Also:
Composable.compose(ComponentManager)

configure

public void configure(Configuration configuration)
               throws ConfigurationException
Specified by:
configure in interface Configurable
Overrides:
configure in class AbstractJamesService
ConfigurationException
See Also:
Configurable.configure(Configuration)

initialize

public void initialize()
                throws Exception
Specified by:
initialize in interface Initializable
Overrides:
initialize in class AbstractJamesService
Exception
See Also:
Initializable.initialize()

getDefaultPort

protected int getDefaultPort()
Description copied from class: AbstractJamesService
Get the default port for this server type. It is strongly recommended that subclasses of this class override this method to specify the default port for their specific server type.

Overrides:
getDefaultPort in class AbstractJamesService
Returns:
the default port
See Also:
AbstractJamesService.getDefaultPort()

getServiceType

public String getServiceType()
Description copied from class: AbstractJamesService
This method returns the type of service provided by this server. This should be invariant over the life of the class. Subclasses may override this implementation. This implementation parses the complete class name and returns the undecorated class name.

Overrides:
getServiceType in class AbstractJamesService
Returns:
description of this server
See Also:
AbstractJamesService.getServiceType()

newHandler

protected ConnectionHandler newHandler()
                                throws Exception
Description copied from class: AbstractJamesService
Overide this method to create actual instance of connection handler.

Specified by:
newHandler in class AbstractJamesService
Returns:
the new ConnectionHandler
Throws:
Exception - if an error occurs
See Also:
AbstractHandlerFactory.newHandler()

releaseConnectionHandler

public void releaseConnectionHandler(ConnectionHandler connectionHandler)
Specified by:
releaseConnectionHandler in interface ConnectionHandlerFactory
See Also:
ConnectionHandlerFactory.releaseConnectionHandler(ConnectionHandler)


"Copyright © 1999-2002 Apache Jakarta Project. All Rights Reserved."