- for(RpcRouter.RouteIdentifier<?, ?, ?> route : table.getRoutes()){
- if(route.getRoute() != null) {
- String routeString = route.getRoute().toString();
- if(routeString.contains(routeName)) {
- StringBuilder builder = new StringBuilder(ROUTE_CONSTANT);
- builder.append(routeString).append(NAME_CONSTANT).append(route.getType() != null ?
- route.getType().toString() : NULL_CONSTANT);
- rpcMap.put(builder.toString(), address);
+ for (DOMRpcIdentifier route : routes) {
+ if (!route.getContextReference().isEmpty()) {
+ String routeString = route.getContextReference().toString();
+ if (routeString.contains(routeName)) {
+ rpcMap.put(ROUTE_CONSTANT + routeString + NAME_CONSTANT + route.getType(), address);