protected boolean forwardAdvertisement ( TrustGraphAdvertisement message ) { // don't forward if the forwarding policy rejects if ( ! shouldForward ( message ) ) { return false ; } // determine the next hop to send to TrustGraphNodeId nextHop = getRoutingTable ( ) . getNextHop ( message ) ; // if there is no next hop, reject if ( nextHop == null ) { return false ; } // forward the message to the next node on the route // with ttl decreased by 1 sendAdvertisement ( message , nextHop , message . getInboundTTL ( ) - 1 ) ; return true ; }
This method performs the forwarding behavior for a received message . The message is forwarded to the next hop on the route according to the routing table with ttl decreased by 1 .