001// Licensed under the Apache License, Version 2.0 (the "License"); 002// you may not use this file except in compliance with the License. 003// You may obtain a copy of the License at 004// 005// http://www.apache.org/licenses/LICENSE-2.0 006// 007// Unless required by applicable law or agreed to in writing, software 008// distributed under the License is distributed on an "AS IS" BASIS, 009// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 010// See the License for the specific language governing permissions and 011// limitations under the License. 012 013package org.apache.tapestry5.http; 014 015import org.apache.tapestry5.http.services.CorsHandler; 016import org.apache.tapestry5.http.services.CorsHttpServletRequestFilter; 017import org.apache.tapestry5.http.services.HttpServletRequestFilter; 018 019/** 020 * Enumeration that defines the possible outcomes of 021 * {@link CorsHandler#handle(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)} 022 * @see CorsHandler 023 * @see CorsHttpServletRequestFilter 024 * @since 5.8.2 025 */ 026public enum CorsHandlerResult 027{ 028 /** 029 * The next {@linkplain CorsHandler} should be called. 030 * Usually returned when the CORS handler didn't actually processed the request. 031 */ 032 CONTINUE_CORS_PROCESSING, 033 034 /** 035 * No other {@linkplain CorsHandler} should be called and request processing 036 * should resume (i.e. {@linkplain CorsHttpServletRequestFilter} calls 037 * {@link HttpServletRequestFilter#service(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, org.apache.tapestry5.http.services.HttpServletRequestHandler)}. 038 * Usually returned when the handler actually processed the request. 039 */ 040 CONTINUE_REQUEST_PROCESSING, 041 042 /** 043 * The request processing should stop immediately. Usually used with CORS preflight requests. 044 */ 045 STOP_REQUEST_PROCESSING 046}