public class RestockNotificationTask extends DBUTask
Modifier and Type | Field and Description |
---|---|
private static java.lang.Thread |
cvThread
The thread running the restock notification task.
|
private static long |
serialVersionUID
The class' serialization version id.
|
Constructor and Description |
---|
RestockNotificationTask()
Constructs a new instance of the restock notification task with a
null servlet or thread context. |
Modifier and Type | Method and Description |
---|---|
static boolean |
isRunning()
Answers if the task is currently running.
|
void |
run()
Runs the restock notification task.
|
protected void |
sendEmail(java.lang.String msgType,
RestockNotification rn)
Composes and sends the stock notification email message.
|
getContext, setContext
private static final long serialVersionUID
private static java.lang.Thread cvThread
public RestockNotificationTask()
null
servlet or thread context.
A CONTEXT MUST BE SET BEFORE INVOKING ANY OTHER METHODS.
.public void run()
Runnable
interface.public static boolean isRunning()
true
if the task is currently running,
otherwise false
.protected void sendEmail(java.lang.String msgType, RestockNotification rn) throws java.lang.Exception
msgType
- (String) The type of email message to send.rn
- (RestockNotification) The restock notification to process.java.lang.Exception
- - if an error occurs while sending the email.