Package mireka.filter
Class AbstractDataRecipientFilter
- Object
-
- mireka.filter.AbstractDataRecipientFilter
-
- All Implemented Interfaces:
DataRecipientFilter,FilterBase
public abstract class AbstractDataRecipientFilter extends Object implements DataRecipientFilter
-
-
Field Summary
Fields Modifier and Type Field Description protected MailTransactionmailTransaction
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractDataRecipientFilter(MailTransaction mailTransaction)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidbegin()voiddata(MailData data)voiddataRecipient(MailData data, RecipientContext recipientContext)This method and theFilterBase.data(mireka.MailData)method are called together, the similar methods of the next filter will be called only after both methods have been run.voiddone()it is always called, even if some other filter failed or no mail was delivered in this mail transactionvoidfrom(ReversePath from)voidrecipient(RecipientContext recipientContext)Processes an accepted recipient.FilterReplyverifyRecipient(RecipientContext recipientContext)Decides if a recipient should be accepted.
-
-
-
Field Detail
-
mailTransaction
protected final MailTransaction mailTransaction
-
-
Constructor Detail
-
AbstractDataRecipientFilter
protected AbstractDataRecipientFilter(MailTransaction mailTransaction)
-
-
Method Detail
-
begin
public void begin()
- Specified by:
beginin interfaceFilterBase
-
from
public void from(ReversePath from)
- Specified by:
fromin interfaceFilterBase
-
verifyRecipient
public FilterReply verifyRecipient(RecipientContext recipientContext) throws RejectExceptionExt
Description copied from interface:FilterBaseDecides if a recipient should be accepted. The decision can be a final positive, a final negative, or a neutral answer. This function is not called if a previous filter has already accepted or rejected the recipient. In case of a neutral answer, other filters will decide. If all filters return the neutral answer, then the recipient will be accepted if a destination is assigned to it and the assigned destination is not anUnknownRecipientDestination; otherwise it will be rejected as an unknown user.- Specified by:
verifyRecipientin interfaceFilterBase- Throws:
RejectExceptionExt
-
recipient
public void recipient(RecipientContext recipientContext) throws RejectExceptionExt
Description copied from interface:FilterBaseProcesses an accepted recipient. It is only called if one of the filters accepted the recipient inFilterBase.verifyRecipient(mireka.filter.RecipientContext).- Specified by:
recipientin interfaceFilterBase- Throws:
RejectExceptionExt
-
data
public void data(MailData data) throws RejectExceptionExt, org.subethamail.smtp.TooMuchDataException, java.io.IOException
- Specified by:
datain interfaceFilterBase- Throws:
RejectExceptionExtorg.subethamail.smtp.TooMuchDataExceptionjava.io.IOException
-
dataRecipient
public void dataRecipient(MailData data, RecipientContext recipientContext) throws RejectExceptionExt
Description copied from interface:DataRecipientFilterThis method and theFilterBase.data(mireka.MailData)method are called together, the similar methods of the next filter will be called only after both methods have been run.- Specified by:
dataRecipientin interfaceDataRecipientFilter- Throws:
RejectExceptionExt
-
done
public void done()
Description copied from interface:FilterBaseit is always called, even if some other filter failed or no mail was delivered in this mail transaction- Specified by:
donein interfaceFilterBase
-
-