hudson.console
Class AnnotatedLargeText<T>

java.lang.Object
  extended by org.kohsuke.stapler.framework.io.LargeText
      extended by hudson.console.AnnotatedLargeText<T>
Type Parameters:
T - Context type.

public class AnnotatedLargeText<T>
extends org.kohsuke.stapler.framework.io.LargeText

Extension to LargeText that handles annotations by ConsoleAnnotator.

In addition to run each line through ConsoleAnnotationOutputStream for adding markup, this class persists ConsoleAnnotator into a byte sequence and send it to the client as an HTTP header. The client JavaScript sends it back next time it fetches the following output.

The serialized ConsoleAnnotator is encrypted to avoid malicious clients from instantiating arbitrary ConsoleAnnotators.

Since:
1.349
Author:
Kohsuke Kawaguchi

Field Summary
 
Fields inherited from class org.kohsuke.stapler.framework.io.LargeText
charset
 
Constructor Summary
AnnotatedLargeText(org.kohsuke.stapler.framework.io.ByteBuffer memory, Charset charset, boolean completed, T context)
           
AnnotatedLargeText(File file, Charset charset, boolean completed, T context)
           
 
Method Summary
 void doProgressiveHtml(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp)
           
 void doProgressiveText(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp)
          Aliasing what I think was a wrong name in LargeText
protected  void setContentType(org.kohsuke.stapler.StaplerResponse rsp)
           
 long writeHtmlTo(long start, Writer w)
           
 long writeLogTo(long start, OutputStream out)
           
 long writeLogTo(long start, Writer w)
           
 
Methods inherited from class org.kohsuke.stapler.framework.io.LargeText
createWriter, doProgressText, isComplete, length, markAsComplete, readAll
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AnnotatedLargeText

public AnnotatedLargeText(File file,
                          Charset charset,
                          boolean completed,
                          T context)

AnnotatedLargeText

public AnnotatedLargeText(org.kohsuke.stapler.framework.io.ByteBuffer memory,
                          Charset charset,
                          boolean completed,
                          T context)
Method Detail

doProgressiveHtml

public void doProgressiveHtml(org.kohsuke.stapler.StaplerRequest req,
                              org.kohsuke.stapler.StaplerResponse rsp)
                       throws IOException
Throws:
IOException

doProgressiveText

public void doProgressiveText(org.kohsuke.stapler.StaplerRequest req,
                              org.kohsuke.stapler.StaplerResponse rsp)
                       throws IOException
Aliasing what I think was a wrong name in LargeText

Throws:
IOException

setContentType

protected void setContentType(org.kohsuke.stapler.StaplerResponse rsp)
Overrides:
setContentType in class org.kohsuke.stapler.framework.io.LargeText

writeLogTo

public long writeLogTo(long start,
                       Writer w)
                throws IOException
Overrides:
writeLogTo in class org.kohsuke.stapler.framework.io.LargeText
Throws:
IOException

writeLogTo

public long writeLogTo(long start,
                       OutputStream out)
                throws IOException
Overrides:
writeLogTo in class org.kohsuke.stapler.framework.io.LargeText
Throws:
IOException

writeHtmlTo

public long writeHtmlTo(long start,
                        Writer w)
                 throws IOException
Throws:
IOException


Copyright © 2004-2013. All Rights Reserved.