gu.simplemq.IMessageAdapterExt Maven / Gradle / Ivy
The newest version!
package gu.simplemq;
import gu.simplemq.exceptions.SmqUnsubscribeException;
/**
* 订阅消息数据处理接口
* 对于接口,调用者会自动忽略上级接口中的{@link IMessageAdapter#onSubscribe(Object)}方法
* 参见{@link ChannelDispatcher#dispatch(String, String)}
* @author guyadong
*
* @param 消息类型
* @since 2.3.9
*/
public interface IMessageAdapterExt extends IMessageAdapter {
/**
* 订阅消息处理,
* @param t 消息对象
* @param context 消息上下文对象对象
* @throws SmqUnsubscribeException 取消订阅当前频道异常指示
*/
public void onSubscribe(T t,SimplemqContext context) throws SmqUnsubscribeException ;
public static abstract class Adapter implements IMessageAdapterExt{
@Override
public void onSubscribe(T t) throws SmqUnsubscribeException {
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy