-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a way to select which transport is used when multiple exists
- Loading branch information
Showing
6 changed files
with
105 additions
and
2 deletions.
There are no files selected for viewing
17 changes: 17 additions & 0 deletions
17
core/deployment/src/main/java/io/quarkiverse/mcp/server/deployment/McpBuildTimeConfig.java
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package io.quarkiverse.mcp.server.deployment; | ||
|
||
import java.util.Optional; | ||
|
||
import io.quarkus.runtime.annotations.ConfigPhase; | ||
import io.quarkus.runtime.annotations.ConfigRoot; | ||
import io.smallrye.config.ConfigMapping; | ||
|
||
@ConfigMapping(prefix = "quarkus.mcp.server") | ||
@ConfigRoot(phase = ConfigPhase.BUILD_TIME) | ||
public interface McpBuildTimeConfig { | ||
|
||
/** | ||
* If multiple transports extensions are on the classpath, select which one is used | ||
*/ | ||
Optional<String> transport(); | ||
} |
This file contains 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
19 changes: 19 additions & 0 deletions
19
...oyment/src/main/java/io/quarkiverse/mcp/server/deployment/SelectedTransportBuildItem.java
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package io.quarkiverse.mcp.server.deployment; | ||
|
||
import io.quarkus.builder.item.SimpleBuildItem; | ||
|
||
/** | ||
* The selected MCP transport | ||
*/ | ||
public final class SelectedTransportBuildItem extends SimpleBuildItem { | ||
|
||
private final String name; | ||
|
||
public SelectedTransportBuildItem(String name) { | ||
this.name = name; | ||
} | ||
|
||
public String getName() { | ||
return name; | ||
} | ||
} |
19 changes: 19 additions & 0 deletions
19
...yment/src/main/java/io/quarkiverse/mcp/server/deployment/TransportCandidateBuildItem.java
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package io.quarkiverse.mcp.server.deployment; | ||
|
||
import io.quarkus.builder.item.MultiBuildItem; | ||
|
||
/** | ||
* Generated by MCP transport implementations to advertise their existence | ||
*/ | ||
public final class TransportCandidateBuildItem extends MultiBuildItem { | ||
|
||
private final String name; | ||
|
||
public TransportCandidateBuildItem(String name) { | ||
this.name = name; | ||
} | ||
|
||
public String getName() { | ||
return name; | ||
} | ||
} |
This file contains 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
This file contains 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