Package mireka.destination
Interface Session
-
public interface SessionSession methods are called step by step as the SMTP mail transaction progresses. The session object may directly affect the mail transaction e.g. by rejecting a recipient. For each mail transaction a separate Session object is created, so it can save states between the steps.- See Also:
SessionDestination
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voiddata(Mail mail)Processes the mail after the mail data arrived.voiddone()Closes this session.voidfrom(ReversePath from)Processes the reverse path.voidrecipient(RecipientContext recipientContext)Processes an accepted recipient.
-
-
-
Method Detail
-
from
void from(ReversePath from) throws RejectExceptionExt
Processes the reverse path. This function is called before the firstrecipient(RecipientContext)call.- Parameters:
from- The reverse path.- Throws:
RejectExceptionExt
-
recipient
void recipient(RecipientContext recipientContext) throws RejectExceptionExt
Processes an accepted recipient. It is only called if one of the filters accepted the recipient inFilterBase.verifyRecipient(mireka.filter.RecipientContext).- Throws:
RejectExceptionExt
-
data
void data(Mail mail) throws RejectExceptionExt, java.io.IOException
Processes the mail after the mail data arrived. This function is called after the SMTP DATA command has been received. It is not called if this object rejected all recipients, or if other destination (assigned to another destination) has already rejected the mail data.- Throws:
java.io.IOException- if an error occurred while reading from the supplied mail data.RejectExceptionExt
-
done
void done()
Closes this session. It is always called, even if some other function failed or no mail was delivered in the session.
-
-