Package mireka.filter
Class DataRecipientFilterAdapter
- Object
-
- mireka.filter.DataRecipientFilterAdapter
-
- All Implemented Interfaces:
Filter,FilterBase
public final class DataRecipientFilterAdapter extends Object implements Filter
Adapts aDataRecipientFilterto theFilterinterface
-
-
Constructor Summary
Constructors Constructor Description DataRecipientFilterAdapter(DataRecipientFilter filter, MailTransaction mailTransaction)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidbegin()voiddata(MailData data)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.voidsetChain(FilterChain chain)an implementation must store the supplied view to the next filter in the chain.FilterReplyverifyRecipient(RecipientContext recipientContext)Decides if a recipient should be accepted.
-
-
-
Constructor Detail
-
DataRecipientFilterAdapter
public DataRecipientFilterAdapter(DataRecipientFilter filter, MailTransaction mailTransaction)
-
-
Method Detail
-
setChain
public void setChain(FilterChain chain)
Description copied from interface:Filteran implementation must store the supplied view to the next filter in the chain. All methods of the implementing class which has a corresponding method inFilterChainmust call the latter method.
-
begin
public void begin()
- Specified by:
beginin interfaceFilterBase
-
from
public void from(ReversePath from) throws RejectExceptionExt
- Specified by:
fromin interfaceFilterBase- Throws:
RejectExceptionExt
-
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
-
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
-
-