votorola.a.mail
Class MailMetaService

java.lang.Object
  extended by ElectoralService
      extended by MailMetaService

@ThreadRestricted(value="holds lock()")
public final class MailMetaService
extends ElectoralService

The mail responder's electoral meta-service. It provides bootstrap instructions on accessing the electoral services, as well as general information about the subserver.

See Also:
../design.xht#meta-service, http://zelea.com/project/votorola/a/mail/guide.xht#meta-service

Nested Class Summary
static class MailMetaService.ConfigurationContext
          A context for configuring the mail responder's electoral meta-service.
 
Field Summary
 
Fields inherited from class ElectoralService
configurationContext, lock, name, serviceEmail, subserverRun
 
Constructor Summary
MailMetaService(ElectoralSubserver.Run subserverRun, MailMetaService.ConfigurationContext cc)
           
 
Method Summary
 File configurationFile()
          The configuration file for this meta-service.
 Exception help(String[] argv, CommandResponder.Session session)
          Responds to a help command on behalf of the nominal responder, per respond(argv,session).
(package private) static MailMetaService newMetaService(ElectoralSubserver.Run subserverRun, JavaScriptIncluder s)
          Constructs a MailMetaService.
 String serviceEmail()
          The email address that nominally identifies this meta-service.
 String summaryDescription()
          A brief description of this meta-service, same as the subserver's.
 String title()
          The title of this meta-service, which is the same as the subserver's title.
 
Methods inherited from class ElectoralService
dispatch, dispatch, ensureSchema, equals, helpA, helpB, helpC, init, lock, name, responderByClassName, responderForCommand, responders, subserverRun, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MailMetaService

public MailMetaService(ElectoralSubserver.Run subserverRun,
                       MailMetaService.ConfigurationContext cc)
                throws IOException,
                       ScriptException,
                       SQLException
Throws:
IOException
ScriptException
SQLException
Method Detail

newMetaService

@ThreadSafe
static MailMetaService newMetaService(ElectoralSubserver.Run subserverRun,
                                                 JavaScriptIncluder s)
                               throws IOException,
                                      ScriptException,
                                      SQLException
Constructs a MailMetaService.

Parameters:
s - the compiled configuration script
Throws:
IOException
ScriptException
SQLException

configurationFile

@ThreadSafe
public File configurationFile()
The configuration file for this meta-service. It is located at:
votorolaDirectory/vomailrd.js

The language is JavaScript. There are restrictions on the character encoding.

Specified by:
configurationFile in class ElectoralService

help

public Exception help(String[] argv,
                      CommandResponder.Session session)
Description copied from class: ElectoralService
Responds to a help command on behalf of the nominal responder, per respond(argv,session).

Overrides:
help in class ElectoralService

serviceEmail

@ThreadSafe
public String serviceEmail()
The email address that nominally identifies this meta-service. It is constructed from the service and server names, as 'service-name@server-name'. The meta-service will reply to help requests it receives at this address. It will also reply to any misaddressed mail that lands in the inbox, and is not assignable to any other service.

Typically, this is the ordinary email address of the subserver account.

The authentication layer must not challenge any messages sent to this address. It must allow them (and, if possible, all messages sent to non-service email addresses) to bypass sender authentication entirely. For reasons, see: http://zelea.com/system/host/t/home/v/.tmda/filters/incoming

Overrides:
serviceEmail in class ElectoralService
Returns:
canonical email address (having no personal part)
See Also:
MailMetaService.ConfigurationContext.setName(String)

summaryDescription

public String summaryDescription()
A brief description of this meta-service, same as the subserver's.

Specified by:
summaryDescription in class ElectoralService

title

public String title()
The title of this meta-service, which is the same as the subserver's title.

Specified by:
title in class ElectoralService