public class ClientUpgradeResponse extends UpgradeResponseAdapter
SEC_WEBSOCKET_PROTOCOL| Constructor and Description |
|---|
ClientUpgradeResponse() |
ClientUpgradeResponse(HttpResponse response) |
| Modifier and Type | Method and Description |
|---|---|
List<ExtensionConfig> |
getExtensions()
Get the list of extensions that should be used for the websocket.
|
boolean |
isSuccess()
Test if upgrade response is successful.
|
void |
sendForbidden(String message)
Issue a forbidden upgrade response.
|
addHeader, getAcceptedSubProtocol, getHeader, getHeaderNames, getHeaders, getHeaders, getStatusCode, getStatusReason, setAcceptedSubProtocol, setExtensions, setHeader, setStatusCode, setStatusReason, setSuccesspublic ClientUpgradeResponse()
public ClientUpgradeResponse(HttpResponse response)
public boolean isSuccess()
UpgradeResponseMerely notes if the response was sent as a WebSocket Upgrade, or was failed (resulting in no upgrade handshake)
isSuccess in interface UpgradeResponseisSuccess in class UpgradeResponseAdapterpublic List<ExtensionConfig> getExtensions()
UpgradeResponseAdaptergetExtensions in interface UpgradeResponsegetExtensions in class UpgradeResponseAdapterpublic void sendForbidden(String message) throws IOException
UpgradeResponseAdapterThis 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.
sendForbidden in interface UpgradeResponsesendForbidden in class UpgradeResponseAdaptermessage - the short 1 line detail message about the forbidden responseIOException - if unable to send the forbiddenCopyright © 2010 - 2020 Adobe. All Rights Reserved