001/*
002 * Copyright 2002-2017 the original author or authors.
003 *
004 * Licensed under the Apache License, Version 2.0 (the "License");
005 * you may not use this file except in compliance with the License.
006 * You may obtain a copy of the License at
007 *
008 *      https://www.apache.org/licenses/LICENSE-2.0
009 *
010 * Unless required by applicable law or agreed to in writing, software
011 * distributed under the License is distributed on an "AS IS" BASIS,
012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013 * See the License for the specific language governing permissions and
014 * limitations under the License.
015 */
016
017package org.springframework.web.context.request.async;
018
019import java.util.concurrent.Callable;
020
021import org.springframework.web.context.request.NativeWebRequest;
022
023/**
024 * Abstract adapter class for the {@link CallableProcessingInterceptor} interface,
025 * for simplified implementation of individual methods.
026 *
027 * @author Rossen Stoyanchev
028 * @author Rob Winch
029 * @since 3.2
030 * @deprecated as of 5.0 where CallableProcessingInterceptor has default methods
031 */
032@Deprecated
033public abstract class CallableProcessingInterceptorAdapter implements CallableProcessingInterceptor {
034
035        @Override
036        public <T> void beforeConcurrentHandling(NativeWebRequest request, Callable<T> task) throws Exception {
037        }
038
039        @Override
040        public <T> void preProcess(NativeWebRequest request, Callable<T> task) throws Exception {
041        }
042
043        @Override
044        public <T> void postProcess(NativeWebRequest request, Callable<T> task, Object concurrentResult) throws Exception {
045        }
046
047        @Override
048        public <T> Object handleTimeout(NativeWebRequest request, Callable<T> task) throws Exception {
049                return RESULT_NONE;
050        }
051
052        @Override
053        public <T> Object handleError(NativeWebRequest request, Callable<T> task, Throwable t) throws Exception {
054                return RESULT_NONE;
055        }
056
057        @Override
058        public <T> void afterCompletion(NativeWebRequest request, Callable<T> task) throws Exception {
059        }
060
061}