|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.lastbamboo.common.ice.IceCheckListImpl
public class IceCheckListImpl
Class containing data and state for an ICE check list.
See: http://tools.ietf.org/html/draft-ietf-mmusic-ice-17#section-5.7
| Constructor Summary | |
|---|---|
IceCheckListImpl(IceCandidatePairFactory candidatePairFactory,
Collection<IceCandidate> localCandidates)
Creates a new check list, starting with only local candidates. |
|
| Method Summary | |
|---|---|
void |
addPair(IceCandidatePair pair)
Adds the specified ICE candidate pair to the check list. |
void |
addTriggeredPair(IceCandidatePair pair)
Adds a pair to the triggered check queue. |
void |
check()
|
void |
close()
Close all candidates pair connections. |
void |
executeOnPairs(org.littleshoot.util.Closure<IceCandidatePair> closure)
Executes the specified Closure on candidate pairs in the
check list. |
void |
formCheckList(Collection<IceCandidate> remoteCandidates)
Forms the check list. |
IceCheckListState |
getState()
Accessor for the state of the check list. |
boolean |
hasHigherPriorityPendingPair(IceCandidatePair pair)
Checks whether or not there are existing pairs on either the triggered check list or the normal check list. |
boolean |
isActive()
Returns whether or not this check list is considered "active" and should count towards the value of N in timer computation from section 5.8. |
boolean |
matchesAll(org.littleshoot.util.Predicate<IceCandidatePair> pred)
Returns whether all the pairs in the check list fit the given predicate. |
boolean |
matchesAny(org.littleshoot.util.Predicate<IceCandidatePair> pred)
Returns whether or not any pairs match the specified criteria. |
void |
recomputePairPriorities(boolean controlling)
Recomputes the priorities of pairs in checklists. |
IceCandidatePair |
removeTopTriggeredPair()
Removes the top triggered pair. |
void |
removeWaitingAndFrozenPairs(IceCandidatePair nominatedPair)
Notifies the media stream that there's been a nominated pair. |
IceCandidatePair |
selectAnyPair(org.littleshoot.util.Predicate<IceCandidatePair> pred)
Selects the first pair matching the predicate from any check list. |
IceCandidatePair |
selectPair(org.littleshoot.util.Predicate<IceCandidatePair> pred)
Selects the first pair matching the predicate from the normal check list. |
void |
setState(IceCheckListState state)
Sets the state of the check list. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public IceCheckListImpl(IceCandidatePairFactory candidatePairFactory,
Collection<IceCandidate> localCandidates)
candidatePairFactory - Factory for creating candidate pairs.localCandidates - The local candidates to use in the check list.| Method Detail |
|---|
public IceCandidatePair removeTopTriggeredPair()
IceCheckList
removeTopTriggeredPair in interface IceCheckListnull if there is no
such pair.public void setState(IceCheckListState state)
IceCheckList
setState in interface IceCheckListstate - The state of the check list.public IceCheckListState getState()
IceCheckList
getState in interface IceCheckListpublic void check()
check in interface IceCheckListpublic boolean isActive()
IceCheckList
isActive in interface IceCheckListtrue if the check list is active, otherwise
false.public void addTriggeredPair(IceCandidatePair pair)
IceCheckList
addTriggeredPair in interface IceCheckListpair - The pair to add.public void addPair(IceCandidatePair pair)
IceCheckList
addPair in interface IceCheckListpair - The pair to add.public void recomputePairPriorities(boolean controlling)
IceCheckList
recomputePairPriorities in interface IceCheckListcontrolling - The current controlling status of the agent.public void formCheckList(Collection<IceCandidate> remoteCandidates)
IceCheckList
formCheckList in interface IceCheckListremoteCandidates - The remote candidates to use in forming a
check list.public boolean hasHigherPriorityPendingPair(IceCandidatePair pair)
IceCheckList
hasHigherPriorityPendingPair in interface IceCheckListpair - The pair to check.
true if there's a higher priority pair that could
still complete its check, otherwise false.public void removeWaitingAndFrozenPairs(IceCandidatePair nominatedPair)
IceCheckList
removeWaitingAndFrozenPairs in interface IceCheckListnominatedPair - The nominated pair.public void executeOnPairs(org.littleshoot.util.Closure<IceCandidatePair> closure)
IceCheckListClosure on candidate pairs in the
check list.
executeOnPairs in interface IceCheckListclosure - The Closure to execute.public IceCandidatePair selectPair(org.littleshoot.util.Predicate<IceCandidatePair> pred)
IceCheckList
selectPair in interface IceCheckListpred - The Predicate to check with.
null if no such pair
exists.public IceCandidatePair selectAnyPair(org.littleshoot.util.Predicate<IceCandidatePair> pred)
IceCheckList
selectAnyPair in interface IceCheckListpred - The Predicate to check with.
null if no such pair exists.public boolean matchesAny(org.littleshoot.util.Predicate<IceCandidatePair> pred)
IceCheckList
matchesAny in interface IceCheckListpred - The Predicate to match against.
true if any pairs match the specified criteria,
otherwise false.public boolean matchesAll(org.littleshoot.util.Predicate<IceCandidatePair> pred)
IceCheckList
matchesAll in interface IceCheckListpred - The Predicate to match against.
true if all pairs match the specified criteria,
otherwise false.public void close()
IceCheckList
close in interface IceCheckList
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||