Package org.springframework.security.core.session

# Class SessionIdChangedEvent

java.lang.Object
java.util.EventObject
org.springframework.context.ApplicationEvent
org.springframework.security.core.session.AbstractSessionEvent
org.springframework.security.core.session.SessionIdChangedEvent

All Implemented Interfaces:
  `Serializable`

public abstract class SessionIdChangedEvent extends AbstractSessionEvent
Generic "session ID changed" event which indicates that a session identifier (potentially represented by a security context) has changed.

Since:
  5.4
See Also:
  - Serialized Form

## Field Summary

### Fields inherited from class java.util.EventObject

`source`

## Constructor Summary

Constructors
Constructor
Description
`SessionIdChangedEvent(Object source)`

## Method Summary

Modifier and Type
Method
Description
`abstract String`
`getNewSessionId()`
Returns the new session ID.
`abstract String`
`getOldSessionId()`
Returns the old session ID.

### Methods inherited from class org.springframework.context.ApplicationEvent

`getTimestamp`

### Methods inherited from class java.util.EventObject

`getSource, toString`

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

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

## Constructor Details

### SessionIdChangedEvent

public SessionIdChangedEvent(Object source)

## Method Details

### getOldSessionId

public abstract String getOldSessionId()
Returns the old session ID.

Returns:
  the identifier that was previously associated with the session.

### getNewSessionId

public abstract String getNewSessionId()
Returns the new session ID.

Returns:
  the new identifier that is associated with the session.