public class HtmlSerializerMiddlewares extends Object
Modifier and Type | Method and Description |
---|---|
static <T> Middleware<AsyncHandler<T>,AsyncHandler<Response<okio.ByteString>>> |
htmlSerialize(String templateName)
Async middleware for POJO.
|
static <T> Middleware<AsyncHandler<Response<T>>,AsyncHandler<Response<okio.ByteString>>> |
htmlSerializeResponse(String templateName)
Async middleware for a Response object.
|
static <T> Middleware<SyncHandler<Response<T>>,AsyncHandler<Response<okio.ByteString>>> |
htmlSerializeResponseSync(String templateName)
Sync middleware for a Response object.
|
static <T> Middleware<SyncHandler<T>,AsyncHandler<Response<okio.ByteString>>> |
htmlSerializeSync(String templateName)
Sync middleware for POJO.
|
static <T> okio.ByteString |
serialize(String templateName,
T object)
Call the template engine and return the result.
|
public static <T> okio.ByteString serialize(String templateName, T object)
T
- The Type of the parameterstemplateName
- The template name, respective to the "resources" folderobject
- The parameter to pass to the templatepublic static <T> Middleware<AsyncHandler<T>,AsyncHandler<Response<okio.ByteString>>> htmlSerialize(String templateName)
T
- The Type of the parameterstemplateName
- The template name, respective to the "resources" folderpublic static <T> Middleware<AsyncHandler<Response<T>>,AsyncHandler<Response<okio.ByteString>>> htmlSerializeResponse(String templateName)
T
- The Type of the parameterstemplateName
- The template name, respective to the "resources" folderpublic static <T> Middleware<SyncHandler<T>,AsyncHandler<Response<okio.ByteString>>> htmlSerializeSync(String templateName)
T
- The Type of the parameterstemplateName
- The template name, respective to the "resources" folderpublic static <T> Middleware<SyncHandler<Response<T>>,AsyncHandler<Response<okio.ByteString>>> htmlSerializeResponseSync(String templateName)
T
- The Type of the parameterstemplateName
- The template name, respective to the "resources" folderCopyright © 2016. All rights reserved.