package foundation.handler;
|
|
import java.lang.reflect.Method;
|
|
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletResponse;
|
|
public abstract class Handler extends BaseHandler implements IHandler {
|
|
protected HttpServletResponse response;
|
protected HttpServletRequest request;
|
protected ResultPool resultPool;
|
protected DataPool dataPool;
|
|
public Handler() {
|
|
}
|
|
protected void invokeMethod(Method method, DataPool dataPool, ResultPool resultPool) throws Exception {
|
this.dataPool = dataPool;
|
this.resultPool = resultPool;
|
this.request = dataPool.getRequest();
|
this.response = resultPool.getResponse();
|
|
method.invoke(this);
|
}
|
|
public DataPool getDataPool() throws Exception {
|
return dataPool;
|
}
|
|
public HttpServletRequest getRequest() {
|
return request;
|
}
|
|
public HttpServletResponse getResponse() {
|
return response;
|
}
|
|
public ResultPool getResultPool() {
|
return resultPool;
|
}
|
}
|