public class DefaultRouteProcessor extends Object implements RouteProcessor
RouteProcessor.
This implementation uses Context and Dependency Injection (CDI) to have various parts injected into it. OfRoutingModule which is described in more detail in the section below.
RoutingModule upon deployment, and itsRoutingModule.build() method will be called to assemble the routes configured for this application.AbstractRoutingModule is provided, please refer its javadoc for sample usage.| Modifier and Type | Field and Description |
|---|---|
private javax.enterprise.inject.spi.BeanManager |
beanManager |
private Map<String,Consumer> |
consumers |
private ControllerFactory |
controllerFactory |
private Responders |
responders |
| Constructor and Description |
|---|
DefaultRouteProcessor() |
DefaultRouteProcessor(javax.enterprise.inject.spi.BeanManager beanManager,
javax.enterprise.inject.Instance<Consumer> consumers,
Responders responders,
ControllerFactory controllerFactory) |
| Modifier and Type | Method and Description |
|---|---|
private String |
argAsString(Map<String,Object> args,
String argName) |
private Object |
getController(Route route) |
PagingStrategy |
getPagingStrategy(Route route,
Map<String,Object> args) |
private boolean |
hasPaginatedAnnotation(Method targetMethod) |
private List<Object> |
merge(PaginationInfo paginationInfo,
Map<String,Object> arguments) |
void |
process(RouteContext routeContext)
Handles the actual invocation of the target or the passed-in
Route. |
private void |
processPaged(RouteContext routeContext,
Map<String,Object> arguments) |
private javax.enterprise.inject.spi.BeanManager beanManager
private ControllerFactory controllerFactory
private Responders responders
public DefaultRouteProcessor()
@Inject
public DefaultRouteProcessor(javax.enterprise.inject.spi.BeanManager beanManager,
javax.enterprise.inject.Instance<Consumer> consumers,
Responders responders,
ControllerFactory controllerFactory)
public void process(RouteContext routeContext) throws Exception
RouteProcessorRoute.process in interface RouteProcessorrouteContext - the RouteContext for the current request.Exception - if processing of the route causes an exception.private void processPaged(RouteContext routeContext, Map<String,Object> arguments) throws Exception
Exceptionpublic PagingStrategy getPagingStrategy(Route route, Map<String,Object> args)
private boolean hasPaginatedAnnotation(Method targetMethod)
Copyright © 2013 JBoss, a division of Red Hat, Inc.. All Rights Reserved.