MCPcopy Create free account
hub / github.com/annmuor/jnode / getRouting

Method getRouting

jnode-core/src/jnode/ftn/FtnTools.java:884–905  ·  view source on GitHub ↗

Получаем роутинг для нетмейла @param message @return

(FtnMessage message)

Source from the content-addressed store, hash-verified

882 * @return
883 */
884 public static Link getRouting(FtnMessage message) {
885 Link routeVia;
886 FtnAddress routeTo = message.getToAddr().clone();
887 routeVia = getLinkByFtnAddress(routeTo);
888 // check our point
889 if (!isOurPoint(routeTo)) {
890 routeTo.setPoint(0);
891 routeVia = getLinkByFtnAddress(routeTo);
892 // а теперь - по роутингу
893 if (routeVia == null) {
894 List<Route> routes = ORMManager.get(Route.class).getOrderAnd(
895 "nice", true);
896 for (Route route : routes) {
897 if (completeMask(route, message)) {
898 routeVia = route.getRouteVia();
899 break;
900 }
901 }
902 }
903 }
904 return routeVia;
905 }
906
907 public static Link getRoutingFallback(FtnMessage message,
908 Link previousRouteVia) {

Callers 2

writeNetmailMethod · 0.95
tossNetmailMethod · 0.80

Calls 9

getLinkByFtnAddressMethod · 0.95
isOurPointMethod · 0.95
setPointMethod · 0.95
getMethod · 0.95
completeMaskMethod · 0.95
cloneMethod · 0.80
getOrderAndMethod · 0.80
getToAddrMethod · 0.45
getRouteViaMethod · 0.45

Tested by

no test coverage detected