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

org.frameworkset.web.request.async.TimeoutCallableProcessingInterceptor Maven / Gradle / Ivy

Go to download

bboss is a j2ee framework include aop/ioc,mvc,persistent,taglib,rpc,event ,bean-xml serializable and so on.http://www.bbossgroups.com

The newest version!
package org.frameworkset.web.request.async;

import java.util.concurrent.Callable;

import javax.servlet.http.HttpServletResponse;

import org.frameworkset.http.HttpStatus;
import org.frameworkset.web.servlet.mvc.NativeWebRequest;

public class TimeoutCallableProcessingInterceptor  extends CallableProcessingInterceptorAdapter {

	@Override
	public  Object handleTimeout(NativeWebRequest request, Callable task) throws Exception {
		HttpServletResponse servletResponse = request.getNativeResponse(HttpServletResponse.class);
		if (!servletResponse.isCommitted()) {
			servletResponse.sendError(HttpStatus.SERVICE_UNAVAILABLE.value());
		}
		return CallableProcessingInterceptor.RESPONSE_HANDLED;
	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy