Class AdkWebServer.LiveWebSocketHandler
java.lang.Object
org.springframework.web.socket.handler.AbstractWebSocketHandler
org.springframework.web.socket.handler.TextWebSocketHandler
com.google.adk.web.AdkWebServer.LiveWebSocketHandler
- All Implemented Interfaces:
org.springframework.web.socket.WebSocketHandler
- Enclosing class:
AdkWebServer
@Component
public static class AdkWebServer.LiveWebSocketHandler
extends org.springframework.web.socket.handler.TextWebSocketHandler
WebSocket Handler for the /run_live endpoint.
Manages bidirectional communication for live agent interactions. Assumes the
com.google.adk.runner.Runner class has a method: public Flowable<Event> runLive(Session
session, Flowable<LiveRequest> liveRequests, List<String> modalities)
-
Constructor Summary
ConstructorsConstructorDescriptionLiveWebSocketHandler(com.fasterxml.jackson.databind.ObjectMapper objectMapper, BaseSessionService sessionService, AdkWebServer.RunnerService runnerService) -
Method Summary
Modifier and TypeMethodDescriptionvoidafterConnectionClosed(org.springframework.web.socket.WebSocketSession wsSession, org.springframework.web.socket.CloseStatus status) voidafterConnectionEstablished(org.springframework.web.socket.WebSocketSession wsSession) protected voidhandleTextMessage(org.springframework.web.socket.WebSocketSession wsSession, org.springframework.web.socket.TextMessage message) voidhandleTransportError(org.springframework.web.socket.WebSocketSession wsSession, Throwable exception) Methods inherited from class org.springframework.web.socket.handler.TextWebSocketHandler
handleBinaryMessageMethods inherited from class org.springframework.web.socket.handler.AbstractWebSocketHandler
handleMessage, handlePongMessage, supportsPartialMessages
-
Constructor Details
-
LiveWebSocketHandler
@Autowired public LiveWebSocketHandler(com.fasterxml.jackson.databind.ObjectMapper objectMapper, BaseSessionService sessionService, AdkWebServer.RunnerService runnerService)
-
-
Method Details
-
afterConnectionEstablished
public void afterConnectionEstablished(org.springframework.web.socket.WebSocketSession wsSession) throws Exception - Specified by:
afterConnectionEstablishedin interfaceorg.springframework.web.socket.WebSocketHandler- Overrides:
afterConnectionEstablishedin classorg.springframework.web.socket.handler.AbstractWebSocketHandler- Throws:
Exception
-
handleTextMessage
-
handleTransportError
public void handleTransportError(org.springframework.web.socket.WebSocketSession wsSession, Throwable exception) throws Exception - Specified by:
handleTransportErrorin interfaceorg.springframework.web.socket.WebSocketHandler- Overrides:
handleTransportErrorin classorg.springframework.web.socket.handler.AbstractWebSocketHandler- Throws:
Exception
-
afterConnectionClosed
public void afterConnectionClosed(org.springframework.web.socket.WebSocketSession wsSession, org.springframework.web.socket.CloseStatus status) throws Exception - Specified by:
afterConnectionClosedin interfaceorg.springframework.web.socket.WebSocketHandler- Overrides:
afterConnectionClosedin classorg.springframework.web.socket.handler.AbstractWebSocketHandler- Throws:
Exception
-