All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.codingapi.springboot.framework.handler.IHandler Maven / Gradle / Ivy

There is a newer version: 3.3.12
Show newest version
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) {
    }

    ;

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy