Skip to content

Commit e2498c7

Browse files
committed
Remove unused methods/parameters
1 parent ece9af8 commit e2498c7

File tree

2 files changed

+3
-12
lines changed

2 files changed

+3
-12
lines changed

server-common/src/main/java/io/a2a/server/requesthandlers/DefaultRequestHandler.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@
2121
import jakarta.enterprise.context.ApplicationScoped;
2222
import jakarta.inject.Inject;
2323

24-
import org.eclipse.microprofile.config.inject.ConfigProperty;
25-
2624
import io.a2a.server.ServerCallContext;
2725
import io.a2a.server.agentexecution.AgentExecutor;
2826
import io.a2a.server.agentexecution.RequestContext;
@@ -53,11 +51,12 @@
5351
import io.a2a.spec.Task;
5452
import io.a2a.spec.TaskIdParams;
5553
import io.a2a.spec.TaskNotCancelableError;
56-
import io.a2a.spec.TaskState;
5754
import io.a2a.spec.TaskNotFoundError;
5855
import io.a2a.spec.TaskPushNotificationConfig;
5956
import io.a2a.spec.TaskQueryParams;
57+
import io.a2a.spec.TaskState;
6058
import io.a2a.spec.UnsupportedOperationError;
59+
import org.eclipse.microprofile.config.inject.ConfigProperty;
6160
import org.slf4j.Logger;
6261
import org.slf4j.LoggerFactory;
6362

@@ -240,7 +239,7 @@ public EventKind onMessageSend(MessageSendParams params, ServerCallContext conte
240239

241240
// Get agent future before consuming (for blocking calls to wait for agent completion)
242241
CompletableFuture<Void> agentFuture = runningAgents.get(taskId);
243-
etai = resultAggregator.consumeAndBreakOnInterrupt(consumer, blocking, pushNotificationCallback, agentFuture);
242+
etai = resultAggregator.consumeAndBreakOnInterrupt(consumer, blocking);
244243

245244
if (etai == null) {
246245
LOGGER.debug("No result, throwing InternalError");

server-common/src/main/java/io/a2a/server/tasks/ResultAggregator.java

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -106,14 +106,6 @@ public EventKind consumeAll(EventConsumer consumer) throws JSONRPCError {
106106
}
107107

108108
public EventTypeAndInterrupt consumeAndBreakOnInterrupt(EventConsumer consumer, boolean blocking) throws JSONRPCError {
109-
return consumeAndBreakOnInterrupt(consumer, blocking, null, null);
110-
}
111-
112-
public EventTypeAndInterrupt consumeAndBreakOnInterrupt(EventConsumer consumer, boolean blocking, Runnable eventCallback) throws JSONRPCError {
113-
return consumeAndBreakOnInterrupt(consumer, blocking, eventCallback, null);
114-
}
115-
116-
public EventTypeAndInterrupt consumeAndBreakOnInterrupt(EventConsumer consumer, boolean blocking, Runnable eventCallback, CompletableFuture<Void> agentFuture) throws JSONRPCError {
117109
Flow.Publisher<EventQueueItem> allItems = consumer.consumeAll();
118110
AtomicReference<Message> message = new AtomicReference<>();
119111
AtomicBoolean interrupted = new AtomicBoolean(false);

0 commit comments

Comments
 (0)