org.apache.james.pop3server
Class POP3Server

java.lang.Object
  extended by org.apache.avalon.framework.logger.AbstractLogEnabled
      extended by org.apache.avalon.cornerstone.services.connection.AbstractHandlerFactory
          extended by org.apache.james.core.AbstractJamesService
              extended by org.apache.james.pop3server.POP3Server
All Implemented Interfaces:
org.apache.avalon.cornerstone.services.connection.ConnectionHandlerFactory, org.apache.avalon.framework.activity.Disposable, org.apache.avalon.framework.activity.Initializable, org.apache.avalon.framework.configuration.Configurable, org.apache.avalon.framework.context.Contextualizable, org.apache.avalon.framework.logger.LogEnabled, org.apache.avalon.framework.service.Serviceable, POP3ServerMBean

public class POP3Server
extends AbstractJamesService
implements POP3ServerMBean

Accepts POP3 connections on a server socket and dispatches them to POP3Handlers.

Also responsible for loading and parsing POP3 specific configuration.

Version:
1.0.0, 24/04/1999

Field Summary
 
Fields inherited from class org.apache.james.core.AbstractJamesService
backlog, BACKLOG_NAME, bindTo, connectionLimit, connectionName, DEFAULT_BACKLOG, DEFAULT_TIMEOUT, HELLO_NAME, helloName, port, serverSocket, serverSocketType, threadGroup, threadPool, timeout, TIMEOUT_NAME
 
Constructor Summary
POP3Server()
           
 
Method Summary
 void configure(org.apache.avalon.framework.configuration.Configuration configuration)
           
protected  int getDefaultPort()
          Get the default port for this server type.
 java.lang.String getServiceType()
          This method returns the type of service provided by this server.
 void initialize()
           
protected  org.apache.avalon.cornerstone.services.connection.ConnectionHandler newHandler()
          Overide this method to create actual instance of connection handler.
 void releaseConnectionHandler(org.apache.avalon.cornerstone.services.connection.ConnectionHandler connectionHandler)
           
 void service(org.apache.avalon.framework.service.ServiceManager componentManager)
           
 
Methods inherited from class org.apache.james.core.AbstractJamesService
dispose, getNetworkInterface, getPort, getSocketType, 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.james.pop3server.POP3ServerMBean
getNetworkInterface, getPort, getSocketType, isEnabled
 
Methods inherited from interface org.apache.avalon.cornerstone.services.connection.ConnectionHandlerFactory
createConnectionHandler
 

Constructor Detail

POP3Server

public POP3Server()
Method Detail

service

public void service(org.apache.avalon.framework.service.ServiceManager componentManager)
             throws org.apache.avalon.framework.service.ServiceException
Specified by:
service in interface org.apache.avalon.framework.service.Serviceable
Overrides:
service in class AbstractJamesService
Throws:
org.apache.avalon.framework.service.ServiceException
See Also:
org.apache.avalon.framework.service.Serviceable#compose(ServiceManager)

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 AbstractJamesService
Throws:
org.apache.avalon.framework.configuration.ConfigurationException
See Also:
Configurable.configure(Configuration)

initialize

public void initialize()
                throws java.lang.Exception
Specified by:
initialize in interface org.apache.avalon.framework.activity.Initializable
Overrides:
initialize in class AbstractJamesService
Throws:
java.lang.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 java.lang.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 org.apache.avalon.cornerstone.services.connection.ConnectionHandler newHandler()
                                                                                  throws java.lang.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:
java.lang.Exception - if an error occurs
See Also:
AbstractHandlerFactory.newHandler()

releaseConnectionHandler

public void releaseConnectionHandler(org.apache.avalon.cornerstone.services.connection.ConnectionHandler connectionHandler)
Specified by:
releaseConnectionHandler in interface org.apache.avalon.cornerstone.services.connection.ConnectionHandlerFactory
Overrides:
releaseConnectionHandler in class org.apache.avalon.cornerstone.services.connection.AbstractHandlerFactory
See Also:
ConnectionHandlerFactory.releaseConnectionHandler(ConnectionHandler)


Copyright ? 2002-2009 The Apache Software Foundation. All Rights Reserved.