test_class.declarator: notifier
test_class.modifier: private
test_class.original_string: private HttpSessionNotifier notifier;
test_class.type: HttpSessionNotifier
test_class.var_name: notifier
test_class.declarator: session
test_class.modifier: private
test_class.original_string: private RepositoryBackedSession session;
test_class.type: RepositoryBackedSession
test_class.var_name: session
test_class.declarator: descriptor
test_class.modifier: private
test_class.original_string: private ServletContextDescriptor descriptor;
test_class.type: ServletContextDescriptor
test_class.var_name: descriptor
test_class.file: session-replacement/src/test/java/com/amadeus/session/servlet/TestHttpSessionNotifier.java
test_class.identifier: TestHttpSessionNotifier
test_case.body: @Test
    public void testShutdown() {
      HttpSessionListener listener = mock(HttpSessionListener.class);
      descriptor.addHttpSessionListener(listener);
      notifier.sessionDestroyed(session, true);
      verify(listener).sessionDestroyed(any(HttpSessionEvent.class));
      HttpSessionListener listener2 = mock(HttpSessionListener.class);
      descriptor.addHttpSessionListener(listener2);
      notifier.sessionDestroyed(session, true);
      verify(listener, times(2)).sessionDestroyed(any(HttpSessionEvent.class));
      verify(listener2).sessionDestroyed(any(HttpSessionEvent.class));
    }
test_case.class_method_signature: TestHttpSessionNotifier.testShutdown()
test_case.full_signature: @Test public void testShutdown()
test_case.identifier: testShutdown
test_case.invocations: mock addHttpSessionListener sessionDestroyed sessionDestroyed verify any mock addHttpSessionListener sessionDestroyed sessionDestroyed verify times any sessionDestroyed verify any
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testShutdown()
focal_class.declarator: descriptor
focal_class.modifier: private
focal_class.original_string: private ServletContextDescriptor descriptor;
focal_class.type: ServletContextDescriptor
focal_class.var_name: descriptor
focal_class.file: session-replacement/src/main/java/com/amadeus/session/servlet/HttpSessionNotifier.java
focal_class.identifier: HttpSessionNotifier
focal_class.interfaces: implements SessionNotifier
focal_class.class_method_signature: HttpSessionNotifier.HttpSessionNotifier(ServletContextDescriptor descriptor)
focal_class.full_signature:   HttpSessionNotifier(ServletContextDescriptor descriptor)
focal_class.identifier: HttpSessionNotifier
focal_class.parameters: (ServletContextDescriptor descriptor)
focal_class.signature:  HttpSessionNotifier(ServletContextDescriptor descriptor)
focal_class.class_method_signature: HttpSessionNotifier.sessionCreated(RepositoryBackedSession session)
focal_class.full_signature: @Override public void sessionCreated(RepositoryBackedSession session)
focal_class.identifier: sessionCreated
focal_class.modifiers: @Override public
focal_class.parameters: (RepositoryBackedSession session)
focal_class.return: void
focal_class.signature: void sessionCreated(RepositoryBackedSession session)
focal_class.class_method_signature: HttpSessionNotifier.attributeAdded(RepositoryBackedSession session, String key, Object value)
focal_class.full_signature: @Override public void attributeAdded(RepositoryBackedSession session, String key, Object value)
focal_class.identifier: attributeAdded
focal_class.modifiers: @Override public
focal_class.parameters: (RepositoryBackedSession session, String key, Object value)
focal_class.return: void
focal_class.signature: void attributeAdded(RepositoryBackedSession session, String key, Object value)
focal_class.class_method_signature: HttpSessionNotifier.attributeReplaced(RepositoryBackedSession session, String key, Object replacedValue)
focal_class.full_signature: @Override public void attributeReplaced(RepositoryBackedSession session, String key, Object replacedValue)
focal_class.identifier: attributeReplaced
focal_class.modifiers: @Override public
focal_class.parameters: (RepositoryBackedSession session, String key, Object replacedValue)
focal_class.return: void
focal_class.signature: void attributeReplaced(RepositoryBackedSession session, String key, Object replacedValue)
focal_class.class_method_signature: HttpSessionNotifier.attributeRemoved(RepositoryBackedSession session, String key, Object removedValue)
focal_class.full_signature: @Override public void attributeRemoved(RepositoryBackedSession session, String key, Object removedValue)
focal_class.identifier: attributeRemoved
focal_class.modifiers: @Override public
focal_class.parameters: (RepositoryBackedSession session, String key, Object removedValue)
focal_class.return: void
focal_class.signature: void attributeRemoved(RepositoryBackedSession session, String key, Object removedValue)
focal_class.class_method_signature: HttpSessionNotifier.attributeBeingStored(RepositoryBackedSession session, String key, Object value)
focal_class.full_signature: @Override public void attributeBeingStored(RepositoryBackedSession session, String key, Object value)
focal_class.identifier: attributeBeingStored
focal_class.modifiers: @Override public
focal_class.parameters: (RepositoryBackedSession session, String key, Object value)
focal_class.return: void
focal_class.signature: void attributeBeingStored(RepositoryBackedSession session, String key, Object value)
focal_class.class_method_signature: HttpSessionNotifier.attributeHasBeenRestored(RepositoryBackedSession session, String key, Object value)
focal_class.full_signature: @Override public void attributeHasBeenRestored(RepositoryBackedSession session, String key, Object value)
focal_class.identifier: attributeHasBeenRestored
focal_class.modifiers: @Override public
focal_class.parameters: (RepositoryBackedSession session, String key, Object value)
focal_class.return: void
focal_class.signature: void attributeHasBeenRestored(RepositoryBackedSession session, String key, Object value)
focal_class.class_method_signature: HttpSessionNotifier.sessionDestroyed(RepositoryBackedSession session, boolean shutdown)
focal_class.full_signature: @Override public void sessionDestroyed(RepositoryBackedSession session, boolean shutdown)
focal_class.identifier: sessionDestroyed
focal_class.modifiers: @Override public
focal_class.parameters: (RepositoryBackedSession session, boolean shutdown)
focal_class.return: void
focal_class.signature: void sessionDestroyed(RepositoryBackedSession session, boolean shutdown)
focal_class.class_method_signature: HttpSessionNotifier.sessionIdChanged(RepositoryBackedSession session, String oldId)
focal_class.full_signature: @Override public void sessionIdChanged(RepositoryBackedSession session, String oldId)
focal_class.identifier: sessionIdChanged
focal_class.modifiers: @Override public
focal_class.parameters: (RepositoryBackedSession session, String oldId)
focal_class.return: void
focal_class.signature: void sessionIdChanged(RepositoryBackedSession session, String oldId)
focal_method.body: @Override
    public void sessionDestroyed(RepositoryBackedSession session, boolean shutdown) {
      if (session instanceof HttpSession) {
        // We notify all session attribute listeners that each attribute is removed
        for (String key : session.getAttributeNamesWithValues()) {
          HttpSessionBindingEvent event = new HttpSessionBindingEvent((HttpSession)session, key);
          Object value = session.getAttribute(key);
          if (value instanceof HttpSessionBindingListener) {
            ((HttpSessionBindingListener)value).valueUnbound(event);
          }
          for (HttpSessionAttributeListener listener : descriptor.getHttpSessionAttributeListeners()) {
            listener.attributeRemoved(event);
          }
        }
        // Notifying HttpSessionListeners. If we are doing shutdown, as per
        // Servlet specification, we notify listeners in reverse order
        HttpSessionEvent event = new HttpSessionEvent((HttpSession)session);
        if (shutdown) {
          List<HttpSessionListener> listeners = descriptor.getHttpSessionListeners();
          for (int i = listeners.size() - 1; i >= 0; i--) {
            listeners.get(i).sessionDestroyed(event);
          }
        } else {
          for (HttpSessionListener listener : descriptor.getHttpSessionListeners()) {
            listener.sessionDestroyed(event);
          }
        }
      }
    }
focal_method.class_method_signature: HttpSessionNotifier.sessionDestroyed(RepositoryBackedSession session, boolean shutdown)
focal_method.full_signature: @Override public void sessionDestroyed(RepositoryBackedSession session, boolean shutdown)
focal_method.identifier: sessionDestroyed
focal_method.invocations: getAttributeNamesWithValues getAttribute valueUnbound getHttpSessionAttributeListeners attributeRemoved getHttpSessionListeners size sessionDestroyed get getHttpSessionListeners sessionDestroyed
focal_method.modifiers: @Override public
focal_method.parameters: (RepositoryBackedSession session, boolean shutdown)
focal_method.return: void
focal_method.signature: void sessionDestroyed(RepositoryBackedSession session, boolean shutdown)