org.jboss.aerogear.controller.router
Class MvcResponder
java.lang.Object
org.jboss.aerogear.controller.router.MvcResponder
- All Implemented Interfaces:
- Responder
public class MvcResponder
- extends Object
- implements Responder
A Responder that "responds" to request by forwarding them to a View.
|
Method Summary |
boolean |
accepts(String mediaType)
Determines whether this responder can respond to the passed-in @{code mediaType} |
void |
respond(Object entity,
RouteContext routeContext)
Responds to the current request in a why appropriate to the type of Responder (forward, return). |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
viewResolver
private ViewResolver viewResolver
MvcResponder
@Inject
public MvcResponder(ViewResolver viewResolver)
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 © 2012 JBoss, a division of Red Hat, Inc.. All Rights Reserved.