java.lang.Object
io.jstach.opt.dropwizard.JStachioViewRenderer
- All Implemented Interfaces:
io.dropwizard.views.common.ViewRenderer
Dropwizard view support. Doing the below will automatically pick up JStachio
bootstrap.addBundle(new ViewBundle<>());
Or alternatively you can pass it directly:
JStachio jstachio = ...; // See JStachioFactory
bootstrap.addBundle(new ViewBundle<>(new JStachioViewRenderer(jstachio)));
- Author:
- agentgt
-
Constructor Summary
ConstructorsConstructorDescriptionServiceLoader will call thisJStachioViewRenderer(JStachio jstachio) Programmatically create the renderer with the given jstachio. -
Method Summary
Modifier and TypeMethodDescriptionvoidfinal StringbooleanisRenderable(io.dropwizard.views.common.View view) protected JStachiojstachio()Internal getter for the jstachio backing this renderervoidrender(io.dropwizard.views.common.View view, Locale locale, OutputStream output)
-
Constructor Details
-
JStachioViewRenderer
public JStachioViewRenderer()ServiceLoader will call this -
JStachioViewRenderer
Programmatically create the renderer with the given jstachio.- Parameters:
jstachio- a jstachio instance.- See Also:
-
-
Method Details
-
isRenderable
- Specified by:
isRenderablein interfaceio.dropwizard.views.common.ViewRenderer
-
render
public void render(io.dropwizard.views.common.View view, Locale locale, OutputStream output) throws IOException - Specified by:
renderin interfaceio.dropwizard.views.common.ViewRenderer- Throws:
IOException
-
jstachio
Internal getter for the jstachio backing this renderer- Returns:
- not null
- Throws:
NullPointerException- if jstachio has not been set yet.
-
configure
- Specified by:
configurein interfaceio.dropwizard.views.common.ViewRenderer
-
getConfigurationKey
- Specified by:
getConfigurationKeyin interfaceio.dropwizard.views.common.ViewRenderer
-