ShutdownHookEmailThread¶
-
public class
ShutdownHookEmailThread
extends Thread¶ The
ShutdownHookEmailThread
is the actual worker thread executing during the JVM shutdown.
Fields¶
Constructors¶
ShutdownHookEmailThread¶
-
public
ShutdownHookEmailThread
(String protocol, String host, String username, String password, String from, String tos, String ccs, String subject, boolean verbose)¶ Create an instance of
ShutdownHookEmailThread
for delivering shutdown notification mail.Parameters: - protocol – The protocol for delivering email. default: smtp.
- host – The host-name of email server.
- username – The user-name for authenticating the email server, if necessary.
- password – The password for authenticating the email server, if necessary.
- from – The source email address of the shutdown notification email.
- tos – The to email address of recipient notification email.
- ccs – The cc email address of recipient notification email.
- subject – The subject of the email address.
- verbose – Enable debug mode ?
Methods¶
getCcs¶
getFrom¶
getHost¶
getIsVerbose¶
-
public boolean
getIsVerbose
()¶ Get whether the shutdown hook output verbosely.
Returns: Get whether the shutdown hook output verbosely.
getPassword¶
getProtocol¶
getSubject¶
getTos¶
getUsername¶
onCreateMailNotificationBody¶
onCreateMailNotificationSubject¶
-
protected String
onCreateMailNotificationSubject
()¶ Return the subject of notification email. Sub-class may override this to customize the subject of notification email.
Returns: Return the subject of notification email, default is DEFAULT_SHUTDOWN_MAIL_SUBJECT