refactor: Restructure SDK into subpackages & implement versioned HTTP transport layers#72
Closed
stenalpjolly wants to merge 1 commit into
Closed
Conversation
… transport layers Restructures the Java SDK package layout into domain-specific subpackages: - client - transport - auth - tool - exception Refactors HTTP transport to delegate version-specific initialization and requests to dedicated subclass routers: - HttpMcpTransportV20241105 - HttpMcpTransportV20250326 - HttpMcpTransportV20250618 - HttpMcpTransportV20251125 This establishes the directory layout and class structure for managing versioned transports. TAG=agy CONV=2e1a2106-f882-4b08-92df-a27ba37c6fae
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR restructures the Java SDK package layout into domain-specific subpackages and refactors the HTTP transport layer to delegate version-specific initialization and requests to dedicated subclass routers.
Expectation & Implementation
com.google.cloud.mcpinto subpackages:client,transport,auth,tool, andexception.HttpMcpTransportto check the preferred protocol version during construction and instantiate the corresponding versioned subclass router:HttpMcpTransportV20241105HttpMcpTransportV20250326HttpMcpTransportV20250618HttpMcpTransportV20251125BaseMcpTransportwhich houses shared connection handshake initialization.Test cases
HttpMcpTransportTestto cover the routing behavior and version negotiation.McpCoverageTestto ensure 100% test coverage.Acceptance criteria
google-java-format.Breaking changes
HttpMcpTransportorMcpToolboxClientdirectly will need to update their import statements to reflect the new package layout:com.google.cloud.mcp.HttpMcpTransport->com.google.cloud.mcp.transport.HttpMcpTransportcom.google.cloud.mcp.McpToolboxClient->com.google.cloud.mcp.client.McpToolboxClient