summaryrefslogtreecommitdiffhomepage
path: root/src/java/nginx/unit/SessionAttrProxy.java
blob: bddeede945105b873367655c63f4a81d879c9631 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
package nginx.unit;

import java.util.List;

import javax.servlet.http.HttpSessionAttributeListener;
import javax.servlet.http.HttpSessionBindingEvent;

public class SessionAttrProxy implements HttpSessionAttributeListener
{
    private final List<HttpSessionAttributeListener> listeners_;

    public SessionAttrProxy(List<HttpSessionAttributeListener> listeners)
    {
        listeners_ = listeners;
    }

    @Override
    public void attributeAdded(HttpSessionBindingEvent event)
    {
        for (HttpSessionAttributeListener l : listeners_) {
            l.attributeAdded(event);
        }
    }

    @Override
    public void attributeRemoved(HttpSessionBindingEvent event)
    {
        for (HttpSessionAttributeListener l : listeners_) {
            l.attributeRemoved(event);
        }
    }

    @Override
    public void attributeReplaced(HttpSessionBindingEvent event)
    {
        for (HttpSessionAttributeListener l : listeners_) {
            l.attributeReplaced(event);
        }
    }
}