forked from KNEMC/KLALB
Replace the combined node-info protocol with independent profile, external-endpoint, and extra-route requests. Aggregate consumers use NodeInfoQueryCoordinator and validate response source addresses. BREAKING CHANGE: nodeinfotinyreq/resp and nodeinfofullreq/resp are removed. Peers must use the profile, external-endpoint, and extra-route request pairs.
48 lines
1.1 KiB
Java
48 lines
1.1 KiB
Java
package org.kne.cloud.network.srv6;
|
|
|
|
import java.util.ArrayList;
|
|
import java.util.Collections;
|
|
import java.util.List;
|
|
import java.util.Objects;
|
|
|
|
public final class ExtraRoutesResult {
|
|
private final List<String> extraRoutes;
|
|
private final NodeInfoQueryStatus status;
|
|
|
|
public ExtraRoutesResult(List<String> extraRoutes, NodeInfoQueryStatus status) {
|
|
this.extraRoutes = Collections.unmodifiableList(new ArrayList<String>(
|
|
extraRoutes == null ? Collections.<String>emptyList() : extraRoutes));
|
|
this.status = status;
|
|
}
|
|
|
|
public List<String> getExtraRoutes() {
|
|
return extraRoutes;
|
|
}
|
|
|
|
public NodeInfoQueryStatus getStatus() {
|
|
return status;
|
|
}
|
|
|
|
@Override
|
|
public int hashCode() {
|
|
return Objects.hash(extraRoutes, status);
|
|
}
|
|
|
|
@Override
|
|
public boolean equals(Object obj) {
|
|
if (this == obj) {
|
|
return true;
|
|
}
|
|
if (!(obj instanceof ExtraRoutesResult)) {
|
|
return false;
|
|
}
|
|
ExtraRoutesResult other = (ExtraRoutesResult) obj;
|
|
return Objects.equals(extraRoutes, other.extraRoutes) && status == other.status;
|
|
}
|
|
|
|
@Override
|
|
public String toString() {
|
|
return "ExtraRoutesResult [extraRoutes=" + extraRoutes + ", status=" + status + "]";
|
|
}
|
|
}
|