001    /*
002     * Copyright 2008 Les Hazlewood
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     *     http://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    package org.apache.shiro.web.util;
017    
018    import javax.servlet.ServletRequest;
019    import javax.servlet.ServletResponse;
020    
021    /**
022     * A {@code RequestPairSource} is a component that can supply a {@link ServletRequest ServletRequest} and
023     * {@link ServletResponse ServletResponse} pair associated with a currently executing request.  This is used for
024     * framework development support and is rarely used by end-users.
025     *
026     * @since 1.0
027     */
028    public interface RequestPairSource {
029    
030        /**
031         * Returns the incoming {@link ServletRequest ServletRequest} associated with the component.
032         *
033         * @return the incoming {@link ServletRequest ServletRequest} associated with the component.
034         */
035        ServletRequest getServletRequest();
036    
037        /**
038         * Returns the outgoing {@link ServletResponse ServletResponse} paired with the incoming
039         * {@link #getServletRequest() servletRequest}.
040         *
041         * @return the outgoing {@link ServletResponse ServletResponse} paired with the incoming
042         *         {@link #getServletRequest() servletRequest}.
043         */
044        ServletResponse getServletResponse();
045    }