Tidy up Netty4 HTTP response interfaces#104675
Conversation
Renames `Netty4RestResponse` to `Netty4HttpResponse` and removes some unused super-interfaces and methods.
|
Pinging @elastic/es-distributed (Team:Distributed) |
| @Override | ||
| public void addHeader(String name, String value) { | ||
| headers().add(name, value); | ||
| } | ||
|
|
||
| @Override | ||
| public boolean containsHeader(String name) { | ||
| return headers().contains(name); | ||
| } |
There was a problem hiding this comment.
Personally I feel it is natural for Netty4HttpResponse to extend HttpResponse so that these methods can be kept at interface level. Or we should have a comment somewhere to explain why future refactor should not make such change.
There was a problem hiding this comment.
I'm currently working on a (possible) enhancement that would allow us to split responses over multiple such messages, for which it only makes sense for the first message in the sequence to extend HttpResponse and carry stuff like headers. If that lands then this'll explain why we've cut down this interface, and if it doesn't then we can pull these back up to the super-interface.
|
FWIW this was opened to prepare things for #104851. |
Renames
Netty4RestResponsetoNetty4HttpResponseand removes someunused super-interfaces and methods.