public abstract class ServerWebSocket extends WebSocket
HttpServerInstances of this class are not thread-safe
| Modifier and Type | Field and Description |
|---|---|
java.lang.String |
path
The path the websocket is attempting to connect at
|
binaryHandlerID, textHandlerID| Modifier | Constructor and Description |
|---|---|
protected |
ServerWebSocket(java.lang.String path,
java.lang.String binaryHandlerID,
java.lang.String textHandlerID) |
| Modifier and Type | Method and Description |
|---|---|
abstract void |
reject()
Reject the WebSocket
|
close, closedHandler, writeBinaryFrame, writeTextFrameclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitdataHandler, endHandler, exceptionHandler, pause, resumedrainHandler, exceptionHandler, setWriteQueueMaxSize, writeBuffer, writeQueueFullpublic final java.lang.String path
protected ServerWebSocket(java.lang.String path,
java.lang.String binaryHandlerID,
java.lang.String textHandlerID)
public abstract void reject()
Calling this method from the websocketHandler gives you the opportunity to reject the websocket, which will cause the websocket handshake to fail by returning a 404 response code.
You might use this method, if for example you only want to accept websockets with a particular path.