001    /*
002     * Licensed to the Apache Software Foundation (ASF) under one
003     * or more contributor license agreements.  See the NOTICE file
004     * distributed with this work for additional information
005     * regarding copyright ownership.  The ASF licenses this file
006     * to you under the Apache License, Version 2.0 (the
007     * "License"); you may not use this file except in compliance
008     * with the License.  You may obtain a copy of the License at
009     *
010     *  http://www.apache.org/licenses/LICENSE-2.0
011     *
012     * Unless required by applicable law or agreed to in writing,
013     * software distributed under the License is distributed on an
014     * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
015     * KIND, either express or implied.  See the License for the
016     * specific language governing permissions and limitations
017     * under the License.
018     */
019    
020    package javax.servlet.http;
021    
022    import java.util.EventListener;
023    
024    /**
025     * Causes an object to be notified when it is bound to
026     * or unbound from a session. The object is notified
027     * by an {@link HttpSessionBindingEvent} object. This may be as a result
028     * of a servlet programmer explicitly unbinding an attribute from a session,
029     * due to a session being invalidated, or due to a session timing out.
030     *
031     *
032     * @author              Various
033     * @version             $Version$
034     *
035     * @see HttpSession
036     * @see HttpSessionBindingEvent
037     */
038    public interface HttpSessionBindingListener extends EventListener {
039        /**
040         *
041         * Notifies the object that it is being bound to
042         * a session and identifies the session.
043         *
044         * @param event             the event that identifies the
045         *                          session 
046         *
047         * @see #valueUnbound
048         *
049         */ 
050    
051        public void valueBound(HttpSessionBindingEvent event);
052        
053        
054    
055        /**
056         *
057         * Notifies the object that it is being unbound
058         * from a session and identifies the session.
059         *
060         * @param event             the event that identifies
061         *                          the session 
062         *  
063         * @see #valueBound
064         *
065         */
066    
067        public void valueUnbound(HttpSessionBindingEvent event);
068        
069        
070    }
071