Reports progress by sending email to the specified address at regular interval.
since: 2.0 version: $Id: ProgressMailer.java 27862 2007-11-12 19:51:19Z desruisseaux $ author: Martin Desruisseaux
Constructor Summary
public
ProgressMailer(String host, String address) Creates an objects reporting progress to the specified email address.
public
ProgressMailer(Session session, Address[] address) Creates an objects reporting progress to the specified email adresses.
Method Summary
public synchronized void
complete() Send an emails saying that the operation finished.
public void
dispose() Releases any resource used by this object.
public ProgressMailer(String host, String address) throws AddressException(Code)
Creates an objects reporting progress to the specified email address.
Parameters: host - The server to use for sending emails. Parameters: address - Email adress where to send progress reports. throws: AddressException - if the specified address use an invalid syntax.
ProgressMailer
public ProgressMailer(Session session, Address[] address)(Code)
Creates an objects reporting progress to the specified email adresses.
Parameters: session - Session to use for sending emails. Parameters: address -
public synchronized void progress(float percent)(Code)
Notifies progress. This method will send an email only if at least the amount
of time specified by
ProgressMailer.setTimeInterval is ellapsed since the last email.