public class BigPipeService extends Object
Constructor and Description |
---|
BigPipeService(com.atlassian.plugin.webresource.WebResourceIntegration webResourceIntegration,
com.atlassian.webresource.api.assembler.PageBuilderService pageBuilderService,
FeatureManager featureManager,
BarrierFactory barrierFactory) |
Modifier and Type | Method and Description |
---|---|
void |
closeExecutor()
Closes the executor to make sure no new tasks will be added in the current request.
|
boolean |
executeSingleTask()
Takes one of the tasks that have been added with
pipeContent(String, Integer, Supplier) method and executes it in
current thread. |
boolean |
isBigPipeEnabled() |
void |
pipeContent(String id,
Integer priority,
Supplier<String> contentGenerator)
Adds content to the pipe processing.
|
public BigPipeService(com.atlassian.plugin.webresource.WebResourceIntegration webResourceIntegration, com.atlassian.webresource.api.assembler.PageBuilderService pageBuilderService, FeatureManager featureManager, BarrierFactory barrierFactory)
public void pipeContent(@Nonnull String id, @Nullable Integer priority, @Nonnull Supplier<String> contentGenerator)
id
- id of the DOM element which contents will be replaced with the one produced by contentGeneratorpriority
- the priority for rendering the generated content. Higher priorities are rendered before
lower priorities. Null priority will use the default.contentGenerator
- generator for JSON content that will replace the BigPipe placeholder eventually.public boolean executeSingleTask()
pipeContent(String, Integer, Supplier)
method and executes it in
current thread.public void closeExecutor()
pipeContent(String, Integer, Supplier)
in the current request will throw an IllegalStateException
.public boolean isBigPipeEnabled()
Copyright © 2002-2019 Atlassian. All Rights Reserved.