StreamResponse

public abstract classStreamResponse

Known direct subclasses
StreamResponse.Message

An event message received during the stream.

StreamResponse.Result

The final result of the computation, marking the end of the stream.


Represents a response from a Server-Sent Event (SSE) stream.

The SSE stream consists of two types of responses:

  • Message: Represents an intermediate event pushed from the server.

  • Result: Represents the final response that signifies the stream has ended.

Summary

Nested types

public final classStreamResponse.Message extendsStreamResponse

An event message received during the stream.

public final classStreamResponse.Result extendsStreamResponse

The final result of the computation, marking the end of the stream.

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-07-21 UTC.