|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.geotools.gui.headless.ProgressMailer
Reports progress by sending email to the specified address at regular interval.
Constructor Summary | |
ProgressMailer(javax.mail.Session session,
javax.mail.Address[] address)
Creates an objects reporting progress to the specified email adresses. |
|
ProgressMailer(java.lang.String host,
java.lang.String address)
Creates an objects reporting progress to the specified email address. |
Method Summary | |
void |
complete()
Send an emails saying that the operation finished. |
void |
dispose()
Releases any resource used by this object. |
void |
exceptionOccurred(java.lang.Throwable exception)
Send an exception stack trace by email. |
java.lang.String |
getDescription()
Returns the description for the lengthly operation to be reported, or if none. |
long |
getTimeInterval()
Returns the time laps (in milliseconds) between two emails. |
boolean |
isCanceled()
Is this job canceled? |
void |
progress(float percent)
Notifies progress. |
void |
setCanceled(boolean canceled)
Indicate that progress should is canceled. |
void |
setDescription(java.lang.String description)
Set the description for the lenghtly operation to be reported. This method is usually invoked before any progress begins. However, it is legal to invoke this method at any time during the operation, in which case the description display is updated without any change to the percentage accomplished. |
void |
setTimeInterval(long interval)
Set the time laps (in milliseconds) between two emails. |
void |
started()
Send an emails saying that the operation started. |
void |
warningOccurred(java.lang.String source,
java.lang.String margin,
java.lang.String warning)
Send a warning by email. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ProgressMailer(java.lang.String host, java.lang.String address) throws javax.mail.internet.AddressException
host
- The server to use for sending emails.address
- Email adress where to send progress reports.
javax.mail.internet.AddressException
- if the specified address use an invalid syntax.public ProgressMailer(javax.mail.Session session, javax.mail.Address[] address)
session
- Session to use for sending emails.address
- Method Detail |
public long getTimeInterval()
public void setTimeInterval(long interval)
public java.lang.String getDescription()
getDescription
in interface ProgressListener
public void setDescription(java.lang.String description)
setDescription
in interface ProgressListener
description
- The new description, or if none.public void started()
started
in interface ProgressListener
public void progress(float percent)
setTimeInterval(long)
is ellapsed since the last email.
progress
in interface ProgressListener
public void complete()
complete
in interface ProgressListener
public void dispose()
dispose
in interface ProgressListener
public boolean isCanceled()
isCanceled
in interface ProgressListener
public void setCanceled(boolean canceled)
setCanceled
in interface ProgressListener
public void warningOccurred(java.lang.String source, java.lang.String margin, java.lang.String warning)
warningOccurred
in interface ProgressListener
source
- The source of the warning, or if none. This is typically the
filename in process of being parsed.margin
- Text to write on the left side of the warning message, or if none.
This is typically the line number where the error occured in the file.warning
- The warning message.public void exceptionOccurred(java.lang.Throwable exception)
exceptionOccurred
in interface ProgressListener
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |