Class View.AsynchPeople
- java.lang.Object
-
- jenkins.util.ProgressiveRendering
-
- hudson.model.View.AsynchPeople
-
- Enclosing class:
- View
public static final class View.AsynchPeople extends ProgressiveRendering
Variant ofView.AsynchPeople.Peoplewhich can be displayed progressively, since it may be slow.- Since:
- 1.484
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classView.AsynchPeople.PeopleJENKINS-16397 workaround
-
Field Summary
Fields Modifier and Type Field Description ModelObjectparent
-
Constructor Summary
Constructors Constructor Description AsynchPeople(View parent)AsynchPeople(Jenkins parent)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidcompute()Actually do the work.protected net.sf.json.JSONdata()Provide current data to the web page for display.ApigetApi()-
Methods inherited from class jenkins.util.ProgressiveRendering
canceled, executorService, news, progress, start, timeout
-
-
-
-
Field Detail
-
parent
public final ModelObject parent
-
-
Constructor Detail
-
AsynchPeople
public AsynchPeople(Jenkins parent)
- See Also:
Jenkins.getAsynchPeople()
-
AsynchPeople
public AsynchPeople(View parent)
- See Also:
View.getAsynchPeople()
-
-
Method Detail
-
compute
protected void compute() throws ExceptionDescription copied from class:ProgressiveRenderingActually do the work.The security context will be that in effect when the web request was made.
Stapler.getCurrentRequest()will also be similar to that in effect when the web request was made; at least,Ancestors and basic request properties (URI, locale, and so on) will be available.- Specified by:
computein classProgressiveRendering- Throws:
Exception- whenever you like; the progress bar will indicate that an error occurred but details go to the log only
-
data
@NonNull protected net.sf.json.JSON data()
Description copied from class:ProgressiveRenderingProvide current data to the web page for display.While this could be an aggregate of everything that has been computed so far, more likely you want to supply only that data that is new since the last call (maybe just
{}or[]), so that the page can incrementally update bits of HTML rather than refreshing everything.You may want to make your implementation
synchronized, so that it can track what was sent on a previous call, in which case any code running inProgressiveRendering.compute()which modifies these fields should also temporarily be synchronized on the same monitor such asthis.- Specified by:
datain classProgressiveRendering- Returns:
- any JSON data you like
-
getApi
public Api getApi()
-
-