PR #12186 - add javadoc for Connection.Upgrade

Signed-off-by: Lachlan Roberts <lachlan.p.roberts@gmail.com>
This commit is contained in:
Lachlan Roberts 2024-08-29 12:31:37 +10:00
parent e13b9ad84c
commit c64e0bbbe6
No known key found for this signature in database
GPG Key ID: 5663FB7A8FF7E348
1 changed files with 7 additions and 0 deletions

View File

@ -140,6 +140,13 @@ public interface Connection extends Closeable
void onUpgradeTo(ByteBuffer buffer);
}
/**
* <p>{@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.</p>
* <p>This is used for the {@code HttpServletRequest#upgrade()} implementation.</p>
*/
interface Upgrade
{
void upgrade();