Top Description Methods
org.springframework.web.servlet.mvc.method.annotation

public Interface StreamingResponseBody

Annotations
@FunctionalInterface
Imports
java.io.IOException, .OutputStream

A controller method return value type for asynchronous request processing where the application can write directly to the response OutputStream without holding up the Servlet container thread.

Note

when using this option it is highly recommended to configure explicitly the TaskExecutor used in Spring MVC for executing asynchronous requests. Both the MVC Java config and the MVC namespaces provide options to configure asynchronous handling. If not using those, an application can set the taskExecutor property of RequestMappingHandlerAdapter.

Author
Rossen Stoyanchev
Since
4.2

Method Summary

Modifier and TypeMethod and Description
public void
writeTo(OutputStream
the stream for the response body
outputStream
)

A callback for writing to the response body.

Method Detail

writeToback to summary
public void writeTo(OutputStream outputStream) throws IOException

A callback for writing to the response body.

Parameters
outputStream:OutputStream

the stream for the response body

Exceptions
IOException:
an exception while writing