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

colesico.framework.rpc.clientapi.RpcErrorHandlerFactory Maven / Gradle / Ivy

The newest version!
package colesico.framework.rpc.clientapi;

import colesico.framework.ioc.Ioc;
import colesico.framework.ioc.key.ClassedKey;
import colesico.framework.rpc.RpcError;

import javax.inject.Singleton;

@Singleton
public class RpcErrorHandlerFactory {

    private final Ioc ioc;

    public RpcErrorHandlerFactory(Ioc ioc) {
        this.ioc = ioc;
    }

    public  RpcErrorHandler getErrorHandler(Class errorClass) {
        return ioc.instance(new ClassedKey<>(RpcErrorHandler.class.getCanonicalName(), errorClass.getCanonicalName()), null);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy