diff --git a/jetty-core/jetty-io/src/main/java/org/eclipse/jetty/io/Connection.java b/jetty-core/jetty-io/src/main/java/org/eclipse/jetty/io/Connection.java index fff714bdc48..be93c742fb5 100644 --- a/jetty-core/jetty-io/src/main/java/org/eclipse/jetty/io/Connection.java +++ b/jetty-core/jetty-io/src/main/java/org/eclipse/jetty/io/Connection.java @@ -140,6 +140,13 @@ public interface Connection extends Closeable void onUpgradeTo(ByteBuffer buffer); } + /** + *

{@link Connection} implementations implement this interface when they + * can be upgraded to a different protocol. For an HTTP request it will read + * content from the request until EOF treating this as bytes over the new + * protocol.

+ *

This is used for the {@code HttpServletRequest#upgrade()} implementation.

+ */ interface Upgrade { void upgrade();