| Modifier and Type | Field and Description |
|---|---|
| private final HttpServletResponse | |
| private final ServerUpgradeResponse |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | addHeader(String
the header name name, String the header value value)Implements org. Add a header value to the response. |
| public String | getAcceptedSubProtocol()
Implements org. Get the accepted WebSocket protocol. |
| public List | getExtensions()
Implements org. Get the list of extensions that should be used for the websocket. |
| public String | getHeader(String
the header name name)Implements org. Get a header value |
| public Set | getHeaderNames()
Implements org. Get the header names |
| public Map | getHeaders()
Implements org. Get the headers map |
| public List | getHeaders(String
the header name name)Implements org. Get the multi-value header value |
| public int | getStatusCode()
Implements org. Get the HTTP Response Status Code |
| public boolean | isCommitted()
Implements org. Returns a boolean indicating if the response has been committed. |
| public void | sendError(int
the error status code statusCode, String the descriptive message message)Implements org. Sends an error response to the client using the specified status. |
| public void | sendForbidden(String
the short 1 line detail message about the forbidden response message)Implements org. Issue a forbidden upgrade response. |
| public void | setAcceptedSubProtocol(String
the protocol to list as accepted protocol)Implements org. Set the accepted WebSocket Protocol. |
| public void | setExtensions(List<ExtensionConfig>
the list of extensions to use. configs)Implements org. Set the list of extensions that are approved for use with this websocket. |
| public void | setHeader(String
the header name name, String the header value value)Implements org. Set a header Overrides previous value of header (if set) |
| public void | setHeader(String
the header name name, List<String> the header values values)Implements org. Set a header Overrides previous value of header (if set) |
| public void | setStatusCode(int
the status code statusCode)Implements org. Set the HTTP Response status code |
| httpServletResponse | back to summary |
|---|---|
| private final HttpServletResponse httpServletResponse | |
| upgradeResponse | back to summary |
|---|---|
| private final ServerUpgradeResponse upgradeResponse | |
| DelegatedServerUpgradeResponse | back to summary |
|---|---|
| public DelegatedServerUpgradeResponse(ServerUpgradeResponse response) | |
| addHeader | back to summary |
|---|---|
| public void addHeader(String name, String value) Implements org. Doc from org. Add a header value to the response. | |
| getAcceptedSubProtocol | back to summary |
|---|---|
| public String getAcceptedSubProtocol() Implements org. Doc from org. Get the accepted WebSocket protocol. | |
| getExtensions | back to summary |
|---|---|
| public List Implements org. Doc from org. Get the list of extensions that should be used for the websocket.
| |
| getHeader | back to summary |
|---|---|
| public String getHeader(String name) Implements org. Doc from org. Get a header value | |
| getHeaderNames | back to summary |
|---|---|
| public Set Implements org. Doc from org. Get the header names | |
| getHeaders | back to summary |
|---|---|
| public Map Implements org. Doc from org. Get the headers map | |
| getHeaders | back to summary |
|---|---|
| public List Implements org. Doc from org. Get the multi-value header value | |
| getStatusCode | back to summary |
|---|---|
| public int getStatusCode() Implements org. Doc from org. Get the HTTP Response Status Code
| |
| isCommitted | back to summary |
|---|---|
| public boolean isCommitted() Implements org. Doc from org. Returns a boolean indicating if the response has been committed. A committed response has already had its status code and headers written.
| |
| sendError | back to summary |
|---|---|
| public void sendError(int statusCode, String message) throws IOException Implements org. Doc from org. Sends an error response to the client using the specified status.
| |
| sendForbidden | back to summary |
|---|---|
| public void sendForbidden(String message) throws IOException Implements org. Doc from org. 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.
| |
| setAcceptedSubProtocol | back to summary |
|---|---|
| public void setAcceptedSubProtocol(String protocol) Implements org. Doc from org. Set the accepted WebSocket Protocol. | |
| setExtensions | back to summary |
|---|---|
| public void setExtensions(List<ExtensionConfig> configs) Implements org. Doc from org. Set the list of extensions that are approved for use with this websocket. Notes:
| |
| setHeader | back to summary |
|---|---|
| public void setHeader(String name, String value) Implements org. Doc from org. Set a header Overrides previous value of header (if set) | |
| setHeader | back to summary |
|---|---|
| public void setHeader(String name, List<String> values) Implements org. Doc from org. Set a header Overrides previous value of header (if set) | |
| setStatusCode | back to summary |
|---|---|
| public void setStatusCode(int statusCode) Implements org. Doc from org. Set the HTTP Response status code
| |