use of abs.backend.java.lib.net.msg.ObjectMsg in project abstools by abstools.
the class DefaultRouter method getNextNode.
@Override
public NetNode getNextNode(Msg m) {
if (m instanceof ObjectTargetMsg) {
ObjectTargetMsg om = (ObjectTargetMsg) m;
ABSObject target = om.getTarget();
if (routeForObject.containsKey(target)) {
return routeForObject.get(target).getNextNode();
} else {
return node.defaultRoute();
}
} else if (m instanceof ObjectMsg) {
ObjectMsg om = (ObjectMsg) m;
NetCOG target = om.getCOG();
if (routeForCOG.containsKey(target)) {
return routeForCOG.get(target).getNextNode();
} else {
return node.defaultRoute();
}
} else {
return node.defaultRoute();
}
}
Aggregations