Package org.coweb

Examples of org.coweb.SessionHandler


    if (jsonObj.containsKey("sessionName")) {
      sessionName = (String) jsonObj.get("sessionName");
    }

    // see if we have a session for this key already. If not create one.
    SessionHandler handler =
      this.sessionManager.getSessionHandlerByConfkey(confKey, cacheState);
    if (handler == null) {
      try {
        handler =
          this.sessionManager.createSession(confKey, cacheState);
        handler.setSessionName(sessionName);
        handler.setRequestUrl(requestUrl);
      } catch (CowebException ce) {
        ce.printStackTrace();
        log.severe("Exception creating SessionHandler: " +
            ce.getMessage());
        resp.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR,
            "Failed to create session.");
        return;
      }
    }

    String sessionId = handler.getSessionId();

    // get our base url, to tell clients where the bayeux servlet is.
    String base = this.getServletContext().getContextPath();

    HashMap<String, Object> jsonResp = new HashMap<String, Object>();
View Full Code Here


    * @return true if the user is allowed to join the session.
    */
    public boolean canSubscribeToSession(String username, String sessionid) {
     
      SessionManager manager = SessionManager.getInstance();
      SessionHandler handler = manager.getSessionHandler(sessionid);
     
      return this.canSubscribeToSession(username,
          handler.getConfKey(),
          handler.isCollab());
    }
View Full Code Here

    * @return true if the user is allowed to join the session.
    */
    public boolean canSubscribeToSession(String username, String sessionid) {
     
      SessionManager manager = SessionManager.getInstance();
      SessionHandler handler = manager.getSessionHandler(sessionid);
     
      return this.canSubscribeToSession(username,
          handler.getConfKey());
    }
View Full Code Here

TOP

Related Classes of org.coweb.SessionHandler

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.