Class BootPostOfficeImpl
java.lang.Object
org.summerboot.jexpress.integration.smtp.BootPostOfficeImpl
- All Implemented Interfaces:
HealthInspector<String>,PostOffice
- Author:
- Changski Tie Zheng Zhang 张铁铮, 魏泽北, 杜旺财, 杜富贵
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected org.apache.logging.log4j.LoggerFields inherited from interface org.summerboot.jexpress.boot.instrumentation.HealthInspector
healthInspectorCounter -
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 title
-
Field Details
-
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
-
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
-
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- 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- 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>
-