package com.qianwen.core.notify.notifier; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import com.qianwen.core.notify.NotifyResultProducer; import com.qianwen.core.notify.event.NotifierEvent; import com.qianwen.core.notify.template.Template; import com.qianwen.core.tool.utils.Func; /* loaded from: blade-starter-notify-9.3.0.0-SNAPSHOT.jar:org/springblade/core/notify/notifier/NotifierEventDispatcher.class */ public class NotifierEventDispatcher extends NotifierProxy { private static final Logger log = LoggerFactory.getLogger(NotifierEventDispatcher.class); private final NotifyResultProducer notifyResultProducer; public NotifierEventDispatcher(NotifyResultProducer notifyResultProducer, Notifier target) { super(target); this.notifyResultProducer = notifyResultProducer; } @Override // com.qianwen.core.notify.notifier.NotifierProxy protected void onEvent(NotifierEvent event) { if (Func.isNotEmpty(this.notifyResultProducer)) { this.notifyResultProducer.asyncSend(event.toSerializable()); } else { log.error("没有实现消息结果发送生产者"); } } }