| Modifier and Type | Field and Description |
|---|---|
private Map<MediaType,Responder> |
responders |
| Constructor and Description |
|---|
Responders(javax.enterprise.inject.Instance<Responder> responders) |
| Modifier and Type | Method and Description |
|---|---|
private boolean |
respond(MediaType mediaType,
Object result,
RouteContext routeContext) |
void |
respond(RouteContext routeContext,
Object result)
Responds to the Route in the passed-in RouteContext using an appropriate Responder.
|
private void |
respondAny(Set<MediaType> mediaTypes,
Object result,
RouteContext routeContext) |
String |
toString() |
@Inject public Responders(javax.enterprise.inject.Instance<Responder> responders)
public void respond(RouteContext routeContext, Object result) throws Exception
Responder used to respond is determined by inspecting the HTTP Accept header values and matching these with
the media types that the Route is capable of producing (Route.produces()) routeContext - the current route contextresult - the result from invoking the Route's target endpoint method.Exception - if an exception is thrown while trying to respond.private boolean respond(MediaType mediaType, Object result, RouteContext routeContext) throws Exception
Exceptionprivate void respondAny(Set<MediaType> mediaTypes, Object result, RouteContext routeContext) throws Exception
ExceptionCopyright © 2013 JBoss, a division of Red Hat, Inc.. All Rights Reserved.