Flush JSON stream after each element

Issue: SPR-15104
This commit is contained in:
Sebastien Deleuze
2017-02-13 13:58:39 +01:00
parent 45770d73ed
commit ef550c43d6
5 changed files with 48 additions and 10 deletions

View File

@@ -31,6 +31,13 @@ import org.springframework.util.MimeType;
*/
public abstract class AbstractEncoder<T> implements Encoder<T> {
/**
* Hint key to use with a {@link FlushingStrategy} value.
*/
public static final String FLUSHING_STRATEGY_HINT = AbstractEncoder.class.getName() + ".flushingStrategy";
public enum FlushingStrategy { AUTO, AFTER_EACH_ELEMENT }
private final List<MimeType> encodableMimeTypes;