org.jboss.aerogear.controller.view
Class AbstractViewResponder
java.lang.Object
org.jboss.aerogear.controller.view.AbstractViewResponder
- All Implemented Interfaces:
- Responder
- Direct Known Subclasses:
- ErrorViewResponder, HtmlViewResponder, JspViewResponder
public abstract class AbstractViewResponder
- extends Object
- implements Responder
A Responder that "responds" to requests by forwarding them to a View.
- See Also:
ViewResolver
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractViewResponder
public AbstractViewResponder()
getViewResolver
public abstract ViewResolver getViewResolver()
accepts
public boolean accepts(String mediaType)
- Description copied from interface:
Responder
- Determines whether this responder can respond to the passed-in @{code mediaType}
- Specified by:
accepts in interface Responder
- Parameters:
mediaType - the mediaType that this responder supports.
- Returns:
- @{code true} if this responder can handle the media type passed in, false otherwise.
respond
public void respond(Object entity,
RouteContext routeContext)
throws Exception
- Description copied from interface:
Responder
- Responds to the current request in a why appropriate to the type of Responder (forward, return).
- Specified by:
respond in interface Responder
- Parameters:
entity - the entity returned from a Route endpoint.routeContext - the current RouteContext.
- Throws:
Exception - if an error occurs while responding.
Copyright © 2013 JBoss, a division of Red Hat, Inc.. All Rights Reserved.