net.hasor.web.invoker.InvokerCaller Maven / Gradle / Ivy
/*
* Copyright 2008-2009 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package net.hasor.web.invoker;
import net.hasor.utils.StringUtils;
import net.hasor.utils.future.BasicFuture;
import net.hasor.web.*;
import net.hasor.web.binder.FilterDef;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import javax.servlet.AsyncContext;
import javax.servlet.FilterChain;
import javax.servlet.http.HttpServletRequest;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.concurrent.Future;
import java.util.function.Supplier;
/**
* 负责解析参数并执行调用。
* @version : 2014年8月27日
* @author 赵永春 ([email protected])
*/
class InvokerCaller extends InvokerCallerParamsBuilder implements ExceuteCaller {
protected static Logger logger = LoggerFactory.getLogger(InvokerCaller.class);
private FilterDef[] filterArrays = null;
private Supplier invokerSupplier = null;
public InvokerCaller(Supplier invokerSupplier, FilterDef[] filterArrays) {
this.invokerSupplier = invokerSupplier;
this.filterArrays = (filterArrays == null) ? new FilterDef[0] : filterArrays;
}
/** 调用目标 */
public Future
© 2015 - 2025 Weber Informatics LLC | Privacy Policy