java.lang.Object
io.inverno.mod.irt.AbstractTemplateSet
io.inverno.mod.irt.AbstractByteBufTemplateSet
- All Implemented Interfaces:
ByteBufTemplateSet
,TemplateSet
public abstract class AbstractByteBufTemplateSet
extends AbstractTemplateSet
implements ByteBufTemplateSet
A TemplateSet
base implementation template sets which renders data in
a ByteBuf.
- Since:
- 1.2
- Author:
- Jeremy Kuhn
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.inverno.mod.irt.TemplateSet
TemplateSet.IndexableRenderable<T>, TemplateSet.Renderable<T>
-
Field Summary
Fields inherited from class io.inverno.mod.irt.AbstractTemplateSet
charset
Fields inherited from interface io.inverno.mod.irt.TemplateSet
COMPLETED_FUTURE
-
Constructor Summary
ConstructorDescriptionAbstractByteBufTemplateSet
(Charset charset, ByteBuf buffer) Creates a ByteBuf template set. -
Method Summary
Modifier and TypeMethodDescriptionReturns the ByteBuffer containing the rendered data.render
(byte[] value) Renders a byte array to the output.Renders a ByteBuf to the output.Renders an object to the output.Renders a string to the output.Methods inherited from class io.inverno.mod.irt.AbstractTemplateSet
applyTemplate, applyTemplate, applyTemplate, applyTemplate, applyTemplate
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.inverno.mod.irt.TemplateSet
applyTemplate, applyTemplate, applyTemplate, applyTemplate, applyTemplate, template
-
Constructor Details
-
AbstractByteBufTemplateSet
Creates a ByteBuf template set.
- Parameters:
charset
- the charset to use to encode databuffer
- the buffer into which data must be rendered
-
-
Method Details
-
getOutput
Returns the ByteBuffer containing the rendered data.
- Returns:
- a ByteBuffer
-
render
Description copied from interface:TemplateSet
Renders an object to the output.
This method might invoke specialized methods based on the actual type of the object. If no specific method is found the string representation of the object must be rendered.
- Specified by:
render
in interfaceTemplateSet
- Overrides:
render
in classAbstractTemplateSet
- Parameters:
value
- the object to render- Returns:
- a future which completes once the value is rendered
-
render
Description copied from interface:ByteBufTemplateSet
Renders a ByteBuf to the output.
- Specified by:
render
in interfaceByteBufTemplateSet
- Parameters:
value
- the ByteBuf to render- Returns:
- a future which completes once the value is rendered
-
render
Description copied from interface:TemplateSet
Renders a string to the output.
- Specified by:
render
in interfaceTemplateSet
- Parameters:
value
- the string to render- Returns:
- a future which completes once the value is rendered
-
render
Description copied from interface:TemplateSet
Renders a byte array to the output.
- Specified by:
render
in interfaceTemplateSet
- Parameters:
value
- The byte array to render- Returns:
- a future which completes once the value is rendered
-