org.mailster.server
Class MailsterSmtpService

java.lang.Object
  extended by org.mailster.server.MailsterSmtpService

public class MailsterSmtpService
extends java.lang.Object

---
Mailster (C) 2007-2009 De Oliveira Edouard

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.

See  Mailster Web Site
---

MailsterSmtpService.java - The SMTP service controller.

Version:
$Revision: 1.15 $, $Date: 2009/04/10 00:04:14 $
Author:
Edouard De Oliveira

Nested Class Summary
(package private)  class MailsterSmtpService.MailQueueControl
           
(package private)  class MailsterSmtpService.MailQueueObserver
           
 
Field Summary
private  boolean autoStart
           
static long DEFAULT_QUEUE_REFRESH_TIMEOUT
           
private  MailsterSWT main
           
private  MailsterPop3Service pop3Service
           
private  long queueRefreshtimeout
           
private  java.util.List<StoredSmtpMessage> receivedMessages
           
private  MailsterSMTPServer server
           
private  MailsterSmtpService.MailQueueControl updater
           
 
Constructor Summary
MailsterSmtpService()
           
 
Method Summary
 void addReceivedEmail(java.util.List<SmtpMessage> list)
           
 void addReceivedEmail(SmtpMessage msg)
           
 void addSMTPServerListener(SMTPServerListener listener)
           
 void clearQueue()
           
 java.lang.String getOutputDirectory()
           
 MailsterPop3Service getPop3Service()
           
 int getPort()
           
 long getQueueRefreshTimeout()
           
 boolean isAutoStart()
           
 boolean isStopped()
           
 void refreshEmailQueue(boolean syncExec)
           
 void removeSMTPServerListener(SMTPServerListener listener)
           
 void setAutoStart(boolean autoStart)
           
 void setConnectionTimeout(int timeout)
           
 void setHostName(java.lang.String hostName)
           
 void setPort(int port)
           
 void setQueueRefreshTimeout(long timeout)
          Set the timeout between queue refreshs in seconds.
 void shutdownServer(boolean force)
           
 void startServer(boolean debug)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_QUEUE_REFRESH_TIMEOUT

public static final long DEFAULT_QUEUE_REFRESH_TIMEOUT
See Also:
Constant Field Values

receivedMessages

private java.util.List<StoredSmtpMessage> receivedMessages

updater

private MailsterSmtpService.MailQueueControl updater

server

private MailsterSMTPServer server

queueRefreshtimeout

private long queueRefreshtimeout

autoStart

private boolean autoStart

pop3Service

private MailsterPop3Service pop3Service

main

private MailsterSWT main
Constructor Detail

MailsterSmtpService

public MailsterSmtpService()
Method Detail

addReceivedEmail

public void addReceivedEmail(java.util.List<SmtpMessage> list)

addReceivedEmail

public void addReceivedEmail(SmtpMessage msg)

addSMTPServerListener

public void addSMTPServerListener(SMTPServerListener listener)

removeSMTPServerListener

public void removeSMTPServerListener(SMTPServerListener listener)

refreshEmailQueue

public void refreshEmailQueue(boolean syncExec)

clearQueue

public void clearQueue()

startServer

public void startServer(boolean debug)

shutdownServer

public void shutdownServer(boolean force)

isStopped

public boolean isStopped()

setQueueRefreshTimeout

public void setQueueRefreshTimeout(long timeout)
Set the timeout between queue refreshs in seconds.

Parameters:
timeout - the new timeout in seconds

getQueueRefreshTimeout

public long getQueueRefreshTimeout()

getOutputDirectory

public java.lang.String getOutputDirectory()

setAutoStart

public void setAutoStart(boolean autoStart)

isAutoStart

public boolean isAutoStart()

getPop3Service

public MailsterPop3Service getPop3Service()

setHostName

public void setHostName(java.lang.String hostName)

getPort

public int getPort()

setPort

public void setPort(int port)

setConnectionTimeout

public void setConnectionTimeout(int timeout)