Package hudson.console

Examples of hudson.console.AnnotatedLargeText


    }

    public void testAnnotatedText() throws Exception {
        MyTaskAction action = new MyTaskAction();
        action.start();
        AnnotatedLargeText annotatedText = action.obtainLog();
        while (!annotatedText.isComplete()) {
            Thread.sleep(10);
        }
        ByteArrayOutputStream os = new ByteArrayOutputStream();
        annotatedText.writeLogTo(0, os);
        assertTrue(os.toString("UTF-8").startsWith("a linkCompleted"));
    }
View Full Code Here


    /**
     * Handles incremental log output.
     */
    public void doProgressiveLog( StaplerRequest req, StaplerResponse rsp) throws IOException {
        AnnotatedLargeText text = obtainLog();
        if(text!=null) {
            text.doProgressText(req,rsp);
            return;
        }
        rsp.setStatus(HttpServletResponse.SC_OK);
    }
View Full Code Here

    /**
     * Handles incremental log output.
     */
    public void doProgressiveHtml( StaplerRequest req, StaplerResponse rsp) throws IOException {
        AnnotatedLargeText text = obtainLog();
        if(text!=null) {
            text.doProgressiveHtml(req,rsp);
            return;
        }
        rsp.setStatus(HttpServletResponse.SC_OK);
    }
View Full Code Here

    /**
     * Used to URL-bind {@link AnnotatedLargeText}.
     */
    public AnnotatedLargeText getLogText() {
        return new AnnotatedLargeText(getLogFile(),getCharset(),!isLogUpdated(),this);
    }
View Full Code Here

    /**
     * Used from <tt>console.jelly</tt> to write annotated log to the given output.
     */
    public void writeLogTo(long offset, XMLOutput out) throws IOException {
        AnnotatedLargeText l = getLogText();
        if (l!=null)
            l.writeHtmlTo(offset, out.asWriter());
    }
View Full Code Here

    /**
     * Used to URL-bind {@link AnnotatedLargeText}.
     */
    public AnnotatedLargeText getLogText() {
        return new AnnotatedLargeText(getLogFile(),getCharset(),!isLogUpdated(),this);
    }
View Full Code Here

TOP

Related Classes of hudson.console.AnnotatedLargeText

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.