| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public boolean | Returns: a boolean indicating if the response has been committed.Returns a boolean indicating if the response has been committed. |
| public void | |
| public void | sendForbidden(String
the short 1 line detail message about the forbidden response message)Issue a forbidden upgrade response. |
| public void | setAcceptedSubProtocol(String
the protocol to list as accepted protocol)Set the accepted WebSocket Protocol. |
| public void | setExtensions(List<ExtensionConfig>
the list of extensions to use. extensions)Set the list of extensions that are approved for use with this websocket. |
| public void | |
| public void | |
| public void |
| addHeader | back to summary |
|---|---|
| public void addHeader(String name, String value) Add a header value to the response. | |
| isCommitted | back to summary |
|---|---|
| public boolean isCommitted() 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 Sends an error response to the client using the specified status.
| |
| sendForbidden | back to summary |
|---|---|
| public void sendForbidden(String message) throws IOException 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) Set the accepted WebSocket Protocol.
| |
| setExtensions | back to summary |
|---|---|
| public void setExtensions(List<ExtensionConfig> extensions) 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) Set a header Overrides previous value of header (if set) | |
| setHeader | back to summary |
|---|---|
| public void setHeader(String name, List<String> values) Set a header Overrides previous value of header (if set) | |
| setStatusCode | back to summary |
|---|---|
| public void setStatusCode(int statusCode) Set the HTTP Response status code
| |