Interface ViewProcessor<T>

Type Parameters:
T - the type of the template object.

public interface ViewProcessor<T>

A view processor.

Implementations of this interface shall be capable of resolving a template name to a template reference that identifies a template supported by the implementation. And, processing the template, identified by template reference, the results of which are written to an output stream.

Implementations can register a view processor as a provider, for example, annotating the implementation class with Provider or registering an implementing class or instance as a singleton with ResourceConfig or Application.

Such view processors could be JSP view processors (supported by the Jersey servlet and filter implementations) or say Freemarker or Velocity view processors (not implemented).


Method Summary
 Tresolve(java.lang.String name)
          Resolve a template name to a template reference.
 voidwriteTo(T t, Viewable viewable, out)
          Process a template and write the result to an output stream.

Method Detail


T resolve(java.lang.String name)
Resolve a template name to a template reference.

name - the template name
the template reference, otherwise null if the template name cannot be resolved.


void writeTo(T t,             Viewable viewable,    out)             throws
Process a template and write the result to an output stream.

t - the template reference. This is obtained by calling the resolve(java.lang.String) method with a template name.
viewable - the viewable that contains the model to be passed to the template.
out - the output stream to write the result of processing the template.
Throws: - if there was an error processing the template.

Copyright © 2013
Oracle Corporation. All Rights Reserved.

Add the Maven Dependecy to your project: maven dependecy for com.amazonaws : aws-java-sdk : 1.3.14