Class AbstractVirtualUserTable

  extended by org.apache.mailet.GenericMailet
      extended by org.apache.james.transport.mailets.AbstractVirtualUserTable
All Implemented Interfaces:
Mailet, MailetConfig
Direct Known Subclasses:
JDBCVirtualUserTable, XMLVirtualUserTable

public abstract class AbstractVirtualUserTable
extends GenericMailet

Provides an abstraction of common functionality needed for implementing a Virtual User Table. Override the mapRecipients method to map virtual recipients to real recipients.

Constructor Summary
Method Summary
protected abstract  void mapRecipients(java.util.Map recipientsMap)
          Override to map virtual recipients to real recipients, both local and non-local.
 void service(Mail mail)
          Checks the recipient list of the email for user mappings.
Methods inherited from class org.apache.mailet.GenericMailet
destroy, getInitParameter, getInitParameter, getInitParameterNames, getMailetConfig, getMailetContext, getMailetInfo, getMailetName, init, init, log, log
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail


public AbstractVirtualUserTable()
Method Detail


public void service(Mail mail)
             throws javax.mail.MessagingException
Checks the recipient list of the email for user mappings. Maps recipients as appropriate, modifying the recipient list of the mail and sends mail to any new non-local recipients.

Specified by:
service in interface Mailet
Specified by:
service in class GenericMailet
mail - the mail to process
javax.mail.MessagingException - - if an exception occurs that interferes with the mailet's normal operation


protected abstract void mapRecipients(java.util.Map recipientsMap)
                               throws javax.mail.MessagingException
Override to map virtual recipients to real recipients, both local and non-local. Each key in the provided map corresponds to a potential virtual recipient, stored as a MailAddress object. Translate virtual recipients to real recipients by mapping a string containing the address of the real recipient as a value to a key. Leave the value null if no mapping should be performed. Multiple recipients may be specified by delineating the mapped string with commas, semi-colons or colons.

recipientsMap - the mapping of virtual to real recipients, as MailAddresses to Strings.

Copyright © 2002-2007 The Apache Software Foundation. All Rights Reserved.