Examples of HttpSessionEvent


Examples of javax.servlet.http.HttpSessionEvent

        // Notify interested session event listeners
        fireSessionEvent(Session.SESSION_PASSIVATED_EVENT, null);

        // Notify ActivationListeners
        HttpSessionEvent event = null;
        String keys[] = keys();
        for (int i = 0; i < keys.length; i++) {
            Object attribute = attributes.get(keys[i]);
            if (attribute instanceof HttpSessionActivationListener) {
                if (event == null)
                    event = new HttpSessionEvent(getSession());
                try {
                    ((HttpSessionActivationListener)attribute)
                        .sessionWillPassivate(event);
                } catch (Throwable t) {
                    manager.getContainer().getLogger().error
View Full Code Here

Examples of javax.servlet.http.HttpSessionEvent

       
        // Notify interested session event listeners
        fireSessionEvent(Session.SESSION_ACTIVATED_EVENT, null);

        // Notify ActivationListeners
        HttpSessionEvent event = null;
        String keys[] = keys();
        for (int i = 0; i < keys.length; i++) {
            Object attribute = attributes.get(keys[i]);
            if (attribute instanceof HttpSessionActivationListener) {
                if (event == null)
                    event = new HttpSessionEvent(getSession());
                try {
                    ((HttpSessionActivationListener)attribute)
                        .sessionDidActivate(event);
                } catch (Throwable t) {
                    manager.getContainer().getLogger().error
View Full Code Here

Examples of javax.servlet.http.HttpSessionEvent

        // Notify interested application event listeners
        if (notificationPolicy.isHttpSessionListenerInvocationAllowed(this.clusterStatus, cause, true)) {
            Context context = (Context) manager.getContainer();
            Object[] lifecycleListeners = context.getApplicationSessionLifecycleListeners();
            if (lifecycleListeners != null) {
                HttpSessionEvent event = new HttpSessionEvent(getSession());
                for (int i = 0; i < lifecycleListeners.length; i++) {
                    if (!(lifecycleListeners[i] instanceof HttpSessionListener))
                        continue;
                    HttpSessionListener listener = (HttpSessionListener) lifecycleListeners[i];
                    try {
View Full Code Here

Examples of javax.servlet.http.HttpSessionEvent

                // FIXME - Assumes we call listeners in reverse order
                Context context = (Context) manager.getContainer();
                Object[] lifecycleListeners = context.getApplicationSessionLifecycleListeners();
                if (notify && (lifecycleListeners != null)
                        && notificationPolicy.isHttpSessionListenerInvocationAllowed(this.clusterStatus, cause, localCall)) {
                    HttpSessionEvent event = new HttpSessionEvent(getSession());
                    for (int i = 0; i < lifecycleListeners.length; i++) {
                        int j = (lifecycleListeners.length - 1) - i;
                        if (!(lifecycleListeners[j] instanceof HttpSessionListener))
                            continue;
                        HttpSessionListener listener = (HttpSessionListener) lifecycleListeners[j];
View Full Code Here

Examples of javax.servlet.http.HttpSessionEvent

        if (hasActivationListener != Boolean.FALSE) {
            boolean hasListener = false;

            // Notify ActivationListeners
            HttpSessionEvent event = null;
            String[] keys = keys();
            Map<String, Object> attrs = getAttributesInternal();
            for (int i = 0; i < keys.length; i++) {
                Object attribute = attrs.get(keys[i]);
                if (attribute instanceof HttpSessionActivationListener) {
                    hasListener = true;

                    if (notificationPolicy.isHttpSessionActivationListenerInvocationAllowed(this.clusterStatus, cause, keys[i])) {
                        if (event == null)
                            event = new HttpSessionEvent(getSession());

                        try {
                            ((HttpSessionActivationListener) attribute).sessionWillPassivate(event);
                        } catch (Throwable t) {
                            manager.getContainer().getLogger().error(MESSAGES.errorSessionActivationEvent(t));
View Full Code Here

Examples of javax.servlet.http.HttpSessionEvent

        if (hasActivationListener != Boolean.FALSE) {
            // Notify ActivationListeners

            boolean hasListener = false;

            HttpSessionEvent event = null;
            String[] keys = keys();
            Map<String, Object> attrs = getAttributesInternal();
            for (int i = 0; i < keys.length; i++) {
                Object attribute = attrs.get(keys[i]);
                if (attribute instanceof HttpSessionActivationListener) {
                    hasListener = true;

                    if (notificationPolicy.isHttpSessionActivationListenerInvocationAllowed(this.clusterStatus, cause, keys[i])) {
                        if (event == null)
                            event = new HttpSessionEvent(getSession());
                        try {
                            ((HttpSessionActivationListener) attribute).sessionDidActivate(event);
                        } catch (Throwable t) {
                            manager.getContainer().getLogger().error(MESSAGES.errorSessionActivationEvent(t));
                        }
View Full Code Here

Examples of javax.servlet.http.HttpSessionEvent

      {
         Context context = (Context) manager.getContainer();
         Object lifecycleListeners[] = context.getApplicationLifecycleListeners();
         if (lifecycleListeners != null)
         {
            HttpSessionEvent event = new HttpSessionEvent(getSession());
            for (int i = 0; i < lifecycleListeners.length; i++)
            {
               if (!(lifecycleListeners[i] instanceof HttpSessionListener))
                  continue;
               HttpSessionListener listener = (HttpSessionListener) lifecycleListeners[i];
View Full Code Here

Examples of javax.servlet.http.HttpSessionEvent

         Object lifecycleListeners[] = context.getApplicationLifecycleListeners();
         if (notify
               && (lifecycleListeners != null)
               && notificationPolicy.isHttpSessionListenerInvocationAllowed(this.clusterStatus, cause, localCall))
         {
            HttpSessionEvent event =
               new HttpSessionEvent(getSession());
            for (int i = 0; i < lifecycleListeners.length; i++)
            {
               int j = (lifecycleListeners.length - 1) - i;
               if (!(lifecycleListeners[j] instanceof HttpSessionListener))
                  continue;
View Full Code Here

Examples of javax.servlet.http.HttpSessionEvent

      if (hasActivationListener != Boolean.FALSE)
      {
         boolean hasListener = false;
        
         // Notify ActivationListeners
         HttpSessionEvent event = null;
         String keys[] = keys();
         Map<String, Object> attrs = getAttributesInternal();
         for (int i = 0; i < keys.length; i++)
         {
            Object attribute = attrs.get(keys[i]);
            if (attribute instanceof HttpSessionActivationListener)
            {
               hasListener = true;
              
               if (notificationPolicy.isHttpSessionActivationListenerInvocationAllowed(this.clusterStatus, cause, keys[i]))
               {                 
                  if (event == null)
                     event = new HttpSessionEvent(getSession());
                 
                  try
                  {
                     ((HttpSessionActivationListener)attribute).sessionWillPassivate(event);
                  }
View Full Code Here

Examples of javax.servlet.http.HttpSessionEvent

            this.<ServletRequestAttributeListener>get(listener).attributeReplaced(sre);
        }
    }

    public void sessionCreated(final HttpSession session) {
        final HttpSessionEvent sre = new HttpSessionEvent(session);
        for (final ManagedListener listener : httpSessionListeners) {
            this.<HttpSessionListener>get(listener).sessionCreated(sre);
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.