Class BootPostOfficeImpl
java.lang.Object
org.summerboot.jexpress.integration.smtp.BootPostOfficeImpl
- All Implemented Interfaces:
Comparable<Object>, HealthInspector<String>, PostOffice
- Author:
- Changski Tie Zheng Zhang 张铁铮, 魏泽北, 杜旺财, 杜富贵
-
Nested Class Summary
Nested classes/interfaces inherited from interface HealthInspector
HealthInspector.InspectionType -
Field Summary
FieldsFields inherited from interface HealthInspector
retryIndex -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidclean(long now) protected booleanvoidsendAlert(Collection<String> to, String subject, String content, Throwable cause, boolean debouncing, boolean async) The implementation of both sendAlertAsync and sendAlertSyncvoidsendAlertAsync(Collection<String> to, String subject, String content, Throwable cause, boolean debouncing) send alert email in async modevoidsendAlertSync(Collection<String> to, String subject, String content, Throwable cause, boolean debouncing) send alert email in sync modebooleansendEmail(Collection<String> to, String subject, String content, boolean isHTMLFormat, boolean async) send emailbooleansendEmailAsync(Collection<String> to, String subject, String content, boolean isHTMLFormat) send email in async modebooleansendEmailSync(Collection<String> to, String subject, String content, boolean isHTMLFormat) send email in sync modevoidsetAppVersion(String appVersion) protected StringupdateAlertContent(String content, Throwable cause) Update alert contentprotected StringupdateAlertEmailSubject(String subject) Update alert subjectMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface HealthInspector
compareTo, inspectionType, logLevel, pauseLockCode
-
Field Details
-
appVersion
-
log
protected org.apache.logging.log4j.Logger log -
debouncingData
-
-
Constructor Details
-
BootPostOfficeImpl
public BootPostOfficeImpl()
-
-
Method Details
-
setAppVersion
- Specified by:
setAppVersionin interfacePostOffice
-
updateAlertEmailSubject
-
updateAlertContent
-
sendAlertAsync
public void sendAlertAsync(Collection<String> to, String subject, String content, Throwable cause, boolean debouncing) Description copied from interface:PostOfficesend alert email in async mode- Specified by:
sendAlertAsyncin interfacePostOffice- Parameters:
to-subject-content-cause-debouncing-
-
sendAlertSync
public void sendAlertSync(Collection<String> to, String subject, String content, Throwable cause, boolean debouncing) Description copied from interface:PostOfficesend alert email in sync mode- Specified by:
sendAlertSyncin interfacePostOffice- Parameters:
to-subject-content-cause-debouncing-
-
sendAlert
public void sendAlert(Collection<String> to, String subject, String content, Throwable cause, boolean debouncing, boolean async) The implementation of both sendAlertAsync and sendAlertSync- Specified by:
sendAlertin interfacePostOffice- Parameters:
to-subject-content-cause-debouncing-async-
-
sendEmailAsync
public boolean sendEmailAsync(Collection<String> to, String subject, String content, boolean isHTMLFormat) Description copied from interface:PostOfficesend email in async mode- Specified by:
sendEmailAsyncin interfacePostOffice- Parameters:
to-subject-content-isHTMLFormat-- Returns:
-
sendEmailSync
public boolean sendEmailSync(Collection<String> to, String subject, String content, boolean isHTMLFormat) Description copied from interface:PostOfficesend email in sync mode- Specified by:
sendEmailSyncin interfacePostOffice- Parameters:
to-subject-content-isHTMLFormat-- Returns:
- true is success
-
sendEmail
public boolean sendEmail(Collection<String> to, String subject, String content, boolean isHTMLFormat, boolean async) Description copied from interface:PostOfficesend email- Specified by:
sendEmailin interfacePostOffice- Parameters:
to-subject-content-isHTMLFormat-async-- Returns:
-
debounced
-
clean
protected void clean(long now) -
ping
-