Package org.eclipse.jetty.io
Interface Connection.UpgradeTo
-
- All Known Implementing Classes:
AbstractWebSocketConnection,ConnectHandler.DownstreamConnection,HTTP2ServerConnection,HttpConnection,SslConnection,WebSocketClientConnection,WebSocketServerConnection
- Enclosing interface:
- Connection
public static interface Connection.UpgradeToConnectionimplementations 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).
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidonUpgradeTo(java.nio.ByteBuffer buffer)Invoked during anupgradeto receive a buffer containing bytes that have not been consumed by the upgrade-from connection, and that must be consumed by this connection.
-
-
-
Method Detail
-
onUpgradeTo
void onUpgradeTo(java.nio.ByteBuffer buffer)
Invoked during an
upgradeto receive a buffer containing bytes that have not been consumed by the upgrade-from connection, and that must be consumed by this connection.- Parameters:
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.
-
-