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 org.summerboot.jexpress.boot.instrumentation.HealthInspector
HealthInspector.InspectionType -
Field Summary
FieldsFields inherited from interface org.summerboot.jexpress.boot.instrumentation.HealthInspector
retryIndex -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidclean(long now) protected booleanprotected voidsendAlert(Collection<String> to, String title, String content, Throwable cause, boolean debouncing, boolean async) The implementation of both sendAlertAsync and sendAlertSyncvoidsendAlertAsync(Collection<String> to, String title, String content, Throwable cause, boolean debouncing) send alert email in async modevoidsendAlertSync(Collection<String> to, String title, String content, Throwable cause, boolean debouncing) send alert email in sync modeprotected booleansendEmail(Collection<String> to, String title, String content, boolean isHTMLFormat, boolean async) booleansendEmailAsync(Collection<String> to, String title, String content, boolean isHTMLFormat) send email in async modebooleansendEmailSync(Collection<String> to, String title, String content, boolean isHTMLFormat) send email in sync modevoidsetAppVersion(String appVersion) protected StringupdateAlertContent(String content, Throwable cause) Update alert contentprotected StringupdateAlertTitle(String title) Update alert titleMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.summerboot.jexpress.boot.instrumentation.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
-
updateAlertTitle
Update alert title- Parameters:
title-- Returns:
-
updateAlertContent
Update alert content- Parameters:
content-cause-- Returns:
-
sendAlertAsync
public void sendAlertAsync(Collection<String> to, String title, String content, Throwable cause, boolean debouncing) Description copied from interface:PostOfficesend alert email in async mode- Specified by:
sendAlertAsyncin interfacePostOffice- Parameters:
to-title-content-cause-debouncing-
-
sendAlertSync
public void sendAlertSync(Collection<String> to, String title, String content, Throwable cause, boolean debouncing) Description copied from interface:PostOfficesend alert email in sync mode- Specified by:
sendAlertSyncin interfacePostOffice- Parameters:
to-title-content-cause-debouncing-
-
sendAlert
protected void sendAlert(Collection<String> to, String title, String content, Throwable cause, boolean debouncing, boolean async) The implementation of both sendAlertAsync and sendAlertSync- Parameters:
to-title-content-cause-debouncing-async-
-
sendEmailAsync
public boolean sendEmailAsync(Collection<String> to, String title, String content, boolean isHTMLFormat) Description copied from interface:PostOfficesend email in async mode- Specified by:
sendEmailAsyncin interfacePostOffice- Parameters:
to-title-content-isHTMLFormat-- Returns:
-
sendEmailSync
public boolean sendEmailSync(Collection<String> to, String title, String content, boolean isHTMLFormat) Description copied from interface:PostOfficesend email in sync mode- Specified by:
sendEmailSyncin interfacePostOffice- Parameters:
to-title-content-isHTMLFormat-- Returns:
- true is success
-
sendEmail
protected boolean sendEmail(Collection<String> to, String title, String content, boolean isHTMLFormat, boolean async) -
debounced
-
clean
protected void clean(long now) -
ping
- Specified by:
pingin interfaceHealthInspector<String>
-