Package spark

Class ResponseTransformerRouteImpl

java.lang.Object
spark.RouteImpl
spark.ResponseTransformerRouteImpl
All Implemented Interfaces:
Route, Wrapper

public abstract class ResponseTransformerRouteImpl extends RouteImpl
A ResponseTransformerRouteImpl is built up by a path (for url-matching) and the implementation of the 'render' method. ResponseTransformerRoute instead of returning the result of calling toString() as body, it returns the result of calling render method. The primary purpose of this kind of Route is provide a way to create generic and reusable transformers. For example to convert an Object to JSON format.