io.undertow.server.session

## Interface SessionListener

    public interface SessionListener

A listener for session events.

Author:
  Stuart Douglas

### Nested Class Summary

Nested Classes
`static class` `SessionListener.SessionDestroyedReason`

### Method Summary

All Methods Instance Methods Default Methods
`default void` `attributeAdded(Session session, String name, Object value)`
`default void` `attributeRemoved(Session session, String name, Object oldValue)`
`default void` `attributeUpdated(Session session, String name, Object newValue, Object oldValue)`
`default void` `sessionCreated(Session session, HttpServerExchange exchange)` Called when a session is created
`default void` `sessionDestroyed(Session session, HttpServerExchange exchange, SessionListener.SessionDestroyedReason reason)` Called when a session is destroyed
`default void` `sessionIdChanged(Session session, String oldSessionId)`

### Method Detail

#### sessionCreated

    default void sessionCreated(Session session,
                                HttpServerExchange exchange)

Called when a session is created

Parameters:
  `session` - The new session
  `exchange` - The `HttpServerExchange` that created the session

#### sessionDestroyed

    default void sessionDestroyed(Session session,
                                  HttpServerExchange exchange,
                                  SessionListener.SessionDestroyedReason reason)

Called when a session is destroyed

Parameters:
  `session` - The new session
  `exchange` - The `HttpServerExchange` that destroyed the session, or null if the session timed out
  `reason` - The reason why the session was expired

#### attributeAdded

    default void attributeAdded(Session session,
                                String name,
                                Object value)

#### attributeUpdated

    default void attributeUpdated(Session session,
                                  String name,
                                  Object newValue,
                                  Object oldValue)

#### attributeRemoved

    default void attributeRemoved(Session session,
                                  String name,
                                  Object oldValue)

#### sessionIdChanged

    default void sessionIdChanged(Session session,
                                  String oldSessionId)