|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objecthudson.console.ConsoleAnnotatorFactory<T>
public abstract class ConsoleAnnotatorFactory<T>
Entry point to the ConsoleAnnotator extension point. This class
creates a new instance of ConsoleAnnotator that starts a new console
annotation session.
ConsoleAnnotatorFactorys are used whenever a browser requests
console output (as opposed to when the console output is being produced
— for that see ConsoleNote.)
ConsoleAnnotators returned by ConsoleAnnotatorFactory are
asked to start from an arbitrary line of the output, because typically
browsers do not request the entire console output. Because of this,
ConsoleAnnotatorFactory is generally suitable for peep-hole local
annotation that only requires a small contextual information, such as keyword
coloring, URL hyperlinking, and so on.
To register, put
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface hudson.ExtensionPoint |
|---|
ExtensionPoint.LegacyInstancesAreScopedToHudson |
| Constructor Summary | |
|---|---|
ConsoleAnnotatorFactory()
|
|
| Method Summary | |
|---|---|
static ExtensionList<ConsoleAnnotatorFactory> |
all()
All the registered instances. |
void |
doScriptJs(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp)
Serves the JavaScript file associated with this console annotator factory. |
void |
doStyleCss(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp)
|
boolean |
hasScript()
Returns true if this descriptor has a JavaScript to be inserted on applicable console page. |
boolean |
hasStylesheet()
|
abstract ConsoleAnnotator |
newInstance(T context)
Called when a console output page is requested to create a stateful ConsoleAnnotator. |
Class |
type()
For which context type does this annotator work? |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ConsoleAnnotatorFactory()
| Method Detail |
|---|
public abstract ConsoleAnnotator newInstance(T context)
ConsoleAnnotator.
This method can be invoked concurrently by multiple threads.
context - The model object that owns the console output, such as
Run. This method is only called when the context object if
assignable to the advertised type.
public Class type()
public boolean hasScript()
public boolean hasStylesheet()
@WebMethod(name="script.js")
public void doScriptJs(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp)
throws IOException,
javax.servlet.ServletException
IOException
javax.servlet.ServletException
@WebMethod(name="style.css")
public void doStyleCss(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp)
throws IOException,
javax.servlet.ServletException
IOException
javax.servlet.ServletExceptionpublic static ExtensionList<ConsoleAnnotatorFactory> all()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||