gpt4 book ai didi

org.apache.tomcat.websocket.WsSession.getUserProperties()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-21 19:27:05 27 4
gpt4 key购买 nike

本文整理了Java中org.apache.tomcat.websocket.WsSession.getUserProperties()方法的一些代码示例,展示了WsSession.getUserProperties()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WsSession.getUserProperties()方法的具体详情如下:
包路径:org.apache.tomcat.websocket.WsSession
类名称:WsSession
方法名:getUserProperties

WsSession.getUserProperties介绍

暂无

代码示例

代码示例来源:origin: org.apache.tomcat/tomcat-websocket

private long getBlockingSendTimeout() {
  Object obj = wsSession.getUserProperties().get(Constants.BLOCKING_SEND_TIMEOUT_PROPERTY);
  Long userTimeout = null;
  if (obj instanceof Long) {
    userTimeout = (Long) obj;
  }
  if (userTimeout == null) {
    return Constants.DEFAULT_BLOCKING_SEND_TIMEOUT;
  } else {
    return userTimeout.longValue();
  }
}

代码示例来源:origin: codefollower/Tomcat-Research

private long getBlockingSendTimeout() {
  Object obj = wsSession.getUserProperties().get(
      BLOCKING_SEND_TIMEOUT_PROPERTY);
  Long userTimeout = null;
  if (obj instanceof Long) {
    userTimeout = (Long) obj;
  }
  if (userTimeout == null) {
    return DEFAULT_BLOCKING_SEND_TIMEOUT;
  } else {
    return userTimeout.longValue();
  }
}

代码示例来源:origin: org.apache.tomcat.embed/tomcat-embed-websocket

private long getBlockingSendTimeout() {
  Object obj = wsSession.getUserProperties().get(Constants.BLOCKING_SEND_TIMEOUT_PROPERTY);
  Long userTimeout = null;
  if (obj instanceof Long) {
    userTimeout = (Long) obj;
  }
  if (userTimeout == null) {
    return Constants.DEFAULT_BLOCKING_SEND_TIMEOUT;
  } else {
    return userTimeout.longValue();
  }
}

代码示例来源:origin: org.jboss.web/jbossweb

private long getBlockingSendTimeout() {
  Object obj = wsSession.getUserProperties().get(
      BLOCKING_SEND_TIMEOUT_PROPERTY);
  Long userTimeout = null;
  if (obj instanceof Long) {
    userTimeout = (Long) obj;
  }
  if (userTimeout == null) {
    return DEFAULT_BLOCKING_SEND_TIMEOUT;
  } else {
    return userTimeout.longValue();
  }
}

代码示例来源:origin: org.apache.tomcat/tomcat7-websocket

private long getBlockingSendTimeout() {
  Object obj = wsSession.getUserProperties().get(
      BLOCKING_SEND_TIMEOUT_PROPERTY);
  Long userTimeout = null;
  if (obj instanceof Long) {
    userTimeout = (Long) obj;
  }
  if (userTimeout == null) {
    return DEFAULT_BLOCKING_SEND_TIMEOUT;
  } else {
    return userTimeout.longValue();
  }
}

代码示例来源:origin: Red5/red5-plugins

@Override
protected void sendMessageBinary(ByteBuffer msg, boolean last) throws WsIOException {
  ClassLoader cl = Thread.currentThread().getContextClassLoader();
  try {
    Thread.currentThread().setContextClassLoader(applicationClassLoader);
    // set connection local to the message handler so WSMessage will contain the connection
    ((DefaultWebSocketEndpoint) wsSession.getLocal()).setConnectionLocal((WebSocketConnection) wsSession.getUserProperties().get(WSConstants.WS_CONNECTION));
    // super!
    super.sendMessageBinary(msg, last);
  } finally {
    // clear thread local
    ((DefaultWebSocketEndpoint) wsSession.getLocal()).setConnectionLocal(null);
    Thread.currentThread().setContextClassLoader(cl);
  }
}

代码示例来源:origin: Red5/red5-plugins

@Override
protected void sendMessageText(boolean last) throws WsIOException {
  ClassLoader cl = Thread.currentThread().getContextClassLoader();
  try {
    Thread.currentThread().setContextClassLoader(applicationClassLoader);
    // set connection local to the message handler so WSMessage will contain the connection
    ((DefaultWebSocketEndpoint) wsSession.getLocal()).setConnectionLocal((WebSocketConnection) wsSession.getUserProperties().get(WSConstants.WS_CONNECTION));
    // super!
    super.sendMessageText(last);
  } finally {
    // clear thread local
    ((DefaultWebSocketEndpoint) wsSession.getLocal()).setConnectionLocal(null);
    Thread.currentThread().setContextClassLoader(cl);
  }
}

代码示例来源:origin: Red5/red5-plugins

log.debug("pathParameters: {}", pathParameters);
Map<String, Object> userProps = wsSession.getUserProperties();
log.debug("userProps: {}", userProps);

代码示例来源:origin: Red5/red5-plugins

wsSession.getUserProperties().put(WSConstants.WS_CONNECTION, conn);

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com