Implement java.io.Flushable wherever applicable
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2012 the original author or authors.
|
||||
* Copyright 2002-2013 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -17,6 +17,7 @@
|
||||
package org.springframework.http.server;
|
||||
|
||||
import java.io.Closeable;
|
||||
import java.io.Flushable;
|
||||
import java.io.IOException;
|
||||
|
||||
import org.springframework.http.HttpOutputMessage;
|
||||
@@ -28,7 +29,7 @@ import org.springframework.http.HttpStatus;
|
||||
* @author Arjen Poutsma
|
||||
* @since 3.0
|
||||
*/
|
||||
public interface ServerHttpResponse extends HttpOutputMessage, Closeable {
|
||||
public interface ServerHttpResponse extends HttpOutputMessage, Flushable, Closeable {
|
||||
|
||||
/**
|
||||
* Set the HTTP status code of the response.
|
||||
@@ -37,10 +38,11 @@ public interface ServerHttpResponse extends HttpOutputMessage, Closeable {
|
||||
void setStatusCode(HttpStatus status);
|
||||
|
||||
/**
|
||||
* Ensure the headers and the content of the response are written out. After the first
|
||||
* flush, headers can no longer be changed, only further content writing and flushing
|
||||
* is possible.
|
||||
* Ensure that the headers and the content of the response are written out.
|
||||
* <p>After the first flush, headers can no longer be changed.
|
||||
* Only further content writing and content flushing is possible.
|
||||
*/
|
||||
@Override
|
||||
void flush() throws IOException;
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user