org.jboss.aerogear.controller.router.rest
Class JsonResponder
java.lang.Object
org.jboss.aerogear.controller.router.rest.AbstractRestResponder
org.jboss.aerogear.controller.router.rest.JsonResponder
- All Implemented Interfaces:
- Responder
public class JsonResponder
- extends AbstractRestResponder
A RESTFul Responder that is able to return JSON responses.
This implementation uses Jackson for JSON support.
|
Method Summary |
void |
writeResponse(Object entity,
RouteContext routeContext)
Writes the passed-in entity to the HttpServletResponse enabling concrete implementation
to add additional headers of in other ways process the response. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JsonResponder
public JsonResponder()
writeResponse
public void writeResponse(Object entity,
RouteContext routeContext)
throws Exception
- Description copied from class:
AbstractRestResponder
- Writes the passed-in entity to the
HttpServletResponse enabling concrete implementation
to add additional headers of in other ways process the response.
- Specified by:
writeResponse in class AbstractRestResponder
- Parameters:
entity - the entity returned from a Route endpoint.routeContext - the current RouteContext.
- Throws:
Exception - if an error occurs while responding.
Copyright © 2012 JBoss, a division of Red Hat, Inc.. All Rights Reserved.