Examples of UserSession


Examples of com.gwtplatform.carstore.server.dao.domain.UserSession

        this.userDao = userDao;
    }

    public String createSessionCookie(UserDto userDto) {
        String cookie = UUID.randomUUID().toString();
        UserSession userSession = new UserSession(userDto.getId(), cookie);
        put(userSession);

        logger.info("UserSessionDao.createLoggedInCookie(user) user=" + userDto + " userSessionCookie="
                + userSession.getCookie());

        return userSession.getCookie();
    }
View Full Code Here

Examples of com.mozilla.bespin.UserSession

    /**
     * Return the settings for the current user; returns null if there is no current user
     * @return
     */
    protected synchronized Map<String, String> getUserSettings() {
        UserSession session = (UserSession) getCtx().getReq().getSession(true).getAttribute("userSession");
        if (session == null) return null;
        Map<UserSession, Map<String, String>> settingsMap = (Map<UserSession, Map<String, String>>) getCtx().getServletContext().getAttribute(KEY_USER_SETTINGS);
        if (settingsMap == null) {
            settingsMap = new HashMap<UserSession, Map<String, String>>();
            getCtx().getServletContext().setAttribute(KEY_USER_SETTINGS, settingsMap);
View Full Code Here

Examples of com.odiago.flumebase.server.UserSession

  @Override
  public FlowId addFlow(FlowSpecification spec) throws InterruptedException {
    if (null != spec) {
      // Turn the specification into a physical plan and run it.
      FlowId flowId = new FlowId(mNextFlowId++);
      UserSession userSession = getSessionForConf(spec.getConf());
      LocalFlowBuilder flowBuilder = new LocalFlowBuilder(flowId, mRootSymbolTable,
          mFlumeConfig, mMemoryOutputMap, userSession);
      try {
        spec.reverseBfs(flowBuilder);
      } catch (DAGOperatorException doe) {
        // An exception occurred when creating the physical plan.
        // LocalFlowBuilder put a message for the user in here; print it
        // without a stack trace. The flow cannot be executed.
        userSession.sendErr(doe.getMessage());
        return null;
      }
      LocalFlow localFlow = flowBuilder.getLocalFlow();
      localFlow.setQuery(spec.getQuery());
      localFlow.setConf(spec.getConf());
View Full Code Here

Examples of com.odiago.flumebase.server.UserSession

      if (flowConf.getBoolean(AUTO_WATCH_FLOW_KEY, DEFAULT_AUTO_WATCH_FLOW)) {
        // Subscribe to this flow before running it, so we guarantee the user
        // sees all the results.
        long idNum = flowConf.getLong(SUBMITTER_SESSION_ID_KEY, -1);
        SessionId submitterSessionId = new SessionId(idNum);
        UserSession session = getSession(submitterSessionId);
        if (session != null) {
          activeFlowData.addSession(session);
        } else {
          LOG.warn("Invalid session id number: " + idNum);
        }
View Full Code Here

Examples of com.odiago.flumebase.server.UserSession

    /**
     * Sign up the specified session to watch a given flow.
     */
    private void watch(WatchRequest watchReq) {
      UserSession userSession = getSession(watchReq.mSessionId);
      if (null == userSession) {
        LOG.warn("Cannot watch flow from user session " + watchReq.mSessionId
            + "; no such session");
        return;
      }
View Full Code Here

Examples of com.odiago.flumebase.server.UserSession

     * The flowList is provided by a client in another thread; synchronize
     * on it and notify the other thread when the request is complete.
     */
    private void getWatchList(SessionId sessionId, List<FlowId> flowList) {
      synchronized(flowList) {
        UserSession session = getSession(sessionId);
        if (null != session) {
          for (ActiveFlowData activeFlow : mActiveFlows.values()) {
            List<UserSession> subscribers = activeFlow.getSubscribers();
            if (subscribers.contains(session)) {
              flowList.add(activeFlow.getFlowId());
View Full Code Here

Examples of com.sk89q.commandbook.session.UserSession

    }

    public void messagePlayer(CommandSender sender, String target, String message) throws CommandException {
        CommandSender receiver =
                InputUtil.PlayerParser.matchPlayerOrConsole(sender, target);
        UserSession receiverSession = sessions.getSession(UserSession.class, receiver);
        AFKComponent.AFKSession afkSession = sessions.getSession(AFKComponent.AFKSession.class, receiver);
        if (afkSession.isAFK()) {
            String status = afkSession.getIdleStatus();
            sender.sendMessage(config.pmColor + ChatUtil.toColoredName(receiver, config.pmColor) + " is afk. "
                    + "They might not see your message."
                    + (status.trim().length() == 0 ? "" : " (" + status + ")"));
        }

        receiver.sendMessage(config.pmColor + "(From "
                + ChatUtil.toColoredName(sender, config.pmColor) + "): "
                + config.pmTextColor + message);

        sender.sendMessage(config.pmColor + "(To "
                + ChatUtil.toColoredName(receiver, config.pmColor) + "): "
                + config.pmTextColor + message);

        CommandBook.logger().info("(PM) " + ChatUtil.toColoredName(sender, ChatColor.RESET) + " -> "
                + ChatUtil.toColoredName(receiver, ChatColor.RESET) + ": " + message);

        sessions.getSession(UserSession.class, sender).setLastRecipient(receiver);

        // If the receiver hasn't had any player talk to them yet or hasn't
        // send a message, then we add it to the receiver's last message target
        // so s/he can /reply easily
        receiverSession.setNewLastRecipient(sender);
    }
View Full Code Here

Examples of com.tensegrity.palo.gwt.core.server.services.UserSession

      xStaticFolder.setHasChildren(false);
      saveRoot(sessionId, root);
//      print(root, 0);
      return xStaticFolder;
    } catch (OperationFailedException e) {
      UserSession userSession = getUserSession(sessionId);
      throw new DbOperationFailedException(
          userSession.translate("couldNotCreateFolder", name, e.getLocalizedMessage()), e);
    } catch (PaloIOException e) {
      UserSession userSession = getUserSession(sessionId);
      throw new DbOperationFailedException(
          userSession.translate("couldNotCreateFolder", name, e.getLocalizedMessage()), e);
    }
  }
View Full Code Here

Examples of com.uphea.domain.UserSession

    User user = userAuthManager.findUser(id, cookieData[1]);
    if (user == null) {
      return null;
    }
    userAuthManager.login(user);
    return new UserSession(user);
  }
View Full Code Here

Examples of es.udc.tfg.journals.web.util.UserSession

          try {

            User userProfile = userService.login(loginName,
                encryptedPassword, true);
            UserSession userSession = new UserSession();
            userSession.setUserId(userProfile.getUserId());
            userSession.setFirstName(userProfile.getFirstName());
            userSession.setRole(userProfile.getRole());
            applicationStateManager.set(UserSession.class,
                userSession);

          } catch (InstanceNotFoundException e) {
            CookiesManager.removeCookies(cookies);
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.