-
- All Implemented Interfaces:
-
java.io.Serializable,java.lang.Cloneable,java.lang.Iterable,java.util.Collection,java.util.List,java.util.RandomAccess
public class CheckList extends Vector<CandidatePair>
A check list is a list of CandidatePairs with a state (i.e. a CheckListState). The pairs in a check list are those that an ICE agent will run STUN connectivity checks for. There is one check list per in-use media stream resulting from the offer/answer exchange.
Given the asynchronous nature of ice, a check list may be accessed from different locations. This class therefore stores pairs in a Vector
-
-
Field Summary
Fields Modifier and Type Field Description public final static StringPROPERTY_CHECK_LIST_STATEpublic final static StringPROPERTY_CHECK_LIST_CHECKSprivate CheckListStatestateprivate final IceMediaStreamparentStream
-
Method Summary
Modifier and Type Method Description CheckListStategetState()Returns the state of this check list. voidsetState(CheckListState newState)Sets the state of this list. IceMediaStreamgetParentStream()Returns a reference to the IceMediaStream that created and that maintains this check list. synchronized CandidatePairfindPairMatching(LocalCandidate local, RemoteCandidate remote)Returns a pair which matches the specified local and remote candidates' transport addresses, if any, otherwise null. synchronized booleanisActive()Determines whether this CheckList can be considered active. synchronized booleanallChecksCompleted()Determines whether all checks in this CheckList have ended one way or another. synchronized booleanisFrozen()Determines whether this CheckList can be considered frozen. StringtoString()Returns a String representation of this check list. StringgetName()Returns the name of this check list so that we could use it for debugging purposes. synchronized booleancontainsNomineeForComponent(Component component)Returns true if this CheckList already contains a nominated CandidatePair for the specified component and false otherwise. voidaddStateChangeListener(PropertyChangeListener l)Adds l to the list of listeners tracking changes of the CheckListState of this CheckList voidremoveStateChangeListener(PropertyChangeListener l)Removes l from the list of listeners tracking changes of the CheckListState of this CheckList voidaddChecksListener(PropertyChangeListener l)Add a CheckListener. voidremoveChecksListener(PropertyChangeListener l)Remove a CheckListener. -
Methods inherited from class java.util.Vector
add, add, addAll, addElement, capacity, clear, clone, contains, containsAll, copyInto, elementAt, elements, ensureCapacity, equals, firstElement, forEach, get, hashCode, indexOf, insertElementAt, isEmpty, iterator, lastElement, lastIndexOf, listIterator, remove, remove, removeAll, removeAllElements, removeElement, removeElementAt, removeIf, replaceAll, retainAll, set, setElementAt, setSize, size, sort, spliterator, subList, toArray, toArray, trimToSize -
Methods inherited from class java.util.Collection
parallelStream, stream -
Methods inherited from class java.lang.Iterable
iterator, spliterator -
Methods inherited from class java.util.List
copyOf, of -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
getState
CheckListState getState()
Returns the state of this check list.
-
setState
void setState(CheckListState newState)
Sets the state of this list.
- Parameters:
newState- the CheckListState for this list.
-
getParentStream
IceMediaStream getParentStream()
Returns a reference to the IceMediaStream that created and that maintains this check list.
-
findPairMatching
synchronized CandidatePair findPairMatching(LocalCandidate local, RemoteCandidate remote)
Returns a pair which matches the specified local and remote candidates' transport addresses, if any, otherwise null.
-
isActive
synchronized boolean isActive()
Determines whether this CheckList can be considered active. RFC 5245 says: A check list with at least one pair that is Waiting is called an active check list.
-
allChecksCompleted
synchronized boolean allChecksCompleted()
Determines whether all checks in this CheckList have ended one way or another.
-
isFrozen
synchronized boolean isFrozen()
Determines whether this CheckList can be considered frozen. RFC 5245 says: a check list with all pairs Frozen is called a frozen check list.
-
toString
String toString()
Returns a String representation of this check list. It consists of a list of the CandidatePairs in the order they were inserted and enclosed in square brackets ("[]"). The method would also call and use the content returned by every member CandidatePair.
-
getName
String getName()
Returns the name of this check list so that we could use it for debugging purposes.
-
containsNomineeForComponent
@Deprecated() synchronized boolean containsNomineeForComponent(Component component)
Returns true if this CheckList already contains a nominated CandidatePair for the specified component and false otherwise.
- Parameters:
component- the Component that we'd whose nominees we are interested in.
-
addStateChangeListener
void addStateChangeListener(PropertyChangeListener l)
Adds l to the list of listeners tracking changes of the CheckListState of this CheckList
- Parameters:
l- the listener to register.
-
removeStateChangeListener
void removeStateChangeListener(PropertyChangeListener l)
Removes l from the list of listeners tracking changes of the CheckListState of this CheckList
- Parameters:
l- the listener to remove.
-
addChecksListener
void addChecksListener(PropertyChangeListener l)
Add a CheckListener. It will be notified when ordinary checks ended.
- Parameters:
l- CheckListener to add
-
removeChecksListener
void removeChecksListener(PropertyChangeListener l)
Remove a CheckListener.
- Parameters:
l- CheckListener to remove
-
-
-
-