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

com.zandero.rest.cache.AuthorizationProvidersCache Maven / Gradle / Ivy

The newest version!
package com.zandero.rest.cache;

import com.zandero.rest.data.ClassFactory;
import com.zandero.rest.exception.*;
import com.zandero.rest.injection.InjectionProvider;
import io.vertx.ext.auth.authorization.AuthorizationProvider;
import io.vertx.ext.web.RoutingContext;
import org.slf4j.*;

public class AuthorizationProvidersCache extends ClassCache {

    public AuthorizationProvidersCache() {
        clear();
    }

    public AuthorizationProvider provide(Class authorizationProvider,
                                         InjectionProvider provider,
                                         RoutingContext context) throws ClassFactoryException, ContextException {
        return (AuthorizationProvider) ClassFactory.getClassInstance(authorizationProvider,
                                                                     this,
                                                                     provider,
                                                                     context);
    }

    public void register(Class aClass, Class clazz) {
        super.registerTypeByAssociatedType(aClass, clazz);
    }

    public void register(Class aClass, AuthorizationProvider instance) {
        super.registerInstanceByAssociatedType(aClass, instance);
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy