Interface ServerUpgradeResponse
- All Superinterfaces:
Content.Sink
,Response
- All Known Implementing Classes:
ServerUpgradeResponseDelegate
The HTTP response to upgrade to WebSocket.
An instance of this class is given as a parameter to a
WebSocketCreator
, so that applications can interact
with the response.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.eclipse.jetty.server.Response
Response.Wrapper
-
Method Summary
Modifier and TypeMethodDescriptionvoid
setAcceptedSubProtocol
(String protocol) Set the negotiated sub-protocol.void
setExtensions
(List<ExtensionConfig> configs) Set the list of negotiated extensions.Methods inherited from interface org.eclipse.jetty.server.Response
getHeaders, getRequest, getStatus, getTrailersSupplier, hasLastWrite, isCommitted, isCompletedSuccessfully, reset, setStatus, setTrailersSupplier, write, writeInterim
-
Method Details
-
getAcceptedSubProtocol
String getAcceptedSubProtocol()- Returns:
- the negotiated sub-protocol
-
setAcceptedSubProtocol
Set the negotiated sub-protocol.- Parameters:
protocol
- the negotiated sub-protocol
-
getExtensions
List<ExtensionConfig> getExtensions()- Returns:
- the list of negotiated extensions
-
setExtensions
Set the list of negotiated extensions.- Parameters:
configs
- the list of negotiated extensions
-