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

io.github.rhwayfun.springboot.rocketmq.starter.handler.HandlerHolder Maven / Gradle / Ivy

package io.github.rhwayfun.springboot.rocketmq.starter.handler;

import java.util.HashMap;
import java.util.Map;

/**
 * @author rhwayfun
 * @since 0.0.1
 */
public class HandlerHolder {

    private static Map cacheMessageHandler = new HashMap<>();

    public static MessageHandler getHandler(String key) {
        return cacheMessageHandler.get(key);
    }

    public static void addHandler(String key, MessageHandler handler) {
        cacheMessageHandler.put(key, handler);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy