public ExchangeContext(RoutingTable localRT, boolean invited, int maxRef) {
        ArgumentCheck.checkNotNull(localRT, "Null RoutingTable given.");
        if (maxRef < 0) {
            throw new IllegalArgumentException("Negative maxRef given");
        }

        maxRef_ = maxRef;
        localRoutingTable_ = localRT;
        invited_ = invited;
        recursive_ = false;
        commonPathLength_ = 0;
        readyForExchange_ = false;
    }