Package com.keybox.manage.model

Examples of com.keybox.manage.model.UserSessionsOutput


     * removes session for user session
     *
     * @param sessionId session id
     */
    public static void removeUserSession(Long sessionId) {
        UserSessionsOutput userSessionsOutput = userSessionsOutputMap.get(sessionId);
        if (userSessionsOutput != null) {
            userSessionsOutput.getSessionOutputMap().clear();
        }
        userSessionsOutputMap.remove(sessionId);

    }
View Full Code Here


     * @param sessionId    session id
     * @param hostSystemId host system id
     */
    public static void removeOutput(Long sessionId, Long hostSystemId) {

        UserSessionsOutput userSessionsOutput = userSessionsOutputMap.get(sessionId);
        if (userSessionsOutput != null) {
            userSessionsOutput.getSessionOutputMap().remove(hostSystemId);
        }
    }
View Full Code Here

     * @param sessionId     session id
     * @param sessionOutput session output object
     */
    public static void addOutput(Long sessionId, SessionOutput sessionOutput) {

        UserSessionsOutput userSessionsOutput = userSessionsOutputMap.get(sessionId);
        if (userSessionsOutput == null) {
            userSessionsOutputMap.put(sessionId, new UserSessionsOutput());
            userSessionsOutput = userSessionsOutputMap.get(sessionId);
        }
        userSessionsOutput.getSessionOutputMap().put(sessionOutput.getHostSystemId(), new StringBuilder());


    }
View Full Code Here

     * @param count        The length
     */
    public static void addToOutput(Long sessionId, Long hostSystemId, char value[], int offset, int count) {


        UserSessionsOutput userSessionsOutput = userSessionsOutputMap.get(sessionId);
        if (userSessionsOutput != null) {
            userSessionsOutput.getSessionOutputMap().get(hostSystemId).append(value, offset, count);
        }

    }
View Full Code Here

     */
    public static List<SessionOutput> getOutput(Connection con, Long sessionId) {
        List<SessionOutput> outputList = new ArrayList<SessionOutput>();


        UserSessionsOutput userSessionsOutput = userSessionsOutputMap.get(sessionId);
        if (userSessionsOutput != null) {


            for (Long key : userSessionsOutput.getSessionOutputMap().keySet()) {

                //get output chars and set to output
                try {
                    StringBuilder sb = userSessionsOutput.getSessionOutputMap().get(key);
                    if (sb != null) {
                        SessionOutput sessionOutput = new SessionOutput();
                        sessionOutput.setSessionId(sessionId);
                        sessionOutput.setHostSystemId(key);

                        sessionOutput.setOutput(sb.toString());

                        if (StringUtils.isNotEmpty(sessionOutput.getOutput())) {
                            outputList.add(sessionOutput);

                            if ("true".equals(enableAudit)) {
                                SessionAuditDB.insertTerminalLog(con, sessionOutput);
                            }

                            userSessionsOutput.getSessionOutputMap().put(key, new StringBuilder());
                        }
                    }
                } catch (Exception ex) {
                    ex.printStackTrace();
                }
View Full Code Here

TOP

Related Classes of com.keybox.manage.model.UserSessionsOutput

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.