// Path: src/main/java/com/baidu/unbiz/multitask/exception/TaskBizException.java
// public class TaskBizException extends RuntimeException {
// 
//     private static final long serialVersionUID = -7375423850222016116L;
// 
//     public TaskBizException(String msg) {
//         super(msg);
//     }
// 
//     public TaskBizException(Throwable cause) {
//         super(cause);
//     }
// 
//     public TaskBizException(String message, Throwable cause) {
//         super(message, cause);
//     }
// }
// 
// Path: src/main/java/com/baidu/unbiz/multitask/task/Taskable.java
// public interface Taskable<T> {
// 
//     /**
//      * 执行数据获取
//      * 
//      * @param request
//      * @return 返回结果
//      * @since 2015-7-3 by wangchongjie
//      */
//     <E> T work(E request);
// 
// }


import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import com.baidu.unbiz.multitask.exception.TaskBizException;
import com.baidu.unbiz.multitask.task.Taskable;
package com.baidu.unbiz.multitask.spring.integration;




/**
 * Created by wangchongjie on 15/12/25.
 */
public class TaskBeanHelper {

    private static final Log LOG = LogFactory.getLog(TaskBeanHelper.class);
    private static final int NORMAL_PARAM_LENTH = 1;

    /**
     * 经带多个参数的方法，包装成Fetcher
     *
     * @param service
     * @param method
     * @param beanName
     * @param paramLen
     *
     * @return Fetcher
     */
// Path: src/main/java/com/baidu/unbiz/multitask/exception/TaskBizException.java
// public class TaskBizException extends RuntimeException {
// 
//     private static final long serialVersionUID = -7375423850222016116L;
// 
//     public TaskBizException(String msg) {
//         super(msg);
//     }
// 
//     public TaskBizException(Throwable cause) {
//         super(cause);
//     }
// 
//     public TaskBizException(String message, Throwable cause) {
//         super(message, cause);
//     }
// }
// 
// Path: src/main/java/com/baidu/unbiz/multitask/task/Taskable.java
// public interface Taskable<T> {
// 
//     /**
//      * 执行数据获取
//      * 
//      * @param request
//      * @return 返回结果
//      * @since 2015-7-3 by wangchongjie
//      */
//     <E> T work(E request);
// 
// }


// Path: src/main/java/com/baidu/unbiz/multitask/spring/integration/TaskBeanHelper.java
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import com.baidu.unbiz.multitask.exception.TaskBizException;
import com.baidu.unbiz.multitask.task.Taskable;

package com.baidu.unbiz.multitask.spring.integration;




/**
 * Created by wangchongjie on 15/12/25.
 */
public class TaskBeanHelper {

    private static final Log LOG = LogFactory.getLog(TaskBeanHelper.class);
    private static final int NORMAL_PARAM_LENTH = 1;

    /**
     * 经带多个参数的方法，包装成Fetcher
     *
     * @param service
     * @param method
     * @param beanName
     * @param paramLen
     *
     * @return Fetcher
     */
    public static Taskable<?> newFetcher(final Object service, final Method method, final String beanName,