public class DefaultRouter extends Object implements Router
Router.
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 RouteProcessor |
routeProcessor |
private Routes |
routes |
| Constructor and Description |
|---|
DefaultRouter() |
DefaultRouter(javax.enterprise.inject.Instance<RoutingModule> instance,
RouteProcessor routeProcessor) |
| Modifier and Type | Method and Description |
|---|---|
void |
dispatch(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
javax.servlet.FilterChain chain)
Dispatches to an appropriate
Route. |
boolean |
hasRouteFor(javax.servlet.http.HttpServletRequest request)
|
private Routes routes
private RouteProcessor routeProcessor
public DefaultRouter()
@Inject public DefaultRouter(javax.enterprise.inject.Instance<RoutingModule> instance, RouteProcessor routeProcessor)
public boolean hasRouteFor(javax.servlet.http.HttpServletRequest request)
RouterhasRouteFor in interface Routerrequest - the HttpServletRequest.true if this Router has a Route for the HttpServletRequest, otherwise false.Copyright © 2013 JBoss, a division of Red Hat, Inc.. All Rights Reserved.