From 0e715bd79a5d326d94cc5f198d40994f8910e037 Mon Sep 17 00:00:00 2001 From: Boris Grozev Date: Fri, 24 Jul 2015 18:15:35 -0500 Subject: [PATCH] Allows the tie breaker value for an Agent to be set (patch my Matt Fredrickson). --- src/org/ice4j/ice/Agent.java | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/org/ice4j/ice/Agent.java b/src/org/ice4j/ice/Agent.java index 8683eb1..d1e2f52 100644 --- a/src/org/ice4j/ice/Agent.java +++ b/src/org/ice4j/ice/Agent.java @@ -178,7 +178,7 @@ public class Agent * repair the case where both agents believe to have the controlling or the * controlled role. */ - private final long tieBreaker; + private long tieBreaker; /** * Determines whether this is the controlling agent in a an ICE interaction. @@ -311,6 +311,16 @@ public class Agent nominator = new DefaultNominator(this); } + /** + * Sets the tie breaker value. Note that to this should be set early (before + * connectivity checks start). + * @param tieBreakerInput the value to set. + */ + public void setTieBreaker(long tieBreakerInput) + { + tieBreaker = tieBreakerInput; + } + /** * Creates a new media stream and stores it. *