001/*
002 * Copyright 2002-2007 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.bind.support;
018
019/**
020 * Simple interface that can be injected into handler methods, allowing them to
021 * signal that their session processing is complete. The handler invoker may
022 * then follow up with appropriate cleanup, e.g. of session attributes which
023 * have been implicitly created during this handler's processing (according to
024 * the
025 * {@link org.springframework.web.bind.annotation.SessionAttributes @SessionAttributes}
026 * annotation).
027 *
028 * @author Juergen Hoeller
029 * @since 2.5
030 * @see org.springframework.web.bind.annotation.RequestMapping
031 * @see org.springframework.web.bind.annotation.SessionAttributes
032 */
033public interface SessionStatus {
034
035        /**
036         * Mark the current handler's session processing as complete, allowing for
037         * cleanup of session attributes.
038         */
039        void setComplete();
040
041        /**
042         * Return whether the current handler's session processing has been marked
043         * as complete.
044         */
045        boolean isComplete();
046
047}