Examples of RecordSession


Examples of org.apache.beehive.netui.tools.testrecorder.server.state.RecordSession

    }

    private void doRecordStop( HttpServletRequest request, HttpServletResponse response ) throws IOException,
            ServletException {
        TestRecorderFilter filter = TestRecorderFilter.instance();
        RecordSession session = filter.getState().getRecordingSession();
        String msg = "ERROR: failed stopping recording session";
        if ( log.isDebugEnabled() ) {
            log.debug( "STOPPING: recording session( " + session + " )" );
        }
        try {
            // this may take some time, this waits for recording threads to finish
            session = filter.getState().recordStop();
            if ( session == null ) {
                // fail, not currently recording
                msg = "ERROR: no recording session is currently started";
                if ( log.isWarnEnabled() ) {
                    log.warn( msg );
                }
            }
            else {
                request.setAttribute( Constants.RECORD_SESSION_ATTRIBUTE, session );
                msg = "Recording session( " + session.getSessionName() + " ) stopped";
                if ( log.isInfoEnabled() ) {
                    log.info( msg );
                }
            }
            forward( request, response, msg, Constants.RECORD_PAGE, false );
View Full Code Here

Examples of org.apache.beehive.netui.tools.testrecorder.server.state.RecordSession

                    TestRecorderFilter.instance().getWebapp() + " )";
            forward( request, response, msg, Constants.RECORD_PAGE, true );
            return;
        }
        // may throw IOException or SecurityException
        RecordSession session = null;
        try {
            session = getRecordSession( test, overwrite, testUser, description );
            if ( description != null ) {
                test.setDescription( description );
            }
            TestRecorderFilter.instance().getTestDefinitions().add( test );
        }
        catch ( Exception ex ) {
            String msg = "ERROR: unable to start recording, unable to obtain session, exception( " +
                    ex.getMessage() + " )";
            forward( request, response, msg, Constants.RECORD_PAGE, true, ex );
            return;
        }
        if ( log.isDebugEnabled() ) {
            log.debug( "attempting to start recording session( " + session + " )" );
        }
        TestRecorderFilter filter = TestRecorderFilter.instance();
        boolean start = false;
        try {
            // may throw IOException
            start = filter.getState().recordStart( session );
        }
        catch ( Exception ex ) {
            String msg = "ERROR: failed to start recording, exception( " + ex.getMessage() + " )";
            forward( request, response, msg, Constants.RECORD_PAGE, true, ex );
            return;
        }
        if ( log.isInfoEnabled() ) {
            log.info( "start( " + start + " )" );
        }
        if ( start ) {
            String msg = "recording session( " + session.getSessionName() + " ) started.";
            request.setAttribute( Constants.RECORD_SESSION_ATTRIBUTE, session );
            if ( log.isInfoEnabled() ) {
                log.info( msg );
            }
            forward( request, response, msg, Constants.RECORD_PAGE, false );
        }
        else {
            String msg = "ERROR: recording session( " +
                    session.getSessionName() + " ) already started.";
            request.setAttribute( Constants.RECORD_SESSION_ATTRIBUTE, filter.getState().getRecordingSession() );
            forward( request, response, msg, Constants.RECORD_PAGE, true );
        }
    }
View Full Code Here

Examples of org.apache.beehive.netui.tools.testrecorder.server.state.RecordSession

        File file = getRecordSessionFile( test );
        if ( log.isInfoEnabled() ) {
            log.info( "record file( " + file.getAbsolutePath() + " )" );
        }
        // may throw IOException or SecurityException (runtime)
        RecordSession session = State.createRecordSession( test.getName(), file,
                overwrite, testUser, description );
        return session;
    }
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.