Top Description Fields Constructors Methods
io.undertow.servlet.handlers

public Class CrawlerSessionManagerHandler

Additional top-level class in compilation unit: CrawlerBindingListener.

extends Object
implements HttpHandler
Class Inheritance
All Implemented Interfaces
io.undertow.server.HttpHandler
Imports
java.io.Serializable, java.util.Iterator, .Map, java.util.concurrent.ConcurrentHashMap, java.util.regex.Pattern, jakarta.servlet.http.HttpSession, .HttpSessionBindingEvent, .HttpSessionBindingListener, io.undertow.UndertowLogger, io.undertow.server.ExchangeCompletionListener, .HttpHandler, .HttpServerExchange, io.undertow.servlet.api.CrawlerSessionManagerConfig, io.undertow.util.HeaderValues, .Headers

Web crawlers can trigger the creation of many thousands of sessions as they crawl a site which may result in significant memory consumption. This Valve ensures that crawlers are associated with a single session - just like normal users - regardless of whether or not they provide a session token with their requests.

Field Summary

Modifier and TypeField and Description
private final Map<String, String>
private final CrawlerSessionManagerConfig
private final HttpHandler
private static final String
private final Map<String, String>
private final Pattern

Constructor Summary

AccessConstructor and Description
public

Method Summary

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

Implements io.undertow.server.HttpHandler.handleRequest.

Handle the request.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

clientIpSessionIdback to summary
private final Map<String, String> clientIpSessionId
configback to summary
private final CrawlerSessionManagerConfig config
nextback to summary
private final HttpHandler next
SESSION_ATTRIBUTE_NAMEback to summary
private static final String SESSION_ATTRIBUTE_NAME
sessionIdClientIpback to summary
private final Map<String, String> sessionIdClientIp
uaPatternback to summary
private final Pattern uaPattern

Constructor Detail

CrawlerSessionManagerHandlerback to summary
public CrawlerSessionManagerHandler(CrawlerSessionManagerConfig config, HttpHandler next)

Method Detail

handleRequestback to summary
public void handleRequest(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