public static interface Connection.UpgradeTo
Connection
implementations implement this interface when they
can be upgraded to the protocol they speak (e.g. HTTP/2)
from a different protocol (e.g. HTTP/1.1).
Modifier and Type | Method and Description |
---|---|
void |
onUpgradeTo(java.nio.ByteBuffer buffer)
Invoked during an
upgrade
to receive a buffer containing bytes that have not been consumed by
the upgrade-from connection, and that must be consumed by this
connection. |
void onUpgradeTo(java.nio.ByteBuffer buffer)
Invoked during an upgrade
to receive a buffer containing bytes that have not been consumed by
the upgrade-from connection, and that must be consumed by this
connection.
buffer
- a non-null buffer of unconsumed bytes received from
the upgrade-from connection.
The buffer does not belong to any pool and should be discarded after
having consumed its bytes.Copyright © 1995–2021 Webtide. All rights reserved.