Package io.modelcontextprotocol.spec
Interface McpLoggableSession
- All Superinterfaces:
McpSession
- All Known Implementing Classes:
McpServerSession,McpStreamableServerSession,McpStreamableServerSession.McpStreamableServerSessionStream,MissingMcpTransportSession
An
McpSession which is capable of processing logging notifications and keeping
track of a min logging level.- Author:
- Dariusz Jędrzejczyk
-
Method Summary
Modifier and TypeMethodDescriptionbooleanisNotificationForLevelAllowed(McpSchema.LoggingLevel loggingLevel) Allows checking whether a particular logging level is allowed.voidsetMinLoggingLevel(McpSchema.LoggingLevel minLoggingLevel) Set the minimum logging level for the client.Methods inherited from interface io.modelcontextprotocol.spec.McpSession
close, closeGracefully, sendNotification, sendNotification, sendRequest
-
Method Details
-
setMinLoggingLevel
Set the minimum logging level for the client. Messages below this level will be filtered out.- Parameters:
minLoggingLevel- The minimum logging level
-
isNotificationForLevelAllowed
Allows checking whether a particular logging level is allowed.- Parameters:
loggingLevel- the level to check- Returns:
- whether the logging at the specified level is permitted.
-