org.h2.server.web.WebServer.getSession()方法的使用及代码示例

x33g5p2x  于2022-02-03 转载在 其他  
字(5.1k)|赞(0)|评价(0)|浏览(216)

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

WebServer.getSession介绍

[英]Get the web session object for the given session id.
[中]获取给定会话id的web会话对象。

代码示例

代码示例来源:origin: com.h2database/h2

String sessionId = attributes.getProperty("jsessionid");
if (sessionId != null) {
  session = server.getSession(sessionId);

代码示例来源:origin: com.h2database/h2

String sessionId = attributes.getProperty("jsessionid");
file = file.substring(0, paramIndex);
session = server.getSession(sessionId);

代码示例来源:origin: com.h2database/h2

/**
 * Create a new web session id and object.
 *
 * @param hostAddr the host address
 * @return the web session object
 */
WebSession createNewSession(String hostAddr) {
  String newId;
  do {
    newId = generateSessionId();
  } while (sessions.get(newId) != null);
  WebSession session = new WebSession(this);
  session.lastAccess = System.currentTimeMillis();
  session.put("sessionId", newId);
  session.put("ip", hostAddr);
  session.put("language", DEFAULT_LANGUAGE);
  session.put("frame-border", "0");
  session.put("frameset-border", "4");
  sessions.put(newId, session);
  // always read the english translation,
  // so that untranslated text appears at least in english
  readTranslations(session, DEFAULT_LANGUAGE);
  return getSession(newId);
}

代码示例来源:origin: com.atlassian.support/achoo-database-console-common

@Override
  public WebSession getSession(String s)
  {
    //#getSession is called as part of #createNewSession, it's just hackaround to ignore first time invocation
    if (this.session == null)
    {
      this.session = super.getSession(s);
    }

    // if setter is used then BNF will be reset and autocomplete won't work
    HackedWebServlet.inject(this.session.getClass(), this.session, "conn", servlet.getConnection());
    HackedWebServlet.inject(this.session.getClass(), this.session, "meta", servlet.getConnectionMetaData());

    return this.session;
  }
}

代码示例来源:origin: com.eventsourcing/h2

String sessionId = attributes.getProperty("jsessionid");
if (sessionId != null) {
  session = server.getSession(sessionId);

代码示例来源:origin: org.wowtools/h2

String sessionId = attributes.getProperty("jsessionid");
if (sessionId != null) {
  session = server.getSession(sessionId);

代码示例来源:origin: com.h2database/com.springsource.org.h2

WebSession createNewSession(String hostAddr) {
  String newId;
  do {
    newId = generateSessionId();
  } while(sessions.get(newId) != null);
  WebSession session = new WebSession(this);
  session.put("sessionId", newId);
  session.put("ip", hostAddr);
  session.put("language", DEFAULT_LANGUAGE);
  sessions.put(newId, session);
  // always read the english translation, 
  // to that untranslated text appears at least in english
  readTranslations(session, DEFAULT_LANGUAGE);
  return getSession(newId);
}

代码示例来源:origin: org.wowtools/h2

String sessionId = attributes.getProperty("jsessionid");
file = file.substring(0, paramIndex);
session = server.getSession(sessionId);

代码示例来源:origin: com.eventsourcing/h2

String sessionId = attributes.getProperty("jsessionid");
file = file.substring(0, paramIndex);
session = server.getSession(sessionId);

代码示例来源:origin: com.h2database/com.springsource.org.h2

String sessionId = attributes.getProperty("jsessionid");
if (sessionId != null) {
  session = server.getSession(sessionId);

代码示例来源:origin: org.leapframework/jmms-engine

String sessionId = attributes.getProperty("jsessionid");
if (sessionId != null) {
  session = server.getSession(sessionId);

代码示例来源:origin: com.eventsourcing/h2

/**
 * Create a new web session id and object.
 *
 * @param hostAddr the host address
 * @return the web session object
 */
WebSession createNewSession(String hostAddr) {
  String newId;
  do {
    newId = generateSessionId();
  } while (sessions.get(newId) != null);
  WebSession session = new WebSession(this);
  session.lastAccess = System.currentTimeMillis();
  session.put("sessionId", newId);
  session.put("ip", hostAddr);
  session.put("language", DEFAULT_LANGUAGE);
  session.put("frame-border", "0");
  session.put("frameset-border", "4");
  sessions.put(newId, session);
  // always read the english translation,
  // so that untranslated text appears at least in english
  readTranslations(session, DEFAULT_LANGUAGE);
  return getSession(newId);
}

代码示例来源:origin: com.h2database/com.springsource.org.h2

String sessionId = attributes.getProperty("jsessionid");
file = file.substring(0, paramIndex);
session = server.getSession(sessionId);

代码示例来源:origin: org.wowtools/h2

/**
 * Create a new web session id and object.
 *
 * @param hostAddr the host address
 * @return the web session object
 */
WebSession createNewSession(String hostAddr) {
  String newId;
  do {
    newId = generateSessionId();
  } while (sessions.get(newId) != null);
  WebSession session = new WebSession(this);
  session.lastAccess = System.currentTimeMillis();
  session.put("sessionId", newId);
  session.put("ip", hostAddr);
  session.put("language", DEFAULT_LANGUAGE);
  session.put("frame-border", "0");
  session.put("frameset-border", "4");
  sessions.put(newId, session);
  // always read the english translation,
  // so that untranslated text appears at least in english
  readTranslations(session, DEFAULT_LANGUAGE);
  return getSession(newId);
}

相关文章