public class ConnectionRenderer extends AbstractRenderer
Renderer implementation based on an external connection. It also supports
XSLT-transforming of the obtained result.
An example of a ConnectionRenderer is the following one:
<block name="mmbase_news"
classification="mmbase.about:100"
mimetype="text/html">
<title xml:lang="nl">Nieuws</title>
<title xml:lang="en">News</title>
<description xml:lang="en">Shows latest news from the mmbase site</description>
<body>
<class name="org.mmbase.framework.ConnectionRenderer">
<param name="url">http://www.mmbase.org/rss</param>
<param name="xslt">xslt/rss.xslt</param>
</class>
</body>
</block>
Renderer.Type| Modifier and Type | Field and Description |
|---|---|
protected boolean |
decorate |
protected int |
timeOut |
protected URL |
url |
protected String |
xsl |
type| Constructor and Description |
|---|
ConnectionRenderer(Renderer.Type t,
Block parent) |
| Modifier and Type | Method and Description |
|---|---|
Parameter[] |
getParameters()
A renderer may need certain parameters.
|
URI |
getUri(Parameters blockParameter,
RenderHints hints)
Ann URL which may identify a specific rendition
|
void |
render(Parameters blockParameters,
Writer w,
RenderHints hints)
Renders to a writer.
|
void |
setDecorate(boolean d) |
void |
setTimeOut(int t) |
void |
setUrl(String u) |
void |
setXslt(String x) |
String |
toString() |
decorateIntro, decorateOutro, getBlock, getType, getUriprotected URL url
protected int timeOut
protected String xsl
protected boolean decorate
public ConnectionRenderer(Renderer.Type t, Block parent)
public void setUrl(String u) throws MalformedURLException
MalformedURLExceptionpublic void setXslt(String x) throws MalformedURLException
MalformedURLExceptionpublic void setTimeOut(int t)
public void setDecorate(boolean d)
public Parameter[] getParameters()
RenderergetParameters in interface RenderergetParameters in class AbstractRendererpublic void render(Parameters blockParameters, Writer w, RenderHints hints) throws FrameworkException
Rendererrender in interface Rendererrender in class AbstractRendererFrameworkExceptionpublic URI getUri(Parameters blockParameter, RenderHints hints)
RenderergetUri in interface RenderergetUri in class AbstractRendererMMBase 1.9-SNAPSHOT - ${javadoctimestamp}