Class ClientUpgradeResponse
- java.lang.Object
-
- org.eclipse.jetty.websocket.common.UpgradeResponseAdapter
-
- org.eclipse.jetty.websocket.client.ClientUpgradeResponse
-
- All Implemented Interfaces:
UpgradeResponse
public class ClientUpgradeResponse extends UpgradeResponseAdapter
-
-
Field Summary
-
Fields inherited from class org.eclipse.jetty.websocket.common.UpgradeResponseAdapter
SEC_WEBSOCKET_PROTOCOL
-
-
Constructor Summary
Constructors Constructor Description ClientUpgradeResponse()
ClientUpgradeResponse(org.eclipse.jetty.client.HttpResponse response)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<ExtensionConfig>
getExtensions()
Get the list of extensions that should be used for the websocket.void
sendForbidden(java.lang.String message)
Issue a forbidden upgrade response.-
Methods inherited from class org.eclipse.jetty.websocket.common.UpgradeResponseAdapter
addHeader, getAcceptedSubProtocol, getHeader, getHeaderNames, getHeaders, getHeaders, getStatusCode, getStatusReason, isSuccess, setAcceptedSubProtocol, setExtensions, setHeader, setStatusCode, setStatusReason, setSuccess
-
-
-
-
Method Detail
-
getExtensions
public java.util.List<ExtensionConfig> getExtensions()
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
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
-
-