Examples of AsyncLoadConfig


Examples of com.alibaba.asyncload.AsyncLoadConfig

            // 用户不指定AsyncLoadCallBack的泛型信息
            throw new AsyncLoadException("you should specify AsyncLoadCallBack<R> for R type, ie: AsyncLoadCallBack<OfferModel>");
        }
        Class returnClass = (Class) getGenericClass((ParameterizedType) type, 0);

        AsyncLoadConfig copy = config.cloneConfig();
        copy.setDefaultTimeout(timeout);
        return execute(callback, returnClass, copy);
    }
View Full Code Here

Examples of com.alibaba.asyncload.AsyncLoadConfig

     * @param returnClass 期望的返回对象class
     * @param timeout
     * @return
     */
    public <R> R execute(final AsyncLoadCallback<R> callback, Class<?> returnClass, long timeout) {
        AsyncLoadConfig copy = config.cloneConfig();
        copy.setDefaultTimeout(timeout);
        return execute(callback, returnClass, copy);
    }
View Full Code Here

Examples of com.alibaba.asyncload.AsyncLoadConfig

            return callback.doAsyncLoad();
        } else if (returnClass == Object.class) {
            // 针对返回对象是Object类型,不做代理。没有具体的method,代理没任何意义
            return callback.doAsyncLoad();
        } else {
            final AsyncLoadConfig copy = config;
            Future<R> future = executor.submit(new AsyncLoadCallable() {

                public R call() throws Exception {
                    return callback.doAsyncLoad();
                }
View Full Code Here

Examples of com.alibaba.asyncload.AsyncLoadConfig

    public AsyncLoadEnhanceProxy(){
    }

    public AsyncLoadEnhanceProxy(T service, AsyncLoadExecutor executor){
        this(service, new AsyncLoadConfig(), executor);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.