Source Code Cross Referenced for HttpSessionBindingEvent.java in  » 6.0-JDK-Core » Servlet-API-by-tomcat » javax » servlet » http » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Home
Java Source Code / Java Documentation
1.6.0 JDK Core
2.6.0 JDK Modules
3.6.0 JDK Modules com.sun
4.6.0 JDK Modules com.sun.java
5.6.0 JDK Modules sun
6.6.0 JDK Platform
7.Ajax
8.Apache Harmony Java SE
9.Aspect oriented
10.Authentication Authorization
11.Blogger System
12.Build
13.Byte Code
14.Cache
15.Chart
16.Chat
17.Code Analyzer
18.Collaboration
19.Content Management System
20.Database Client
21.Database DBMS
22.Database JDBC Connection Pool
23.Database ORM
24.Development
25.EJB Server
26.ERP CRM Financial
27.ESB
28.Forum
29.Game
30.GIS
31.Graphic 3D
32.Graphic Library
33.Groupware
34.HTML Parser
35.IDE
36.IDE Eclipse
37.IDE Netbeans
38.Installer
39.Internationalization Localization
40.Inversion of Control
41.Issue Tracking
42.J2EE
43.J2ME
44.JBoss
45.JMS
46.JMX
47.Library
48.Mail Clients
49.Music
50.Net
51.Parser
52.PDF
53.Portal
54.Profiler
55.Project Management
56.Report
57.RSS RDF
58.Rule Engine
59.Science
60.Scripting
61.Search Engine
62.Security
63.Sevlet Container
64.Source Control
65.Swing Library
66.Template Engine
67.Test Coverage
68.Testing
69.UML
70.Web Crawler
71.Web Framework
72.Web Mail
73.Web Server
74.Web Services
75.Web Services apache cxf 2.2.6
76.Web Services AXIS2
77.Wiki Engine
78.Workflow Engines
79.XML
80.XML UI
Java Source Code / Java Documentation » 6.0 JDK Core » Servlet API by tomcat » javax.servlet.http 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001        /*
002         * Copyright 2004 The Apache Software Foundation
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
017        package javax.servlet.http;
018
019        /**
020         *
021         * Events of this type are either sent to an object that implements
022         * {@link HttpSessionBindingListener} when it is bound or 
023         * unbound from a session, or to a {@link HttpSessionAttributeListener} 
024         * that has been configured in the deployment descriptor when any attribute is
025         * bound, unbound or replaced in a session.
026         *
027         * <p>The session binds the object by a call to
028         * <code>HttpSession.setAttribute</code> and unbinds the object
029         * by a call to <code>HttpSession.removeAttribute</code>.
030         *
031         *
032         *
033         * @author		Various
034         * @version		$Version$
035         * 
036         * @see 		HttpSession
037         * @see 		HttpSessionBindingListener
038         * @see			HttpSessionAttributeListener
039         */
040
041        public class HttpSessionBindingEvent extends HttpSessionEvent {
042
043            /* The name to which the object is being bound or unbound */
044
045            private String name;
046
047            /* The object is being bound or unbound */
048
049            private Object value;
050
051            /**
052             *
053             * Constructs an event that notifies an object that it
054             * has been bound to or unbound from a session. 
055             * To receive the event, the object must implement
056             * {@link HttpSessionBindingListener}.
057             *
058             *
059             *
060             * @param session 	the session to which the object is bound or unbound
061             *
062             * @param name 	the name with which the object is bound or unbound
063             *
064             * @see			#getName
065             * @see			#getSession
066             *
067             */
068
069            public HttpSessionBindingEvent(HttpSession session, String name) {
070                super (session);
071                this .name = name;
072            }
073
074            /**
075             *
076             * Constructs an event that notifies an object that it
077             * has been bound to or unbound from a session. 
078             * To receive the event, the object must implement
079             * {@link HttpSessionBindingListener}.
080             *
081             *
082             *
083             * @param session 	the session to which the object is bound or unbound
084             *
085             * @param name 	the name with which the object is bound or unbound
086             *
087             * @see			#getName
088             * @see			#getSession
089             *
090             */
091
092            public HttpSessionBindingEvent(HttpSession session, String name,
093                    Object value) {
094                super (session);
095                this .name = name;
096                this .value = value;
097            }
098
099            /** Return the session that changed. */
100            public HttpSession getSession() {
101                return super .getSession();
102            }
103
104            /**
105             *
106             * Returns the name with which the attribute is bound to or
107             * unbound from the session.
108             *
109             *
110             * @return		a string specifying the name with which
111             *			the object is bound to or unbound from
112             *			the session
113             *
114             *
115             */
116
117            public String getName() {
118                return name;
119            }
120
121            /**
122             * Returns the value of the attribute that has been added, removed or replaced.
123             * If the attribute was added (or bound), this is the value of the attribute. If the attribute was
124             * removed (or unbound), this is the value of the removed attribute. If the attribute was replaced, this
125             * is the old value of the attribute.
126             *
127             * @since 2.3
128             */
129
130            public Object getValue() {
131                return this.value;
132            }
133
134        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.