public class StandardWebSocketSessionAdapter extends AbstractWebSocketSesssionAdapter<javax.websocket.Session>
Session to WebSocketSession.logger| Constructor and Description |
|---|
StandardWebSocketSessionAdapter() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
closeInternal(CloseStatus status) |
java.lang.String |
getId()
Return a unique session identifier.
|
java.security.Principal |
getPrincipal()
Return a
Principal instance containing the name of the
authenticated user. |
java.lang.String |
getRemoteAddress()
Return the IP address of the endpoint on the other end.
|
java.lang.String |
getRemoteHostName()
Return the host name of the endpoint on the other end.
|
java.net.URI |
getUri()
Return the URI used to open the WebSocket connection.
|
void |
initSession(javax.websocket.Session session) |
boolean |
isOpen()
Return whether the connection is still open.
|
boolean |
isSecure()
Return whether the underlying socket is using a secure transport.
|
protected void |
sendBinaryMessage(BinaryMessage message) |
protected void |
sendTextMessage(TextMessage message) |
void |
setPrincipal(java.security.Principal principal) |
void |
setRemoteAddress(java.lang.String address) |
void |
setRemoteHostName(java.lang.String name) |
void |
setUri(java.net.URI uri) |
close, close, sendMessage, toStringpublic void initSession(javax.websocket.Session session)
initSession in class AbstractWebSocketSesssionAdapter<javax.websocket.Session>public java.lang.String getId()
WebSocketSessionpublic java.net.URI getUri()
WebSocketSessionpublic void setUri(java.net.URI uri)
public boolean isSecure()
WebSocketSessionpublic java.security.Principal getPrincipal()
WebSocketSessionPrincipal instance containing the name of the
authenticated user. If the user has not been authenticated, the method returns
null.public void setPrincipal(java.security.Principal principal)
public java.lang.String getRemoteHostName()
WebSocketSessionpublic void setRemoteHostName(java.lang.String name)
public java.lang.String getRemoteAddress()
WebSocketSessionpublic void setRemoteAddress(java.lang.String address)
public boolean isOpen()
WebSocketSessionprotected void sendTextMessage(TextMessage message) throws java.io.IOException
sendTextMessage in class AbstractWebSocketSesssionAdapter<javax.websocket.Session>java.io.IOExceptionprotected void sendBinaryMessage(BinaryMessage message) throws java.io.IOException
sendBinaryMessage in class AbstractWebSocketSesssionAdapter<javax.websocket.Session>java.io.IOExceptionprotected void closeInternal(CloseStatus status) throws java.io.IOException
closeInternal in class AbstractWebSocketSesssionAdapter<javax.websocket.Session>java.io.IOException