Class JenkinsMcpContext
java.lang.Object
io.jenkins.plugins.mcp.server.tool.JenkinsMcpContext
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidclear()Clears the JenkinsMcpContext for the current thread to prevent memory leaks.static JenkinsMcpContextget()Gets the JenkinsMcpContext for the current thread.
-
Constructor Details
-
JenkinsMcpContext
public JenkinsMcpContext()
-
-
Method Details
-
get
Gets the JenkinsMcpContext for the current thread. Creates a new one if it doesn't exist.- Returns:
- The thread-local JenkinsMcpContext instance.
-
clear
public static void clear()Clears the JenkinsMcpContext for the current thread to prevent memory leaks.
-