- 使用 Spring Initializr 创建 Spring Boot 应用程序
- 在Spring Boot中配置Cassandra
- 在 Spring Boot 上配置 Tomcat 连接池
- 将Camel消息路由到嵌入WildFly的Artemis上
本文整理了Java中org.apache.tomcat.websocket.WsSession.getId()
方法的一些代码示例,展示了WsSession.getId()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WsSession.getId()
方法的具体详情如下:
包路径:org.apache.tomcat.websocket.WsSession
类名称:WsSession
方法名:getId
暂无
代码示例来源:origin: Red5/red5-plugins
/**
* Returns the WsSession id associated with this connection.
*
* @return sessionId
*/
public String getSessionId() {
return wsSession.getId();
}
代码示例来源:origin: Red5/red5-plugins
@Override
public String toString() {
if (wsSession != null && connected.get()) {
return "WebSocketConnection [wsId=" + wsSession.getId() + ", sessionId=" + httpSessionId + ", host=" + host + ", origin=" + origin + ", path=" + path + ", secure=" + isSecure() + ", connected=" + connected + "]";
}
if (wsSession == null) {
return "WebSocketConnection [wsId=not-set, sessionId=not-set, host=" + host + ", origin=" + origin + ", path=" + path + ", secure=not-set, connected=" + connected + "]";
}
return "WebSocketConnection [host=" + host + ", origin=" + origin + ", path=" + path + " connected=false]";
}
代码示例来源:origin: Red5/red5-plugins
httpSessionId = Optional.ofNullable(wsSession.getHttpSessionId()).orElse(wsSession.getId());
代码示例来源:origin: Red5/red5-plugins
/**
* {@inheritDoc}
*
* Overridden to make it visible to other classes in this package.
*/
@Override
protected void unregisterSession(Endpoint endpoint, WsSession wsSession) {
if (wsSession.getUserPrincipal() != null && wsSession.getHttpSessionId() != null) {
unregisterAuthenticatedSession(wsSession, wsSession.getHttpSessionId());
}
super.unregisterSession(endpoint, wsSession);
log.debug("unregisterSession: {} endpoint: {}", wsSession.getId(), endpoint);
}
代码示例来源:origin: codefollower/Tomcat-Research
/**
* Cleans up the resources still in use by WebSocket sessions created from
* this container. This includes closing sessions and cancelling
* {@link Future}s associated with blocking read/writes.
*/
public void destroy() {
CloseReason cr = new CloseReason(
CloseCodes.GOING_AWAY, sm.getString("wsWebSocketContainer.shutdown"));
for (WsSession session : sessions.keySet()) {
try {
session.close(cr);
} catch (IOException ioe) {
log.debug(sm.getString(
"wsWebSocketContainer.sessionCloseFail", session.getId()), ioe);
}
}
}
代码示例来源:origin: org.apache.tomcat.embed/tomcat-embed-websocket
protected void checkExpiration() {
long timeout = maxIdleTimeout;
if (timeout < 1) {
return;
}
if (System.currentTimeMillis() - lastActive > timeout) {
String msg = sm.getString("wsSession.timeout", getId());
if (log.isDebugEnabled()) {
log.debug(msg);
}
doClose(new CloseReason(CloseCodes.GOING_AWAY, msg),
new CloseReason(CloseCodes.CLOSED_ABNORMALLY, msg));
}
}
代码示例来源:origin: org.apache.tomcat/tomcat-websocket
protected void checkExpiration() {
long timeout = maxIdleTimeout;
if (timeout < 1) {
return;
}
if (System.currentTimeMillis() - lastActive > timeout) {
String msg = sm.getString("wsSession.timeout", getId());
if (log.isDebugEnabled()) {
log.debug(msg);
}
doClose(new CloseReason(CloseCodes.GOING_AWAY, msg),
new CloseReason(CloseCodes.CLOSED_ABNORMALLY, msg));
}
}
代码示例来源:origin: org.jboss.web/jbossweb
/**
* Cleans up the resources still in use by WebSocket sessions created from
* this container. This includes closing sessions and cancelling
* {@link Future}s associated with blocking read/writes.
*/
public void destroy() {
CloseReason cr = new CloseReason(
CloseCodes.GOING_AWAY, MESSAGES.webappStopping());
for (WsSession session : sessions.keySet()) {
try {
session.close(cr);
} catch (IOException ioe) {
WebsocketsLogger.ROOT_LOGGER.sessionCloseFailed(session.getId(), ioe);
}
}
// Only unregister with AsyncChannelGroupUtil if this instance
// registered with it
if (asynchronousChannelGroup != null) {
synchronized (asynchronousChannelGroupLock) {
if (asynchronousChannelGroup != null) {
AsyncChannelGroupUtil.unregister();
asynchronousChannelGroup = null;
}
}
}
}
代码示例来源:origin: org.apache.tomcat/tomcat-websocket
/**
* Cleans up the resources still in use by WebSocket sessions created from
* this container. This includes closing sessions and cancelling
* {@link Future}s associated with blocking read/writes.
*/
public void destroy() {
CloseReason cr = new CloseReason(
CloseCodes.GOING_AWAY, sm.getString("wsWebSocketContainer.shutdown"));
for (WsSession session : sessions.keySet()) {
try {
session.close(cr);
} catch (IOException ioe) {
log.debug(sm.getString(
"wsWebSocketContainer.sessionCloseFail", session.getId()), ioe);
}
}
// Only unregister with AsyncChannelGroupUtil if this instance
// registered with it
if (asynchronousChannelGroup != null) {
synchronized (asynchronousChannelGroupLock) {
if (asynchronousChannelGroup != null) {
AsyncChannelGroupUtil.unregister();
asynchronousChannelGroup = null;
}
}
}
}
代码示例来源:origin: org.apache.tomcat.embed/tomcat-embed-websocket
/**
* Cleans up the resources still in use by WebSocket sessions created from
* this container. This includes closing sessions and cancelling
* {@link Future}s associated with blocking read/writes.
*/
public void destroy() {
CloseReason cr = new CloseReason(
CloseCodes.GOING_AWAY, sm.getString("wsWebSocketContainer.shutdown"));
for (WsSession session : sessions.keySet()) {
try {
session.close(cr);
} catch (IOException ioe) {
log.debug(sm.getString(
"wsWebSocketContainer.sessionCloseFail", session.getId()), ioe);
}
}
// Only unregister with AsyncChannelGroupUtil if this instance
// registered with it
if (asynchronousChannelGroup != null) {
synchronized (asynchronousChannelGroupLock) {
if (asynchronousChannelGroup != null) {
AsyncChannelGroupUtil.unregister();
asynchronousChannelGroup = null;
}
}
}
}
代码示例来源:origin: org.apache.tomcat/tomcat7-websocket
/**
* Cleans up the resources still in use by WebSocket sessions created from
* this container. This includes closing sessions and cancelling
* {@link Future}s associated with blocking read/writes.
*/
public void destroy() {
CloseReason cr = new CloseReason(
CloseCodes.GOING_AWAY, sm.getString("wsWebSocketContainer.shutdown"));
for (WsSession session : sessions.keySet()) {
try {
session.close(cr);
} catch (IOException ioe) {
log.debug(sm.getString(
"wsWebSocketContainer.sessionCloseFail", session.getId()), ioe);
}
}
// Only unregister with AsyncChannelGroupUtil if this instance
// registered with it
if (asynchronousChannelGroup != null) {
synchronized (asynchronousChannelGroupLock) {
if (asynchronousChannelGroup != null) {
AsyncChannelGroupUtil.unregister();
asynchronousChannelGroup = null;
}
}
}
}
本文整理了Java中org.apache.tomcat.websocket.WsSession.getPongMessageHandler()方法的一些代码示例,展示了WsSession.getPon
本文整理了Java中org.apache.tomcat.websocket.WsSession.sendCloseMessage()方法的一些代码示例,展示了WsSession.sendCloseMe
本文整理了Java中org.apache.tomcat.websocket.WsSession.getMaxTextMessageBufferSize()方法的一些代码示例,展示了WsSession.
本文整理了Java中org.apache.tomcat.websocket.WsSession.setWsFrame()方法的一些代码示例,展示了WsSession.setWsFrame()的具体用法
本文整理了Java中org.apache.tomcat.websocket.WsSession.getMaxBinaryMessageBufferSize()方法的一些代码示例,展示了WsSessio
本文整理了Java中org.apache.tomcat.websocket.WsSession.unregisterFuture()方法的一些代码示例,展示了WsSession.unregisterF
本文整理了Java中org.apache.tomcat.websocket.WsSession.fireEndpointOnError()方法的一些代码示例,展示了WsSession.fireEndp
本文整理了Java中org.apache.tomcat.websocket.WsSession.checkState()方法的一些代码示例,展示了WsSession.checkState()的具体用法
本文整理了Java中org.apache.tomcat.websocket.WsSession.getBinaryMessageHandler()方法的一些代码示例,展示了WsSession.getB
本文整理了Java中org.apache.tomcat.websocket.WsSession.updateLastActive()方法的一些代码示例,展示了WsSession.updateLastA
本文整理了Java中org.apache.tomcat.websocket.WsSession.registerFuture()方法的一些代码示例,展示了WsSession.registerFutur
本文整理了Java中org.apache.tomcat.websocket.WsSession.getTextMessageHandler()方法的一些代码示例,展示了WsSession.getTex
本文整理了Java中org.apache.tomcat.websocket.WsSession.doAddMessageHandler()方法的一些代码示例,展示了WsSession.doAddMes
本文整理了Java中org.apache.tomcat.websocket.WsSession.checkExpiration()方法的一些代码示例,展示了WsSession.checkExpirat
本文整理了Java中org.apache.tomcat.websocket.WsSession.getBasicRemote()方法的一些代码示例,展示了WsSession.getBasicRemot
本文整理了Java中org.apache.tomcat.websocket.WsSession.getUserPrincipal()方法的一些代码示例,展示了WsSession.getUserPrin
本文整理了Java中org.apache.tomcat.websocket.WsSession.()方法的一些代码示例,展示了WsSession.()的具体用法。这些代码示例主要来源于Github/S
本文整理了Java中org.apache.tomcat.websocket.WsSession.getUserProperties()方法的一些代码示例,展示了WsSession.getUserPro
本文整理了Java中org.apache.tomcat.websocket.WsSession.doClose()方法的一些代码示例,展示了WsSession.doClose()的具体用法。这些代码示
本文整理了Java中org.apache.tomcat.websocket.WsSession.onClose()方法的一些代码示例,展示了WsSession.onClose()的具体用法。这些代码示
我是一名优秀的程序员,十分优秀!