public class JettyWebSocketSessionAdapter extends AbstractWebSocketSesssionAdapter<org.eclipse.jetty.websocket.api.Session>
Session to
WebSocketSession.logger| Constructor and Description |
|---|
JettyWebSocketSessionAdapter() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
closeInternal(CloseStatus status) |
String |
getId()
Return a unique session identifier.
|
Principal |
getPrincipal()
Return a
Principal instance containing the name of the
authenticated user. |
String |
getRemoteAddress()
Return the IP address of the endpoint on the other end.
|
String |
getRemoteHostName()
Return the host name of the endpoint on the other end.
|
URI |
getUri()
Return the URI used to open the WebSocket connection.
|
void |
initSession(org.eclipse.jetty.websocket.api.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(Principal principal) |
void |
setRemoteAddress(String address) |
void |
setRemoteHostName(String address) |
void |
setUri(URI uri) |
close, close, sendMessage, toStringpublic void initSession(org.eclipse.jetty.websocket.api.Session session)
initSession in class AbstractWebSocketSesssionAdapter<org.eclipse.jetty.websocket.api.Session>public String getId()
WebSocketSessionpublic boolean isSecure()
WebSocketSessionpublic URI getUri()
WebSocketSessionpublic void setUri(URI uri)
public 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(Principal principal)
public String getRemoteHostName()
WebSocketSessionpublic void setRemoteHostName(String address)
public String getRemoteAddress()
WebSocketSessionpublic void setRemoteAddress(String address)
public boolean isOpen()
WebSocketSessionprotected void sendTextMessage(TextMessage message) throws IOException
sendTextMessage in class AbstractWebSocketSesssionAdapter<org.eclipse.jetty.websocket.api.Session>IOExceptionprotected void sendBinaryMessage(BinaryMessage message) throws IOException
sendBinaryMessage in class AbstractWebSocketSesssionAdapter<org.eclipse.jetty.websocket.api.Session>IOExceptionprotected void closeInternal(CloseStatus status) throws IOException
closeInternal in class AbstractWebSocketSesssionAdapter<org.eclipse.jetty.websocket.api.Session>IOException