Examples of SessionManager


Examples of dk.brics.jwig.server.SessionManager

   * Sets the timeout to now + minutes-to-live.
   * This method is invoked automatically if a client is viewing
   * a page that involves the session, if possible.
   */
  public void refresh() {
    SessionManager m = ThreadContext.getSessionManager();
    synchronized (m) {
      m.refreshBefore(this);
      updateTimeout();
      m.refreshAfter(this);
    }
  }
View Full Code Here

Examples of edu.wpi.cs.wpisuitetng.SessionManager

  {
    this.u1 = new User("Tyler", "twack", "jayms", 2);
    this.u2 = new User("Mike", "mpdelladonna", "yams", 3);
    this.u2.setRole(Role.ADMIN);
   
    this.man = new SessionManager();
  }
View Full Code Here

Examples of es.urjc.escet.semium.SessionManager

    protected void processRequest(HttpServletRequest request, HttpServletResponse response)
    throws ServletException, IOException {
       
        /** Security **/
        PermissionManager pm = PermissionManager.getInstance();
        SessionManager sm = new SessionManager(request.getSession());
        if(!pm.hasPermission(sm.getCurrentUser(),PermissionManager.permission.permitGeneralAdministration))
            response.sendRedirect("login?redirect=fetch");
        /** End Security **/
       
        response.setContentType("text/html;charset=UTF-8");
        PrintWriter out = response.getWriter();
View Full Code Here

Examples of flash.tools.debugger.SessionManager

    {
      err(getLocalizationManager().getLocalizedTextString("sessionInProgress")); //$NON-NLS-1$
      return;
    }

    SessionManager mgr = Bootstrap.sessionManager();

    if (hasMoreTokens())
    {
      if (!setLaunchURI(restOfLine()))
        return;
    }

    if (m_connectPort == null)
      mgr.startListening();

    try
    {
      if (m_connectPort != null) {
        out(getLocalizationManager().getLocalizedTextString("waitingToConnectToPlayer")); //$NON-NLS-1$
        m_session = mgr.connect(Integer.valueOf(m_connectPort), null);
      }
      else if (m_launchURI == null)
      {
        out(getLocalizationManager().getLocalizedTextString("waitingForPlayerToConnect")); //$NON-NLS-1$
        m_session = mgr.accept(null);
      }
      else
      {
        out(getLocalizationManager().getLocalizedTextString("launchingWithUrl") + m_newline + m_launchURI); //$NON-NLS-1$
        m_session = mgr.launch(m_launchURI, null, true, null, null);
      }

      // now see what happened
      if (m_session == null)
      {
        // shouldn't have gotten here
        throw new SocketTimeoutException();
      }
      else
      {
        out(getLocalizationManager().getLocalizedTextString("playerConnectedSessionStarting")); //$NON-NLS-1$
        initSession(m_session);

        // pause for a while during startup, don't let exceptions ripple outwards
        try { waitTilHalted(); } catch(Exception e) {}

        setInitialSourceFile();

        out(getLocalizationManager().getLocalizedTextString("setBreakpointsThenResume")); //$NON-NLS-1$

        // now poke to see if the player is good enough
        try
        {
          if (m_session.getPreference(SessionManager.PLAYER_SUPPORTS_GET) == 0 )
            err(m_newline + getLocalizationManager().getLocalizedTextString("warningNotAllCommandsSupported")); //$NON-NLS-1$
        }
        catch(Exception npe) {}
      }
    }
    catch (FileNotFoundException fnf)
    {
      Map<String, Object> args = new HashMap<String, Object>();
      args.put("uri", fnf.getLocalizedMessage()); //$NON-NLS-1$
      err(getLocalizationManager().getLocalizedTextString("fileDoesNotExist", args)); //$NON-NLS-1$
    }
    catch (SocketTimeoutException ste)
    {
      err(getLocalizationManager().getLocalizedTextString("failedToConnect")); //$NON-NLS-1$
    }
    catch (IOException io)
    {
      err(io.getLocalizedMessage());
    }
    finally
    {
      // turn off listening, to allow other session to connect
      if (m_connectPort == null)
        mgr.stopListening();
    }
  }
View Full Code Here

Examples of freenet.clients.http.SessionManager

    for(SessionManager m : sessionManagers) {
      if(m.getCookiePath().equals(cookiePath))
        return m;
    }
   
    final SessionManager m = new SessionManager(cookiePath);
    sessionManagers.add(m);
    return m;
    }
  }
View Full Code Here

Examples of freenet.clients.http.SessionManager

    for(SessionManager m : sessionManagers) {
      if(m.getCookieNamespace().equals(cookieNamespace))
        return m;
    }
   
    final SessionManager m = new SessionManager(cookieNamespace);
    sessionManagers.add(m);
    return m;
    }
  }
View Full Code Here

Examples of henplus.SessionManager

    private int executeDoubleDb(final StringTokenizer st, final boolean colNameIgnoreCase) {
        if (st.countTokens() < 3) {
            return SYNTAX_ERROR;
        }

        final SessionManager sessionManager = HenPlus.getInstance().getSessionManager();

        if (sessionManager.getSessionCount() < 2) {
            Logger.error("You need two valid sessions for this command.");
            return SYNTAX_ERROR;
        }

        final SQLSession first = sessionManager.getSessionByName(st.nextToken());
        final SQLSession second = sessionManager.getSessionByName(st.nextToken());

        if (first == null || second == null) {
            Logger.error("You need two valid sessions for this command.");
            return EXEC_FAILED;
        } else if (first == second) {
View Full Code Here

Examples of hermes.impl.SessionManager

      connectionManager.setClientID(connectionConfig.getClientID());
      connectionManager.setUsername(connectionConfig.getUsername());
      connectionManager.setPassword(connectionConfig.getPassword());

      if (connectionConfig.getSession().size() > 0) {
        SessionManager sessionManager;
        DestinationManager destinationManager;
        SessionConfig sessionConfig = connectionConfig.getSession().get(0);

        if (jndiFactory != null) {
          jndiFactory._setDelegateClassLoader(classLoader);

          destinationManager = new JNDIDestinationManager(jndiFactory._getProperties(), true);
          sessionManager = new ThreadLocalSessionManager(sessionConfig, destinationManager);
        } else {
          destinationManager = new SimpleDestinationManager();
          sessionManager = new ThreadLocalSessionManager(sessionConfig, destinationManager);
        }

        log.debug("SESSION IS " + sessionConfig.getId());

        if (sessionConfig.getReconnects() != null) {
          sessionManager.setReconnects(sessionConfig.getReconnects().intValue());
        }

        classLoaderManager.putClassLoaderByHermes(sessionConfig.getId(), classLoader);
        factoryConfigById.put(sessionConfig.getId(), factoryConfig);

        sessionManager.setTransacted(sessionConfig.isTransacted());
        sessionManager.setId(sessionConfig.getId());
        sessionManager.setFactoryConfig(factoryConfig);
        sessionManager.setAudit(sessionConfig.isAudit());

        sessionManager.setParent(connectionManager);
        connectionManager.setParent(connectionFactoryManager);

        if (config.getAuditDirectory() != null) {
          sessionManager.setAuditDirectory(config.getAuditDirectory());
        } else if (sessionConfig.getAuditDirectory() != null) {
          sessionManager.setAuditDirectory(sessionConfig.getAuditDirectory());
        }

        connectionManager.addChild(sessionManager);

        hermes = new DefaultHermesImpl(factoryConfig.getExtension(), sessionManager, classLoader);
View Full Code Here

Examples of io.undertow.server.session.SessionManager

     *
     * @param sessionId The session ID
     * @return The session
     */
    public HttpSessionImpl getSession(final String sessionId) {
        final SessionManager sessionManager = deployment.getSessionManager();
        Session session = sessionManager.getSession(sessionId);
        if (session != null) {
            return SecurityActions.forSession(session, this, false);
        }
        return null;
    }
View Full Code Here

Examples of io.undertow.server.session.SessionManager

        if (httpSession != null && httpSession.isInvalid()) {
            exchange.removeAttachment(sessionAttachmentKey);
            httpSession = null;
        }
        if (httpSession == null) {
            final SessionManager sessionManager = deployment.getSessionManager();
            Session session = sessionManager.getSession(exchange, c);
            if (session != null) {
                httpSession = SecurityActions.forSession(session, this, false);
                exchange.putAttachment(sessionAttachmentKey, httpSession);
            } else if (create) {

                String existing = c.findSessionId(exchange);
                if (originalServletContext != this) {
                    //this is a cross context request
                    //we need to make sure there is a top level session
                    originalServletContext.getSession(originalServletContext, exchange, true);
                } else if (existing != null) {
                    c.clearSession(exchange, existing);
                }

                final Session newSession = sessionManager.createSession(exchange, c);
                httpSession = SecurityActions.forSession(newSession, this, true);
                exchange.putAttachment(sessionAttachmentKey, httpSession);
            }
        }
        return httpSession;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.