public abstract class AbstractWebSocketSesssionAdapter<T> extends Object implements ConfigurableWebSocketSession
WebSocketSession.| Constructor and Description |
|---|
AbstractWebSocketSesssionAdapter() |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close the WebSocket connection with status 1000, i.e.
|
void |
close(CloseStatus status)
Close the WebSocket connection with the given close status.
|
protected abstract void |
closeInternal(CloseStatus status) |
abstract void |
initSession(T session) |
protected abstract void |
sendBinaryMessage(BinaryMessage message) |
void |
sendMessage(WebSocketMessage message)
Send a WebSocket message either
TextMessage or
BinaryMessage. |
protected abstract void |
sendTextMessage(TextMessage message) |
String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitsetPrincipal, setRemoteAddress, setRemoteHostName, setUrigetId, getPrincipal, getRemoteAddress, getRemoteHostName, getUri, isOpen, isSecureprotected final Log logger
public abstract void initSession(T session)
public final void sendMessage(WebSocketMessage message) throws IOException
WebSocketSessionTextMessage or
BinaryMessage.sendMessage in interface WebSocketSessionIOExceptionprotected abstract void sendTextMessage(TextMessage message) throws IOException
IOExceptionprotected abstract void sendBinaryMessage(BinaryMessage message) throws IOException
IOExceptionpublic void close()
throws IOException
WebSocketSessionsession.close(CloseStatus.NORMAL);
close in interface WebSocketSessionIOExceptionpublic final void close(CloseStatus status) throws IOException
WebSocketSessionclose in interface WebSocketSessionIOExceptionprotected abstract void closeInternal(CloseStatus status) throws IOException
IOException