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

chao.java.tools.servicepool.InnerProxy Maven / Gradle / Ivy

package chao.java.tools.servicepool;

import chao.java.tools.servicepool.cache.Specific;

/**
 * @author luqin
 * @since 2019-09-03
 */
public class InnerProxy extends ServiceProxy {

    private T service;

    private Specific cacheStrategy;

    public InnerProxy(T service) {
        super((Class) service.getClass());
        this.service = service;
        cacheStrategy = new Specific<>(this.service);
        setOriginClass(service.getClass());
    }

    @Override
    public T getService() {
        return cacheStrategy.getService(getOriginClass(), getOriginClass());
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy