votorola.a.mail
Class MailResponder.ConfigurationContext

java.lang.Object
  extended by MailResponder.ConfigurationContext
Enclosing class:
MailResponder

@ThreadSafe
public static final class MailResponder.ConfigurationContext
extends Object

A context for configuring the mail responder daemon. The daemon is configured by the responder's configuration file, which contains a script (s) for that purpose. During construction of the daemon, an instance of this context (daemonCC) is passed to s, via s::configureMailRD(daemonCC).


Method Summary
(package private) static MailResponder.ConfigurationContext configure(ElectoralSubserver subserver, JavaScriptIncluder s)
          Constructs the complete configuration of the responder daemon.
 int getInboxPollSleepSeconds()
          Returns the delay prior to each poll of the inbox for new messages.
 String getInboxStoreURLName()
           
 boolean isDryRun()
           
 void setDryRun(boolean newDryRun)
          Sets whether the daemon is to run without making any persistent state changes.
 void setInboxPollSleepSeconds(int inboxPollSleepSeconds)
          Sets the delay prior to each poll of the inbox.
 void setInboxStoreURLName(String inboxStoreURLName)
          Sets the protocol and location of the inbox.
 SMTPTransportX.ConfigurationContext transferService()
          The context for configuring access to the mail transfer server, through which outgoing messages (such as replies to voters) are sent.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

configure

static MailResponder.ConfigurationContext configure(ElectoralSubserver subserver,
                                                    JavaScriptIncluder s)
                                             throws ScriptException
Constructs the complete configuration of the responder daemon.

Parameters:
s - the compiled configuration script
Throws:
ScriptException

getInboxPollSleepSeconds

public int getInboxPollSleepSeconds()
Returns the delay prior to each poll of the inbox for new messages. If the inbox gets busy, then this value is ignored and messages are read without delay.

See Also:
setInboxPollSleepSeconds(int)

setInboxPollSleepSeconds

@ThreadRestricted(value="constructor")
public void setInboxPollSleepSeconds(int inboxPollSleepSeconds)
Sets the delay prior to each poll of the inbox. The default value is 20 seconds.

See Also:
getInboxPollSleepSeconds()

getInboxStoreURLName

public String getInboxStoreURLName()
See Also:
MailResponder.inboxStoreURLName(), setInboxStoreURLName(String)

setInboxStoreURLName

@ThreadRestricted(value="constructor")
public void setInboxStoreURLName(String inboxStoreURLName)
Sets the protocol and location of the inbox. The default value is "maildir:/home/subserver-name/Maildir".

See Also:
MailResponder.inboxStoreURLName()

isDryRun

public final boolean isDryRun()
See Also:
MailResponder.isDryRun(), setDryRun(boolean)

setDryRun

public final void setDryRun(boolean newDryRun)
Sets whether the daemon is to run without making any persistent state changes.

See Also:
MailResponder.isDryRun()

transferService

public SMTPTransportX.ConfigurationContext transferService()
The context for configuring access to the mail transfer server, through which outgoing messages (such as replies to voters) are sent.