Examples of SessionTracker


Examples of nz.ac.massey.softwarec.group3.session.SessionTracker

     * Gets the game players information and adds it to a JSON string gamePlayersJSON, which will be returned to the client.
     * @param game - The Game to get player information for.
     * @return String gamePlayersJSON - JSON string representing the players in a game.
     */
    public static String getGamePlayersData(final Game game) {
        final SessionTracker sessionTracker = SessionListener.getSessionTracker();
        final List<Player> gamePlayers = game.getPlayers();
        final StringBuilder gamePlayersJSON = new StringBuilder();
        gamePlayersJSON.append("{\"players\": [");
        for (Player player : gamePlayers) {
            gamePlayersJSON.append("{\"name\" : \"").append(sessionTracker.getUserNameFromEmail(player.getPlayerEmail())).append("\",");
            gamePlayersJSON.append("\"ready\" : ").append(player.isReady()).append("},");
        }
        gamePlayersJSON.deleteCharAt(gamePlayersJSON.length()-1);
        gamePlayersJSON.append("] }");
        return gamePlayersJSON.toString();
View Full Code Here

Examples of org.apache.catalina.connector.SessionTracker

        return request.isMaxDispatchDepthReached();
    }

    void track(Session localSession) {
        validateRequest();
        SessionTracker sessionTracker = (SessionTracker)
            request.getNote(Globals.SESSION_TRACKER);
        if (sessionTracker != null) {
            sessionTracker.track(localSession);
        }
    }
View Full Code Here

Examples of org.apache.catalina.connector.SessionTracker

                    localSession.setMaxInactiveInterval
                        (context.getManager().getMaxInactiveIntervalSeconds());
                    localSession.setId(other.getId());
                    */
                    // START GlassFish 896
                    SessionTracker sessionTracker = (SessionTracker)
                        getRequestFacade().getNote(Globals.SESSION_TRACKER);
                    if (sessionTracker != null) {
                        sessionTracker.track(localSession);
                    }
                    // END GlassFish 896
                }
                if (localSession != null) {
                    localSession.access();
View Full Code Here

Examples of org.apache.catalina.connector.SessionTracker

        return request.isMaxDispatchDepthReached();
    }

    void track(Session localSession) {
        validateRequest();
        SessionTracker sessionTracker = (SessionTracker)
            request.getNote(Globals.SESSION_TRACKER);
        if (sessionTracker != null) {
            sessionTracker.track(localSession);
        }
    }
View Full Code Here

Examples of org.apache.catalina.connector.SessionTracker

        return request.isMaxDispatchDepthReached();
    }

    void track(Session localSession) {
        validateRequest();
        SessionTracker sessionTracker = (SessionTracker)
            request.getNote(Globals.SESSION_TRACKER);
        if (sessionTracker != null) {
            sessionTracker.track(localSession);
        }
    }
View Full Code Here

Examples of org.apache.coyote.tomcat5.SessionTracker

                    localSession.setMaxInactiveInterval
                        (context.getManager().getMaxInactiveIntervalSeconds());
                    localSession.setId(other.getId());
                    */
                    // START GlassFish 896
                    SessionTracker sessionTracker = (SessionTracker)
                        getRequestFacade().getNote(Globals.SESSION_TRACKER);
                    if (sessionTracker != null) {
                        sessionTracker.track(localSession);
                    }
                    // END GlassFish 896
                }
                if (localSession != null) {
                    localSession.access();
View Full Code Here

Examples of org.apache.webbeans.reservation.session.SessionTracker

        FacesContext context = event.getFacesContext();
        String pathInfo = context.getExternalContext().getRequestServletPath();
       
        if(pathInfo.startsWith("/admin") || pathInfo.startsWith("/user"))
        {
            SessionTracker tracker = null;
            User user = null;
            try
            {
                tracker = (SessionTracker)context.getApplication().evaluateExpressionGet(context, "#{sessionTracker}", SessionTracker.class);
                user = tracker.getUser();
               
            }
            catch(Exception e)
            {
                //Tracker is null
View Full Code Here

Examples of org.apache.webbeans.reservation.session.SessionTracker

        FacesContext context = event.getFacesContext();
        String pathInfo = context.getExternalContext().getRequestServletPath();
        System.out.println("pathInfo:"+pathInfo);
        if(pathInfo.startsWith("/admin") || pathInfo.startsWith("/user"))
        {
            SessionTracker tracker = null;
            Users user = null;
            try
            {
                tracker = (SessionTracker)context.getApplication().evaluateExpressionGet(context, "#{sessionTracker}", SessionTracker.class);
                user = tracker.getUser();
               
            }
            catch(Exception e)
            {
                //Tracker is null
View Full Code Here

Examples of org.apache.webbeans.reservation.session.SessionTracker

        FacesContext context = event.getFacesContext();
        String pathInfo = context.getExternalContext().getRequestServletPath();
       
        if(pathInfo.startsWith("/admin") || pathInfo.startsWith("/user"))
        {
            SessionTracker tracker = null;
            User user = null;
            try
            {
                tracker = (SessionTracker)context.getApplication().evaluateExpressionGet(context, "#{sessionTracker}", SessionTracker.class);
                user = tracker.getUser();
               
            }catch(Exception e)
            {
                //Tracker is null
                System.out.println("Context is not active");
View Full Code Here

Examples of org.apache.webbeans.reservation.session.SessionTracker

        FacesContext context = event.getFacesContext();
        String pathInfo = context.getExternalContext().getRequestServletPath();
       
        if(pathInfo.startsWith("/admin") || pathInfo.startsWith("/user"))
        {
            SessionTracker tracker = null;
            User user = null;
            try
            {
                tracker = (SessionTracker)context.getApplication().evaluateExpressionGet(context, "#{sessionTracker}", SessionTracker.class);
                user = tracker.getUser();
               
            }
            catch(Exception e)
            {
                //Tracker is null
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.