public final class RendererRegistry extends com.yahoo.component.provider.ComponentRegistry<com.yahoo.processing.rendering.Renderer<Result>>
Modifier and Type | Field and Description |
---|---|
static com.yahoo.component.ComponentId |
defaultRendererId |
static com.yahoo.component.ComponentId |
jsonRendererId |
private com.yahoo.component.ComponentId |
pageRendererId |
private com.yahoo.component.ComponentId |
tiledRendererId |
static com.yahoo.component.ComponentId |
xmlRendererId |
Constructor and Description |
---|
RendererRegistry()
Creates a registry containing the built-in renderers only
|
RendererRegistry(Collection<com.yahoo.processing.rendering.Renderer> renderers)
Creates a registry of the given renderers plus the built-in ones
|
RendererRegistry(Collection<com.yahoo.processing.rendering.Renderer> renderers,
Executor executor)
Creates a registry of the given renderers plus the built-in ones, using a custom executor.
|
RendererRegistry(Executor executor)
Creates a registry containing the built-in renderers only, using a custom executor.
|
Modifier and Type | Method and Description |
---|---|
private com.yahoo.component.ComponentId |
addTemplateSet(UserTemplate<?> templateSet) |
void |
deconstruct()
Must be called when use of this is discontinued to free the resources it has allocated
|
com.yahoo.processing.rendering.Renderer<Result> |
getDefaultRenderer()
Returns the default JSON renderer
|
com.yahoo.processing.rendering.Renderer<Result> |
getRenderer(com.yahoo.component.ComponentSpecification format)
Returns the requested renderer.
|
private String |
rendererNames() |
public static final com.yahoo.component.ComponentId xmlRendererId
public static final com.yahoo.component.ComponentId jsonRendererId
public static final com.yahoo.component.ComponentId defaultRendererId
private final com.yahoo.component.ComponentId tiledRendererId
private final com.yahoo.component.ComponentId pageRendererId
public RendererRegistry()
public RendererRegistry(Executor executor)
public RendererRegistry(Collection<com.yahoo.processing.rendering.Renderer> renderers)
public RendererRegistry(Collection<com.yahoo.processing.rendering.Renderer> renderers, Executor executor)
public void deconstruct()
private com.yahoo.component.ComponentId addTemplateSet(UserTemplate<?> templateSet)
public com.yahoo.processing.rendering.Renderer<Result> getDefaultRenderer()
public com.yahoo.processing.rendering.Renderer<Result> getRenderer(com.yahoo.component.ComponentSpecification format)
format
- the id or format alias of the renderer to return. If null is passed the default renderer
is returnedIllegalArgumentException
- if the renderer cannot be resolvedprivate String rendererNames()
Copyright © 2017. All rights reserved.