Top Description Inners Fields Constructors Methods
io.undertow.server.session

public Class SessionAttachmentHandler

extends Object
implements HttpHandler
Class Inheritance
All Implemented Interfaces
io.undertow.server.HttpHandler
Imports
io.undertow.Handlers, .UndertowMessages, io.undertow.server.ExchangeCompletionListener, .HttpHandler, .HttpServerExchange, io.undertow.server.handlers.ResponseCodeHandler

Handler that attaches the session to the request.

This handler is also the place where session cookie configuration properties are configured.

Note

this approach is not used by Servlet, which has its own session handlers

Author
Stuart Douglas

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class

Field Summary

Modifier and TypeField and Description
private volatile HttpHandler
private final SessionConfig
private volatile SessionManager

Constructor Summary

AccessConstructor and Description
public
SessionAttachmentHandler(final SessionManager sessionManager, final SessionConfig sessionConfig)

public
SessionAttachmentHandler(final HttpHandler next, final SessionManager sessionManager, final SessionConfig sessionConfig)

Method Summary

Modifier and TypeMethod and Description
public HttpHandler
public SessionManager
public void
handleRequest(final HttpServerExchange
the HTTP request/response exchange
exchange
)

Implements io.undertow.server.HttpHandler.handleRequest.

Handle the request.

public SessionAttachmentHandler
setNext(final HttpHandler next)

public SessionAttachmentHandler
setSessionManager(final SessionManager sessionManager)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

nextback to summary
private volatile HttpHandler next
sessionConfigback to summary
private final SessionConfig sessionConfig
sessionManagerback to summary
private volatile SessionManager sessionManager

Constructor Detail

SessionAttachmentHandlerback to summary
public SessionAttachmentHandler(final SessionManager sessionManager, final SessionConfig sessionConfig)
SessionAttachmentHandlerback to summary
public SessionAttachmentHandler(final HttpHandler next, final SessionManager sessionManager, final SessionConfig sessionConfig)

Method Detail

getNextback to summary
public HttpHandler getNext()
getSessionManagerback to summary
public SessionManager getSessionManager()
handleRequestback to summary
public void handleRequest(final HttpServerExchange exchange) throws Exception

Implements io.undertow.server.HttpHandler.handleRequest.

Doc from io.undertow.server.HttpHandler.handleRequest.

Handle the request.

Parameters
exchange:HttpServerExchange

the HTTP request/response exchange

Annotations
@Override
setNextback to summary
public SessionAttachmentHandler setNext(final HttpHandler next)
setSessionManagerback to summary
public SessionAttachmentHandler setSessionManager(final SessionManager sessionManager)
io.undertow.server.session back to summary

private Class SessionAttachmentHandler.UpdateLastAccessTimeListener

extends Object
implements ExchangeCompletionListener
Class Inheritance
  • java.lang.Object
  • io.undertow.server.session.SessionAttachmentHandler.UpdateLastAccessTimeListener
All Implemented Interfaces
io.undertow.server.ExchangeCompletionListener

Field Summary

Modifier and TypeField and Description
private final SessionConfig
private final SessionManager

Constructor Summary

AccessConstructor and Description
private
UpdateLastAccessTimeListener(final SessionConfig sessionConfig, final SessionManager sessionManager)

Method Summary

Modifier and TypeMethod and Description
public void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

sessionConfigback to summary
private final SessionConfig sessionConfig
sessionManagerback to summary
private final SessionManager sessionManager

Constructor Detail

UpdateLastAccessTimeListenerback to summary
private UpdateLastAccessTimeListener(final SessionConfig sessionConfig, final SessionManager sessionManager)

Method Detail

exchangeEventback to summary
public void exchangeEvent(final HttpServerExchange exchange, final ExchangeCompletionListener.NextListener next)

Implements io.undertow.server.ExchangeCompletionListener.exchangeEvent.

Annotations
@Override