~ubuntu-branches/ubuntu/utopic/jetty/utopic-proposed

« back to all changes in this revision

Viewing changes to examples/test-annotations/src/main/java/com/acme/TestListener.java

  • Committer: Bazaar Package Importer
  • Author(s): Torsten Werner
  • Date: 2009-08-09 08:48:10 UTC
  • Revision ID: james.westby@ubuntu.com-20090809084810-k522b97ind2robyd
ImportĀ upstreamĀ versionĀ 6.1.19

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
//========================================================================
 
2
//$Id: TestListener.java 1692 2007-03-23 04:33:07Z janb $
 
3
//Copyright 2004-2005 Mort Bay Consulting Pty. Ltd.
 
4
//------------------------------------------------------------------------
 
5
//Licensed under the Apache License, Version 2.0 (the "License");
 
6
//you may not use this file except in compliance with the License.
 
7
//You may obtain a copy of the License at 
 
8
//http://www.apache.org/licenses/LICENSE-2.0
 
9
//Unless required by applicable law or agreed to in writing, software
 
10
//distributed under the License is distributed on an "AS IS" BASIS,
 
11
//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 
12
//See the License for the specific language governing permissions and
 
13
//limitations under the License.
 
14
//========================================================================
 
15
 
 
16
package com.acme;
 
17
import javax.annotation.Resource;
 
18
import javax.servlet.ServletContextAttributeEvent;
 
19
import javax.servlet.ServletContextAttributeListener;
 
20
import javax.servlet.ServletContextEvent;
 
21
import javax.servlet.ServletContextListener;
 
22
import javax.servlet.ServletRequestAttributeEvent;
 
23
import javax.servlet.ServletRequestAttributeListener;
 
24
import javax.servlet.ServletRequestEvent;
 
25
import javax.servlet.ServletRequestListener;
 
26
import javax.servlet.http.HttpSessionActivationListener;
 
27
import javax.servlet.http.HttpSessionAttributeListener;
 
28
import javax.servlet.http.HttpSessionBindingEvent;
 
29
import javax.servlet.http.HttpSessionEvent;
 
30
import javax.servlet.http.HttpSessionListener;
 
31
 
 
32
public class TestListener implements HttpSessionListener,  HttpSessionAttributeListener, HttpSessionActivationListener, ServletContextListener, ServletContextAttributeListener, ServletRequestListener, ServletRequestAttributeListener
 
33
{
 
34
 
 
35
    @Resource(mappedName="maxAmount")
 
36
    private Double maxAmount;
 
37
 
 
38
    public void attributeAdded(HttpSessionBindingEvent se)
 
39
    {
 
40
        // System.err.println("attributedAdded "+se);
 
41
    }
 
42
 
 
43
    public void attributeRemoved(HttpSessionBindingEvent se)
 
44
    {
 
45
        // System.err.println("attributeRemoved "+se);
 
46
    }
 
47
 
 
48
    public void attributeReplaced(HttpSessionBindingEvent se)
 
49
    {
 
50
        // System.err.println("attributeReplaced "+se);
 
51
    }
 
52
 
 
53
    public void sessionWillPassivate(HttpSessionEvent se)
 
54
    {
 
55
        // System.err.println("sessionWillPassivate "+se);
 
56
    }
 
57
 
 
58
    public void sessionDidActivate(HttpSessionEvent se)
 
59
    {
 
60
        // System.err.println("sessionDidActivate "+se);
 
61
    }
 
62
 
 
63
    public void contextInitialized(ServletContextEvent sce)
 
64
    {
 
65
        System.err.println("contextInitialized, maxAmount injected as "+maxAmount);
 
66
    }
 
67
 
 
68
    public void contextDestroyed(ServletContextEvent sce)
 
69
    {
 
70
        // System.err.println("contextDestroyed "+sce);
 
71
    }
 
72
 
 
73
    public void attributeAdded(ServletContextAttributeEvent scab)
 
74
    {
 
75
        // System.err.println("attributeAdded "+scab);
 
76
    }
 
77
 
 
78
    public void attributeRemoved(ServletContextAttributeEvent scab)
 
79
    {
 
80
        // System.err.println("attributeRemoved "+scab);
 
81
    }
 
82
 
 
83
    public void attributeReplaced(ServletContextAttributeEvent scab)
 
84
    {
 
85
        // System.err.println("attributeReplaced "+scab);
 
86
    }
 
87
 
 
88
    public void requestDestroyed(ServletRequestEvent sre)
 
89
    {
 
90
        // System.err.println("requestDestroyed "+sre);
 
91
    }
 
92
 
 
93
    public void requestInitialized(ServletRequestEvent sre)
 
94
    {
 
95
        // System.err.println("requestInitialized "+sre);
 
96
    }
 
97
 
 
98
    public void attributeAdded(ServletRequestAttributeEvent srae)
 
99
    {
 
100
        // System.err.println("attributeAdded "+srae);
 
101
    }
 
102
 
 
103
    public void attributeRemoved(ServletRequestAttributeEvent srae)
 
104
    {
 
105
        // System.err.println("attributeRemoved "+srae);
 
106
    }
 
107
 
 
108
    public void attributeReplaced(ServletRequestAttributeEvent srae)
 
109
    {
 
110
        // System.err.println("attributeReplaced "+srae);
 
111
    }
 
112
 
 
113
    public void sessionCreated(HttpSessionEvent se)
 
114
    {
 
115
        // System.err.println("sessionCreated "+se);
 
116
    }
 
117
 
 
118
    public void sessionDestroyed(HttpSessionEvent se)
 
119
    {
 
120
        // System.err.println("sessionDestroyed "+se);
 
121
    }
 
122
 
 
123
}