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

io.jexxa.adapterapi.invocation.InvocationManager Maven / Gradle / Ivy

There is a newer version: 2.1.2
Show newest version
package io.jexxa.adapterapi.invocation;

import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

public final class InvocationManager {
    private static final Map INVOCATION_HANDLER_MAP = new ConcurrentHashMap<>();


    public static synchronized JexxaInvocationHandler getInvocationHandler(Object object)
    {
        return INVOCATION_HANDLER_MAP.computeIfAbsent(object, key -> createDefaultInvocationHandler());
    }

    public static DefaultInvocationHandler getRootInterceptor(Object object)
    {
        return (DefaultInvocationHandler) getInvocationHandler(object);
    }

    private static DefaultInvocationHandler createDefaultInvocationHandler()
    {
        return new DefaultInvocationHandler();
    }

    private InvocationManager()
    {
        //private constructor
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy