|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
ObjectProgressController
ProgressMailer
@ThreadSafe public class ProgressMailer
Reports progress by sending email to the specified address at regular interval.
| display/geotk-widgets-swing (download) | View source code for this class |
| Constructor Summary | |
|---|---|
ProgressMailer(Session session,
Address... address)
Constructs an objects reporting progress to the specified email addresses. |
|
ProgressMailer(String host,
String address)
Constructs an objects reporting progress to the specified email address. |
|
| Method Summary | |
|---|---|
void |
completed()
Sends an emails saying that the operation finished. |
void |
exceptionOccurred(Throwable exception)
Send an exception stack trace by email. |
long |
getTimeInterval()
Returns the time laps (in milliseconds) between two emails. |
void |
setProgress(float percent)
Notifies progress. |
void |
setTimeInterval(long interval)
Sets the time laps (in milliseconds) between two emails. |
void |
started()
Sends an email saying that the operation started. |
void |
warningOccurred(String source,
String location,
String warning)
Sends a warning by email. |
| Methods inherited from class ProgressController |
|---|
cancel, completed, failed, getLocale, getProgress, getTask, isCanceled, progressing, setTask, started |
| Methods inherited from class Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ProgressMailer(String host,
String address)
throws AddressException
host - The server to use for sending emails.address - Email address where to send progress reports.
AddressException - if the specified address use an invalid syntax.
public ProgressMailer(Session session,
Address... address)
session - Session to use for sending emails.address - Email address where to send progress reports.| Method Detail |
|---|
public long getTimeInterval()
public void setTimeInterval(long interval)
interval - The new time laps in milliseconds.public void started()
started in class ProgressControllerpublic void setProgress(float percent)
setTimeInterval(long) is elapsed since the last email.
setProgress in class ProgressControllerpercent - The progress as a value between 0 and 100 inclusive.public void completed()
completed in class ProgressController
public void warningOccurred(String source,
String location,
String warning)
warningOccurred in class ProgressControllersource - Name of the warning source, or null if none. This is typically the
filename in process of being parsed or the URL of the data being processedlocation - Text to write on the left side of the warning message, or null if none.
This is typically the line number where the error occurred in the source
file or the feature ID of the feature that produced the messagewarning - The warning message.public void exceptionOccurred(Throwable exception)
exceptionOccurred in class ProgressControllerexception - The exception to report.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||