feat: Refactor GrpcHandler to not use CDI and be more a utility (#219) · bhangun/a2a-java@81b4a6b · GitHub
Skip to content

Commit 81b4a6b

Browse files
authored
feat: Refactor GrpcHandler to not use CDI and be more a utility (a2aproject#219)
1 parent dd29e9b commit 81b4a6b

5 files changed

Lines changed: 115 additions & 78 deletions

File tree

Lines changed: 28 additions & 3 deletions
Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,2 @@
11
quarkus.grpc.clients.a2a-service.host=localhost
2-
quarkus.grpc.clients.a2a-service.port=9001
3-
4-
# The GrpcHandler @ApplicationScoped annotation is not compatible with Quarkus
5-
quarkus.arc.exclude-types=io.a2a.grpc.handler.GrpcHandler
2+
quarkus.grpc.clients.a2a-service.port=9001

tests/server-common/src/test/java/io/a2a/server/apps/common/AgentCardProducer.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,11 @@ public class AgentCardProducer {
1818
@Produces
1919
@PublicAgentCard
2020
public AgentCard agentCard() {
21+
String port = System.getProperty("test.agent.card.port", "8081");
2122
return new AgentCard.Builder()
2223
.name("test-card")
2324
.description("A test agent card")
24-
.url("http://localhost:8081")
25+
.url("http://localhost:" + port)
2526
.version("1.0")
2627
.documentationUrl("http://example.com/docs")
2728
.capabilities(new AgentCapabilities.Builder()

transport/grpc/src/main/java/io/a2a/grpc/handler/GrpcHandler.java

Lines changed: 27 additions & 40 deletions

0 commit comments

Comments
 (0)