|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.mailet.GenericMailet org.apache.james.transport.mailets.ToMultiRepository
public class ToMultiRepository
Receives a Mail from JamesSpoolManager and takes care of delivery of the
message to local inboxes or a specific repository.
Differently from LocalDelivery this does not lookup the UserRepository This
simply store the message in a repository named like the local part of the
recipient address.
If no repository is specified then this fallback to MailServer.getUserInbox.
Otherwise you can add your own configuration for the repository
e.g:
Constructor Summary | |
---|---|
ToMultiRepository()
|
Method Summary | |
---|---|
java.lang.String |
getId()
Return a new mail id. |
java.lang.String |
getMailetInfo()
Return a string describing this mailet. |
void |
init()
A convenience method which can be overridden so that there's no need to call super.init(config). |
void |
service(Mail mail)
Delivers a mail to a local mailbox. |
void |
storeMail(MailAddress sender,
MailAddress recipient,
javax.mail.internet.MimeMessage message)
|
Methods inherited from class org.apache.mailet.GenericMailet |
---|
destroy, getInitParameter, getInitParameter, getInitParameterNames, getMailetConfig, getMailetContext, getMailetName, init, log, log |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ToMultiRepository()
Method Detail |
---|
public void service(Mail mail) throws javax.mail.MessagingException
service
in interface Mailet
service
in class GenericMailet
mail
- the mail being processed
javax.mail.MessagingException
- if an error occurs while storing the mailpublic java.lang.String getMailetInfo()
getMailetInfo
in interface Mailet
getMailetInfo
in class GenericMailet
public void storeMail(MailAddress sender, MailAddress recipient, javax.mail.internet.MimeMessage message) throws javax.mail.MessagingException
sender
- recipient
- message
-
javax.mail.MessagingException
public java.lang.String getId()
public void init() throws javax.mail.MessagingException
GenericMailet
A convenience method which can be overridden so that there's no need to call super.init(config).
Instead of overriding init(MailetConfig), simply override this method and it will be called by GenericMailet.init(MailetConfig config). The MailetConfig object can still be retrieved via getMailetConfig().
init
in class GenericMailet
javax.mail.MessagingException
- if an exception occurs that interrupts the mailet's normal operationGenericMailet.init()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |