style: Field order, whitespace, spelling.

This commit is contained in:
Boris Grozev 2016-11-30 10:51:55 -06:00
parent 6603ac3c28
commit d0afb0a55b
5 changed files with 95 additions and 93 deletions

View File

@ -296,7 +296,7 @@ public class CandidatePair
{ {
throw new IllegalArgumentException( throw new IllegalArgumentException(
"Putting a pair into the In-Progress state MUST be" "Putting a pair into the In-Progress state MUST be"
+ " accomapnied with the TransactionID of the" + " accompanied with the TransactionID of the"
+ " connectivity check."); + " connectivity check.");
} }
} }

View File

@ -609,8 +609,11 @@ class ConnectivityCheckClient
//Succeeded. Note that, the pair which *generated* the check may be //Succeeded. Note that, the pair which *generated* the check may be
//different than the valid pair constructed above //different than the valid pair constructed above
if (checkedPair.getParentComponent().getSelectedPair() == null) if (checkedPair.getParentComponent().getSelectedPair() == null)
{
logger.info("Pair succeeded: " + checkedPair.toShortString() logger.info("Pair succeeded: " + checkedPair.toShortString()
+ ". Local ufrag " + parentAgent.getLocalUfrag()); + ". Local ufrag "
+ parentAgent.getLocalUfrag());
}
checkedPair.setStateSucceeded(); checkedPair.setStateSucceeded();
} }
@ -805,7 +808,7 @@ class ConnectivityCheckClient
boolean wasControlling boolean wasControlling
= originalRequest.containsAttribute(Attribute.ICE_CONTROLLING); = originalRequest.containsAttribute(Attribute.ICE_CONTROLLING);
logger.finer("Swithing to isControlling=" + !wasControlling); logger.finer("Switching to isControlling=" + !wasControlling);
parentAgent.setControlling(!wasControlling); parentAgent.setControlling(!wasControlling);
pair.getParentComponent().getParentStream().getCheckList() pair.getParentComponent().getParentStream().getCheckList()

View File

@ -52,7 +52,7 @@ public class DefaultNominator
/** /**
* Map that will remember association between validated relayed candidate * Map that will remember association between validated relayed candidate
* and a timer. It is use with the NOMINATE_FIRST_HIGHEST_VALID strategy. * and a timer. It is used with the NOMINATE_FIRST_HIGHEST_VALID strategy.
*/ */
private final Map<String, TimerTask> validatedCandidates = new HashMap<>(); private final Map<String, TimerTask> validatedCandidates = new HashMap<>();
@ -141,7 +141,8 @@ public class DefaultNominator
*/ */
private void strategyNominateFirstValid(PropertyChangeEvent evt) private void strategyNominateFirstValid(PropertyChangeEvent evt)
{ {
if(IceMediaStream.PROPERTY_PAIR_VALIDATED.equals(evt.getPropertyName())) if (IceMediaStream.PROPERTY_PAIR_VALIDATED
.equals(evt.getPropertyName()))
{ {
CandidatePair validPair = (CandidatePair)evt.getSource(); CandidatePair validPair = (CandidatePair)evt.getSource();
@ -314,10 +315,9 @@ public class DefaultNominator
*/ */
public void propertyChange(PropertyChangeEvent evt) public void propertyChange(PropertyChangeEvent evt)
{ {
/* check list has running out of ordinary checks, see if all other // check list has running out of ordinary checks, see if all other
* candidates are FAILED, in which case we nominate immediately // candidates are FAILED, in which case we nominate immediately
* the relayed candidate // the relayed candidate
*/
CheckList checkList = (CheckList)evt.getSource(); CheckList checkList = (CheckList)evt.getSource();
boolean allFailed = true; boolean allFailed = true;

View File

@ -68,6 +68,19 @@ public class IceMediaStream
*/ */
public static final String PROPERTY_PAIR_VALIDATED = "PairValidated"; public static final String PROPERTY_PAIR_VALIDATED = "PairValidated";
/**
* Use builder pattern to provide an immutable IceMediaStream instance.
*
* @param name the name of the media stream
* @param parentAgent the agent that is handling the session that this
* media stream is a part of
* @return IceMediaStream
*/
public static IceMediaStream build(Agent parentAgent, String name)
{
return new IceMediaStream(parentAgent, name);
}
/** /**
* The name of this media stream. The name is equal to the value specified * The name of this media stream. The name is equal to the value specified
* in the SDP description. * in the SDP description.
@ -898,18 +911,4 @@ public class IceMediaStream
{ {
return remotePassword; return remotePassword;
} }
/**
* Use builder pattern to provide an immutable IceMediaStream instance.
*
* @param name the name of the media stream
* @param parentAgent the agent that is handling the session that this
* media stream is a part of
* @return IceMediaStream
*/
public static IceMediaStream build(Agent parentAgent, String name)
{
return new IceMediaStream(parentAgent, name);
}
} }