@Service(value=RendererFactory.class) @Reference(name="typeRenderlet", cardinality=OPTIONAL_MULTIPLE, policy=DYNAMIC, referenceInterface=TypeRenderlet.class) public class RendererFactory extends Object
Renderer
which can used to render a GraphNode
.Constructor and Description |
---|
RendererFactory() |
Modifier and Type | Method and Description |
---|---|
protected void |
activate(org.osgi.service.component.ComponentContext componentContext) |
protected void |
bindTypeRenderlet(org.osgi.framework.ServiceReference serviceReference) |
Renderer |
createRenderer(GraphNode resource,
String mode,
List<javax.ws.rs.core.MediaType> acceptableMediaTypes)
Creates a
Renderer for the specified mode, acceptable
media-types as well as the types of GraphNode . |
protected void |
deactivate(org.osgi.service.component.ComponentContext componentContext) |
protected void |
unbindTypeRenderlet(TypeRenderlet typeRenderlet) |
protected void activate(org.osgi.service.component.ComponentContext componentContext)
protected void deactivate(org.osgi.service.component.ComponentContext componentContext)
public Renderer createRenderer(GraphNode resource, String mode, List<javax.ws.rs.core.MediaType> acceptableMediaTypes)
Renderer
for the specified mode, acceptable
media-types as well as the types of GraphNode
.
The acceptableMediaTypes
list represent the media
types that are acceptable for the rendered output. The list has a
order where the most desirable media type is a the beginning of the list.
The media type of the rendered output will be compatible to at least one
media type in the list.resource
- The GraphNode
to be renderedmode
- modeacceptableMediaTypes
- acceptable media types for the rendered outputprotected void bindTypeRenderlet(org.osgi.framework.ServiceReference serviceReference)
protected void unbindTypeRenderlet(TypeRenderlet typeRenderlet)
Copyright © 2014 The Apache Software Foundation. All Rights Reserved.