Examples of HttpSessionEvent


Examples of javax.servlet.http.HttpSessionEvent

    public void sendCreatedNotifies() {
        // Notify session listeners of new session
        for (int n = 0; n < this.sessionListeners.length; n++) {
            ClassLoader cl = Thread.currentThread().getContextClassLoader();
            Thread.currentThread().setContextClassLoader(this.webAppConfig.getLoader());
            this.sessionListeners[n].sessionCreated(new HttpSessionEvent(this));
            Thread.currentThread().setContextClassLoader(cl);
        }
    }
View Full Code Here

Examples of javax.servlet.http.HttpSessionEvent

        }
        // Notify session listeners of invalidated session -- backwards
        for (int n = this.sessionListeners.length - 1; n >= 0; n--) {
            ClassLoader cl = Thread.currentThread().getContextClassLoader();
            Thread.currentThread().setContextClassLoader(this.webAppConfig.getLoader());
            this.sessionListeners[n].sessionDestroyed(new HttpSessionEvent(this));
            Thread.currentThread().setContextClassLoader(cl);
        }

        List keys = new ArrayList(this.sessionData.keySet());
        for (Iterator i = keys.iterator(); i.hasNext();)
View Full Code Here

Examples of javax.servlet.http.HttpSessionEvent

        // Notify session listeners of invalidated session
        for (int n = 0; n < this.sessionActivationListeners.length; n++) {
            ClassLoader cl = Thread.currentThread().getContextClassLoader();
            Thread.currentThread().setContextClassLoader(this.webAppConfig.getLoader());
            this.sessionActivationListeners[n].sessionWillPassivate(
                    new HttpSessionEvent(this));
            Thread.currentThread().setContextClassLoader(cl);
        }

        // Question: Is passivation equivalent to invalidation ? Should all
        // entries be removed ?
View Full Code Here

Examples of javax.servlet.http.HttpSessionEvent

        // Notify session listeners of invalidated session
        for (int n = 0; n < this.sessionActivationListeners.length; n++) {
            ClassLoader cl = Thread.currentThread().getContextClassLoader();
            Thread.currentThread().setContextClassLoader(this.webAppConfig.getLoader());
            this.sessionActivationListeners[n].sessionDidActivate(
                    new HttpSessionEvent(this));
            Thread.currentThread().setContextClassLoader(cl);
        }
    }
View Full Code Here

Examples of javax.servlet.http.HttpSessionEvent

      {
         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];
View Full Code Here

Examples of javax.servlet.http.HttpSessionEvent

            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;
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

      {
         // 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)
View Full Code Here

Examples of javax.servlet.http.HttpSessionEvent

         if (listeners == null)
         {
            listeners = l;
            if (listeners != null)
            {
               HttpSessionEvent event = new HttpSessionEvent(this);
               for (int i = 0; i < listeners.size(); i++)
                  try
                  {
                     ((HttpSessionListener) listeners.get(0)).sessionCreated(event);
                  }
View Full Code Here

Examples of javax.servlet.http.HttpSessionEvent

      private void notifyListeners()
      {
         if (listeners != null)
         {
            HttpSessionEvent event = new HttpSessionEvent(this);
            for (int i = 0; i < listeners.size(); i++)
               try
               {
                  ((HttpSessionListener) listeners.get(i)).sessionDestroyed(event);
               }
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.