org.apache.james.transport.mailets
Class AbstractVirtualUserTable
java.lang.Object
org.apache.mailet.GenericMailet
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.
Method Summary |
protected abstract void |
mapRecipients(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 |
AbstractVirtualUserTable
public AbstractVirtualUserTable()
service
public void service(Mail mail)
throws 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
- Parameters:
mail
- the mail to process
- Throws:
MessagingException
- - if an exception occurs that interferes with the mailet's normal operation
mapRecipients
protected abstract void mapRecipients(Map recipientsMap)
throws 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.
- Parameters:
recipientsMap
- the mapping of virtual to real recipients, as
MailAddress
es to String
s.
- Throws:
MessagingException
"Copyright © 1999-2006 Apache Jakarta Project. All Rights Reserved."