com.codingapi.springboot.framework.handler.IHandler Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of springboot-starter Show documentation
Show all versions of springboot-starter Show documentation
springboot-starter project for Spring Boot
package com.codingapi.springboot.framework.handler;
import com.codingapi.springboot.framework.event.IEvent;
/**
* handler 订阅
*
* @param Event 类型
*/
public interface IHandler {
/**
* 订阅触发
*
* @param event 触发event
*/
void handler(T event);
/**
* 异常回掉,在多订阅的情况下,为了实现订阅的独立性,将异常的处理放在回掉函数中。
*
* @param exception 异常信息
*/
default void error(Exception exception) {
}
;
}