use of io.undertow.server.session.SessionConfig in project wildfly by wildfly.
the class DistributableSession method invalidate.
@Override
public void invalidate(HttpServerExchange exchange) {
Map.Entry<Session<LocalSessionContext>, SessionConfig> entry = this.entry;
Session<LocalSessionContext> session = entry.getKey();
validate(session);
// Invoke listeners outside of the context of the batch associated with this session
this.manager.getSessionListeners().sessionDestroyed(this, exchange, SessionDestroyedReason.INVALIDATED);
try (BatchContext context = this.manager.getSessionManager().getBatcher().resumeBatch(this.batch)) {
session.invalidate();
if (exchange != null) {
String id = session.getId();
entry.getValue().clearSession(exchange, id);
}
this.batch.close();
} finally {
this.closeTask.run();
}
}
Aggregations