Class ClientUpgradeResponse
- java.lang.Object
-
- org.eclipse.jetty.websocket.common.UpgradeResponseAdapter
-
- org.eclipse.jetty.websocket.client.ClientUpgradeResponse
-
- All Implemented Interfaces:
UpgradeResponse
@Deprecated(since="2021-05-27") public class ClientUpgradeResponse extends UpgradeResponseAdapter
Deprecated.
-
-
Field Summary
-
Fields inherited from class org.eclipse.jetty.websocket.common.UpgradeResponseAdapter
SEC_WEBSOCKET_PROTOCOL
-
-
Constructor Summary
Constructors Constructor Description ClientUpgradeResponse()
Deprecated.ClientUpgradeResponse(HttpResponse response)
Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description java.util.List<ExtensionConfig>
getExtensions()
Deprecated.Get the list of extensions that should be used for the websocket.boolean
isSuccess()
Deprecated.Test if upgrade response is successful.void
sendForbidden(java.lang.String message)
Deprecated.Issue a forbidden upgrade response.-
Methods inherited from class org.eclipse.jetty.websocket.common.UpgradeResponseAdapter
addHeader, getAcceptedSubProtocol, getHeader, getHeaderNames, getHeaders, getHeaders, getStatusCode, getStatusReason, setAcceptedSubProtocol, setExtensions, setHeader, setStatusCode, setStatusReason, setSuccess
-
-
-
-
Constructor Detail
-
ClientUpgradeResponse
public ClientUpgradeResponse()
Deprecated.
-
ClientUpgradeResponse
public ClientUpgradeResponse(HttpResponse response)
Deprecated.
-
-
Method Detail
-
isSuccess
public boolean isSuccess()
Deprecated.Description copied from interface:UpgradeResponse
Test if upgrade response is successful.Merely notes if the response was sent as a WebSocket Upgrade, or was failed (resulting in no upgrade handshake)
- Specified by:
isSuccess
in interfaceUpgradeResponse
- Overrides:
isSuccess
in classUpgradeResponseAdapter
- Returns:
- true if upgrade response was generated, false if no upgrade response was generated
-
getExtensions
public java.util.List<ExtensionConfig> getExtensions()
Deprecated.Description copied from class:UpgradeResponseAdapter
Get the list of extensions that should be used for the websocket.- Specified by:
getExtensions
in interfaceUpgradeResponse
- Overrides:
getExtensions
in classUpgradeResponseAdapter
- Returns:
- the list of negotiated extensions to use.
-
sendForbidden
public void sendForbidden(java.lang.String message) throws java.io.IOException
Deprecated.Description copied from class:UpgradeResponseAdapter
Issue a forbidden upgrade response.This means that the websocket endpoint was valid, but the conditions to use a WebSocket resulted in a forbidden access.
Use this when the origin or authentication is invalid.
- Specified by:
sendForbidden
in interfaceUpgradeResponse
- Overrides:
sendForbidden
in classUpgradeResponseAdapter
- Parameters:
message
- the short 1 line detail message about the forbidden response- Throws:
java.io.IOException
- if unable to send the forbidden
-
-