Package javax.servlet.http

Examples of javax.servlet.http.HttpSessionAttributeListener


        HttpSessionBindingEvent event = new HttpSessionBindingEvent(this, key,
                value);
        Iterator listeners = attributeListeners.iterator();
        while (listeners.hasNext())
        {
            HttpSessionAttributeListener listener = (HttpSessionAttributeListener) listeners
                    .next();
            listener.attributeRemoved(event);
        }
    }
View Full Code Here


        HttpSessionBindingEvent event = new HttpSessionBindingEvent(this, key,
                value);
        Iterator listeners = attributeListeners.iterator();
        while (listeners.hasNext())
        {
            HttpSessionAttributeListener listener = (HttpSessionAttributeListener) listeners
                    .next();
            listener.attributeReplaced(event);
        }
    }
View Full Code Here

    {
        final CountDownLatch addedLatch = new CountDownLatch(1);
        final CountDownLatch removedLatch = new CountDownLatch(1);
        final CountDownLatch replacedLatch = new CountDownLatch(1);

        HttpSessionAttributeListener listener = new HttpSessionAttributeListener()
        {
            @Override
            public void attributeAdded(HttpSessionBindingEvent event)
            {
                addedLatch.countDown();
View Full Code Here

    // ---------- HttpSessionAttributeListener

    public void attributeAdded(final HttpSessionBindingEvent se)
    {
        final HttpSessionAttributeListener attributeDispatcher = getAttributeDispatcher();
        if (attributeDispatcher != null)
        {
            attributeDispatcher.attributeAdded(se);
        }
    }
View Full Code Here

        }
    }

    public void attributeRemoved(final HttpSessionBindingEvent se)
    {
        final HttpSessionAttributeListener attributeDispatcher = getAttributeDispatcher();
        if (attributeDispatcher != null)
        {
            attributeDispatcher.attributeRemoved(se);
        }
    }
View Full Code Here

        }
    }

    public void attributeReplaced(final HttpSessionBindingEvent se)
    {
        final HttpSessionAttributeListener attributeDispatcher = getAttributeDispatcher();
        if (attributeDispatcher != null)
        {
            attributeDispatcher.attributeReplaced(se);
        }
    }
View Full Code Here

            delegateeSessionListener.sessionDestroyed(se);
        }
    }

    public void attributeAdded(HttpSessionBindingEvent se) {
        final HttpSessionAttributeListener delegateeSessionAttributeListener = SlingSessionListener.delegateeSessionAttributeListener;
        if (delegateeSessionAttributeListener != null) {
            delegateeSessionAttributeListener.attributeAdded(se);
        }
    }
View Full Code Here

            delegateeSessionAttributeListener.attributeAdded(se);
        }
    }

    public void attributeRemoved(HttpSessionBindingEvent se) {
        final HttpSessionAttributeListener delegateeSessionAttributeListener = SlingSessionListener.delegateeSessionAttributeListener;
        if (delegateeSessionAttributeListener != null) {
            delegateeSessionAttributeListener.attributeRemoved(se);
        }
    }
View Full Code Here

            delegateeSessionAttributeListener.attributeRemoved(se);
        }
    }

    public void attributeReplaced(HttpSessionBindingEvent se) {
        final HttpSessionAttributeListener delegateeSessionAttributeListener = SlingSessionListener.delegateeSessionAttributeListener;
        if (delegateeSessionAttributeListener != null) {
            delegateeSessionAttributeListener.attributeReplaced(se);
        }
    }
View Full Code Here

        if (listeners == null)
            return;
        for (int i = 0; i < listeners.length; i++) {
            if (!(listeners[i] instanceof HttpSessionAttributeListener))
                continue;
            HttpSessionAttributeListener listener =
                (HttpSessionAttributeListener) listeners[i];
            try {
                if (unbound != null) {
                    fireContainerEvent(context,
                                       "beforeSessionAttributeReplaced",
                                       listener);
                    if (event == null) {
                        event = new HttpSessionBindingEvent
                            (getSession(), name, unbound);
                    }
                    listener.attributeReplaced(event);
                    fireContainerEvent(context,
                                       "afterSessionAttributeReplaced",
                                       listener);
                } else {
                    fireContainerEvent(context,
                                       "beforeSessionAttributeAdded",
                                       listener);
                    if (event == null) {
                        event = new HttpSessionBindingEvent
                            (getSession(), name, value);
                    }
                    listener.attributeAdded(event);
                    fireContainerEvent(context,
                                       "afterSessionAttributeAdded",
                                       listener);
                }
            } catch (Throwable t) {
View Full Code Here

TOP

Related Classes of javax.servlet.http.HttpSessionAttributeListener

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.