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.
|
void |
sendForbidden(String message)
Issue a forbidden upgrade response.
|
addHeader, getAcceptedSubProtocol, getHeader, getHeaderNames, getHeaders, getHeaders, getStatusCode, getStatusReason, isSuccess, setAcceptedSubProtocol, setExtensions, setHeader, setStatusCode, setStatusReason, setSuccess
public ClientUpgradeResponse()
public ClientUpgradeResponse(HttpResponse response)
public List<ExtensionConfig> getExtensions()
UpgradeResponseAdapter
getExtensions
in interface UpgradeResponse
getExtensions
in class UpgradeResponseAdapter
public void sendForbidden(String message) throws IOException
UpgradeResponseAdapter
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.
sendForbidden
in interface UpgradeResponse
sendForbidden
in class UpgradeResponseAdapter
message
- the short 1 line detail message about the forbidden responseIOException
- if unable to send the forbiddenCopyright © 1995–2017 Webtide. All rights reserved.