fix(server): expose event processor startup · a2aproject/a2a-java@4b6eac7 · GitHub
Skip to content

Commit 4b6eac7

Browse files
committed
fix(server): expose event processor startup
1 parent e2d6011 commit 4b6eac7

3 files changed

Lines changed: 35 additions & 16 deletions

File tree

‎docs/content/dev/server.md‎

Lines changed: 32 additions & 0 deletions

‎server-common/src/main/java/org/a2aproject/sdk/server/events/MainEventBusProcessor.java‎

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ int pushNotificationChainCount() {
158158

159159
@SuppressWarnings("NullAway.Init")
160160
@PostConstruct
161-
synchronized void start() {
161+
public synchronized void start() {
162162
if (processorThread != null && processorThread.isAlive()) {
163163
LOGGER.debug("MainEventBusProcessor already started");
164164
return;
@@ -170,17 +170,6 @@ synchronized void start() {
170170
LOGGER.info("MainEventBusProcessor started");
171171
}
172172

173-
/**
174-
* Ensures the background processor thread has been started.
175-
* <p>
176-
* In CDI runtimes, this forces proxy resolution and {@link PostConstruct}. For manual
177-
* wiring, this starts the processor directly.
178-
* </p>
179-
*/
180-
public void ensureStarted() {
181-
start();
182-
}
183-
184173
@PreDestroy
185174
synchronized void stop() {
186175
LOGGER.info("MainEventBusProcessor stopping...");

‎server-common/src/main/java/org/a2aproject/sdk/server/events/MainEventBusProcessorInitializer.java‎

Lines changed: 2 additions & 4 deletions

0 commit comments

Comments
 (0)