SilverStream
Application Server 3.5

com.sssw.srv.busobj
Interface AgiMailListener


public interface AgiMailListener

Implemented by all business objects which listen for mail events. The server can be configured to get mail from a POP3 mail account (use the SCM to configure this). If those mail accounts recieve any mail, all business objects configured to listen for mail from those accounts will have events fired.

When a Mail-triggered business object is created, SilverStream automatically adds the implements AgiMailListener clause to the object's class definition.


Method Summary
 void afterMailReceived(AgoMailEvent e)
          Fires just after the SilverStream Server checks for mail on the POP3 server regardless of whether mail was actually received.
 void beforeMailReceived(AgoMailEvent e)
          Fires just before the SilverStream Server checks for mail on the POP3 server.
 void mailReceived(AgoMailEvent e)
          Fires once each time a message is received from a POP3 server.
 

Method Detail

beforeMailReceived

public void beforeMailReceived(AgoMailEvent e)
Fires just before the SilverStream Server checks for mail on the POP3 server.
Parameters:
e - an instance of the mail message object that is returned for each mail received event fired. It is a complete AgoMailEvent object except that e.getMessage() will return null.
See Also:
AgoMailEvent

mailReceived

public void mailReceived(AgoMailEvent e)
Fires once each time a message is received from a POP3 server.
Parameters:
e - an instance of the mail message object that is returned for each mail received event fired, used to get access to the message via e.getMessage() method.
Usage:

Every time the server checks for mail for each listener for the POP3 account, it fires the beforeMailReceived event once. It then fires this event (mailReceived) zero or more times depending on whether there was mail. Finally it fires the afterMailReceived event regardless if any mail was actually received.

Each time this event is fired the message is available to the code via the e.getMessage() method. Each registered listener has access to message. Each time this event is fired a new message is available from the event object. Older messages are not available: they must be saved when their event is fired.

After the server reads mail from the POP3 server, the message is deleted from the POP3 server.

See Also:
AgoMailEvent

afterMailReceived

public void afterMailReceived(AgoMailEvent e)
Fires just after the SilverStream Server checks for mail on the POP3 server regardless of whether mail was actually received.
Parameters:
e - an instance of the mail message object that is returned for each mail received event fired. It is a complete AgoMailEvent object except that e.getMessage() will return null.
See Also:
AgoMailEvent

SilverStream
Application Server 3.5