com.ericdaugherty.mail.server.services.smtp
Class SMTPSender

java.lang.Object
  extended by com.ericdaugherty.mail.server.services.smtp.SMTPSender
All Implemented Interfaces:
java.lang.Runnable
Direct Known Subclasses:
SMTPSenderAmavis, SMTPSenderStandard

public abstract class SMTPSender
extends java.lang.Object
implements java.lang.Runnable

This class (thread) is responsible for collectiong unsent messages and delivering them to the proper local address or remote smtp server.

There should be only one instance of this thread running in the system at any one time.

Author:
Eric Daugherty, Andreas Kyrmegalos (2.x branch)

Nested Class Summary
 class SMTPSender.Deliver
          This method takes a SMTPMessageImpl and attempts to deliver it.
 
Field Summary
protected  ConfigurationManager configurationManager
          The ConfigurationManager
protected static org.apache.commons.logging.Log log
          Logger
protected  boolean useAmavisSMTPDirectory
           
 
Method Summary
abstract  SMTPSender.Deliver getNewDeliverInstance()
           
 void notifyshutdown()
          Notifies this thread to to initiate shutdown.
 void run()
          The entrypoint for this thread.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected static final org.apache.commons.logging.Log log
Logger


configurationManager

protected final ConfigurationManager configurationManager
The ConfigurationManager


useAmavisSMTPDirectory

protected final boolean useAmavisSMTPDirectory
Method Detail

getNewDeliverInstance

public abstract SMTPSender.Deliver getNewDeliverInstance()

run

public void run()
The entrypoint for this thread. This method handles the lifecycle of this thread.

Specified by:
run in interface java.lang.Runnable

notifyshutdown

public void notifyshutdown()
Notifies this thread to to initiate shutdown.