Package org.apache.felix.http.base.internal.registry

## Class EventListenerRegistry

- java.lang.Object
- - org.apache.felix.http.base.internal.registry.EventListenerRegistry

All Implemented Interfaces:
  `EventListener`, `javax.servlet.http.HttpSessionAttributeListener`, `javax.servlet.http.HttpSessionIdListener`, `javax.servlet.http.HttpSessionListener`, `javax.servlet.ServletContextAttributeListener`, `javax.servlet.ServletRequestAttributeListener`, `javax.servlet.ServletRequestListener`

    public final class EventListenerRegistry
    extends Object
    implements javax.servlet.http.HttpSessionListener, javax.servlet.http.HttpSessionAttributeListener, javax.servlet.http.HttpSessionIdListener, javax.servlet.ServletContextAttributeListener, javax.servlet.ServletRequestListener, javax.servlet.ServletRequestAttributeListener

Per context event listener registry.

### Constructor Summary

Constructors
`EventListenerRegistry()`

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods
`void` `addListeners​(@NotNull ListenerHandler handler)` Add listeners
`void` `attributeAdded​(javax.servlet.http.HttpSessionBindingEvent event)`
`void` `attributeAdded​(javax.servlet.ServletContextAttributeEvent event)`
`void` `attributeAdded​(javax.servlet.ServletRequestAttributeEvent srae)`
`void` `attributeRemoved​(javax.servlet.http.HttpSessionBindingEvent event)`
`void` `attributeRemoved​(javax.servlet.ServletContextAttributeEvent event)`
`void` `attributeRemoved​(javax.servlet.ServletRequestAttributeEvent srae)`
`void` `attributeReplaced​(javax.servlet.http.HttpSessionBindingEvent event)`
`void` `attributeReplaced​(javax.servlet.ServletContextAttributeEvent event)`
`void` `attributeReplaced​(javax.servlet.ServletRequestAttributeEvent srae)`
`void` `cleanup()`
`void` `contextDestroyed()`
`static void` `contextDestroyed​(@NotNull ListenerInfo info, @NotNull javax.servlet.ServletContextListener listener, @NotNull javax.servlet.ServletContextEvent event)`
`void` `contextInitialized()`
`static void` `contextInitialized​(@NotNull ListenerInfo info, @NotNull javax.servlet.ServletContextListener listener, @NotNull javax.servlet.ServletContextEvent event)`
`void` `getRuntimeInfo​(org.osgi.service.http.runtime.dto.ServletContextDTO dto, List<org.osgi.service.http.runtime.dto.FailedListenerDTO> failedListenerDTOs)`
`@Nullable ListenerHandler` `getServletContextListener​(@NotNull ListenerInfo info)` Get the listener handler for the listener info
`void` `removeListeners​(@NotNull ListenerInfo info)` Remove listeners
`void` `requestDestroyed​(javax.servlet.ServletRequestEvent sre)`
`void` `requestInitialized​(javax.servlet.ServletRequestEvent sre)`
`void` `sessionCreated​(javax.servlet.http.HttpSessionEvent se)`
`void` `sessionDestroyed​(javax.servlet.http.HttpSessionEvent se)`
`void` `sessionIdChanged​(@NotNull javax.servlet.http.HttpSessionEvent event, @NotNull String oldSessionId)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### EventListenerRegistry

    public EventListenerRegistry()

### Method Detail

#### cleanup

    public void cleanup()

#### addListeners

    public void addListeners​(@NotNull
                             @NotNull ListenerHandler handler)

Add listeners

Parameters:
  `listener` - handler

#### removeListeners

    public void removeListeners​(@NotNull
                                @NotNull ListenerInfo info)

Remove listeners

Parameters:
  `info` -

#### getServletContextListener

    @Nullable
    public @Nullable ListenerHandler getServletContextListener​(@NotNull
                                                               @NotNull ListenerInfo info)

Get the listener handler for the listener info

Parameters:
  `info` - The listener info
Returns:
  The handler or `null`.

#### contextInitialized

    public void contextInitialized()

#### contextDestroyed

    public void contextDestroyed()

#### attributeReplaced

    public void attributeReplaced​(javax.servlet.http.HttpSessionBindingEvent event)

Specified by:
  `attributeReplaced` in interface `javax.servlet.http.HttpSessionAttributeListener`

#### attributeRemoved

    public void attributeRemoved​(javax.servlet.http.HttpSessionBindingEvent event)

Specified by:
  `attributeRemoved` in interface `javax.servlet.http.HttpSessionAttributeListener`

#### attributeAdded

    public void attributeAdded​(javax.servlet.http.HttpSessionBindingEvent event)

Specified by:
  `attributeAdded` in interface `javax.servlet.http.HttpSessionAttributeListener`

#### attributeReplaced

    public void attributeReplaced​(javax.servlet.ServletContextAttributeEvent event)

Specified by:
  `attributeReplaced` in interface `javax.servlet.ServletContextAttributeListener`

#### attributeRemoved

    public void attributeRemoved​(javax.servlet.ServletContextAttributeEvent event)

Specified by:
  `attributeRemoved` in interface `javax.servlet.ServletContextAttributeListener`

#### attributeAdded

    public void attributeAdded​(javax.servlet.ServletContextAttributeEvent event)

Specified by:
  `attributeAdded` in interface `javax.servlet.ServletContextAttributeListener`

#### sessionCreated

    public void sessionCreated​(javax.servlet.http.HttpSessionEvent se)

Specified by:
  `sessionCreated` in interface `javax.servlet.http.HttpSessionListener`

#### sessionDestroyed

    public void sessionDestroyed​(javax.servlet.http.HttpSessionEvent se)

Specified by:
  `sessionDestroyed` in interface `javax.servlet.http.HttpSessionListener`

#### requestDestroyed

    public void requestDestroyed​(javax.servlet.ServletRequestEvent sre)

Specified by:
  `requestDestroyed` in interface `javax.servlet.ServletRequestListener`

#### requestInitialized

    public void requestInitialized​(javax.servlet.ServletRequestEvent sre)

Specified by:
  `requestInitialized` in interface `javax.servlet.ServletRequestListener`

#### attributeAdded

    public void attributeAdded​(javax.servlet.ServletRequestAttributeEvent srae)

Specified by:
  `attributeAdded` in interface `javax.servlet.ServletRequestAttributeListener`

#### attributeRemoved

    public void attributeRemoved​(javax.servlet.ServletRequestAttributeEvent srae)

Specified by:
  `attributeRemoved` in interface `javax.servlet.ServletRequestAttributeListener`

#### attributeReplaced

    public void attributeReplaced​(javax.servlet.ServletRequestAttributeEvent srae)

Specified by:
  `attributeReplaced` in interface `javax.servlet.ServletRequestAttributeListener`

#### sessionIdChanged

    public void sessionIdChanged​(@NotNull
                                 @NotNull javax.servlet.http.HttpSessionEvent event,
                                 @NotNull
                                 @NotNull String oldSessionId)

Specified by:
  `sessionIdChanged` in interface `javax.servlet.http.HttpSessionIdListener`
See Also:
  `HttpSessionIdListener.sessionIdChanged(javax.servlet.http.HttpSessionEvent, java.lang.String)`

#### getRuntimeInfo

    public void getRuntimeInfo​(org.osgi.service.http.runtime.dto.ServletContextDTO dto,
                               List<org.osgi.service.http.runtime.dto.FailedListenerDTO> failedListenerDTOs)

#### contextInitialized

    public static void contextInitialized​(@NotNull
                                          @NotNull ListenerInfo info,
                                          @NotNull
                                          @NotNull javax.servlet.ServletContextListener listener,
                                          @NotNull
                                          @NotNull javax.servlet.ServletContextEvent event)

#### contextDestroyed

    public static void contextDestroyed​(@NotNull
                                        @NotNull ListenerInfo info,
                                        @NotNull
                                        @NotNull javax.servlet.ServletContextListener listener,
                                        @NotNull
                                        @NotNull javax.servlet.ServletContextEvent event)