Class SessionConfig.Builder
java.lang.Object
dev.tachyonmcp.core.server.config.SessionConfig.Builder
- Enclosing class:
SessionConfig
Builder for
SessionConfig.-
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds theSessionConfig.enabled(boolean enabled) Enables server-side sessions.janitorInterval(Duration janitorInterval) Sets the janitor sweep interval.sessionEventStore(@Nullable SessionEventStore store) Sets a custom session event store.sessionIdGenerator(@Nullable SessionIdGenerator<? super io.netty.handler.codec.http.HttpRequest> generator) Sets a custom session id generator (derives the id from the initialize request).sessionStore(@Nullable SessionStore store) Sets a custom session store implementation.sessionTtl(Duration sessionTtl) Sets the session TTL (idle sessions are evicted after this duration).
-
Method Details
-
enabled
Enables server-side sessions. Off by default (the server is stateless), so callers opt in explicitly withenabled(true). -
sessionTtl
Sets the session TTL (idle sessions are evicted after this duration). -
janitorInterval
Sets the janitor sweep interval. -
sessionEventStore
Sets a custom session event store. -
sessionStore
Sets a custom session store implementation. -
sessionIdGenerator
public SessionConfig.Builder sessionIdGenerator(@Nullable SessionIdGenerator<? super io.netty.handler.codec.http.HttpRequest> generator) Sets a custom session id generator (derives the id from the initialize request).nullrestoresSessionIdGenerator.DEFAULT. -
build
Builds theSessionConfig.
-