public class DefaultMcpTransportContext extends Object implements McpTransportContext
McpTransportContext which uses a Thread-safe map.
Objects of this kind are mutable.EMPTY, KEY| Constructor and Description |
|---|
DefaultMcpTransportContext()
Create an empty instance.
|
| Modifier and Type | Method and Description |
|---|---|
McpTransportContext |
copy()
Allows copying the contents.
|
Object |
get(String key)
Extract a value from the context.
|
void |
put(String key,
Object value)
Inserts a value for a given key.
|
public DefaultMcpTransportContext()
public Object get(String key)
McpTransportContextget in interface McpTransportContextkey - the key under the data is expectednull if missing.public void put(String key, Object value)
McpTransportContextput in interface McpTransportContextkey - a String representing the keyvalue - the value to storepublic McpTransportContext copy()
copy in interface McpTransportContextCopyright © 2025. All rights reserved.