io.undertow.server.session

## Class SessionAttachmentHandler

- java.lang.Object
- - io.undertow.server.session.SessionAttachmentHandler

All Implemented Interfaces:
  HttpHandler

    public class SessionAttachmentHandler
    extends Object
    implements HttpHandler

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

### Constructor Summary

Constructors
Constructor and Description
`SessionAttachmentHandler(HttpHandler next, SessionManager sessionManager, SessionConfig sessionConfig)`
`SessionAttachmentHandler(SessionManager sessionManager, SessionConfig sessionConfig)`

### Method Summary

All Methods Instance Methods Concrete Methods
`HttpHandler` `getNext()`
`SessionManager` `getSessionManager()`
`void` `handleRequest(HttpServerExchange exchange)` Handle the request.
`SessionAttachmentHandler` `setNext(HttpHandler next)`
`SessionAttachmentHandler` `setSessionManager(SessionManager sessionManager)`

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

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

### Constructor Detail

#### SessionAttachmentHandler

    public SessionAttachmentHandler(SessionManager sessionManager,
                                    SessionConfig sessionConfig)

#### SessionAttachmentHandler

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

### Method Detail

#### handleRequest

    public void handleRequest(HttpServerExchange exchange)
                       throws Exception

Description copied from interface: `HttpHandler`
Handle the request.

Specified by:
  `handleRequest` in interface `HttpHandler`
Parameters:
  `exchange` - the HTTP request/response exchange
Throws:
  `Exception`

#### getNext

    public HttpHandler getNext()

#### setNext

    public SessionAttachmentHandler setNext(HttpHandler next)

#### getSessionManager

    public SessionManager getSessionManager()

#### setSessionManager

    public SessionAttachmentHandler setSessionManager(SessionManager sessionManager)