|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface MessageListener
This is an interface for processing the end-result messages that is higher-level than the MessageHandler and related factory. While the SMTP message is being received, all listeners are asked if they want to accept each recipient. After the message has arrived, the message is handed off to all accepting listeners.
Method Summary | |
---|---|
boolean |
accept(java.lang.String from,
java.lang.String recipient)
Called once for every RCPT TO during a SMTP exchange. |
void |
deliver(java.lang.String from,
java.lang.String recipient,
java.io.InputStream data)
When message data arrives, this method will be called for every recipient this listener accepted. |
Method Detail |
---|
boolean accept(java.lang.String from, java.lang.String recipient)
from
- is a rfc822-compliant email address.recipient
- is a rfc822-compliant email address.
void deliver(java.lang.String from, java.lang.String recipient, java.io.InputStream data) throws TooMuchDataException, java.io.IOException
from
- is the envelope sender in rfc822 formrecipient
- will be an accepted recipient in rfc822 formdata
- will be the smtp data stream, stripped of any extra '.' chars
TooMuchDataException
- if the listener can't handle that much data.
An error will be reported to the client.
java.io.IOException
- if there is an IO error reading the input data.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |