aerogear-controller 1.0.1

org.jboss.aerogear.controller.view
Class AbstractViewResponder

java.lang.Object
  extended by 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

Constructor Summary
AbstractViewResponder()
           
 
Method Summary
 boolean accepts(String mediaType)
          Determines whether this responder can respond to the passed-in @{code mediaType}
abstract  ViewResolver getViewResolver()
           
 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
 
Methods inherited from interface org.jboss.aerogear.controller.router.Responder
getMediaType
 

Constructor Detail

AbstractViewResponder

public AbstractViewResponder()
Method Detail

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.

aerogear-controller 1.0.1

Copyright © 2013 JBoss, a division of Red Hat, Inc.. All Rights Reserved.