|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface IceMediaStream
A media stream for an ICE agent.
| Method Summary | |
|---|---|
void |
addLocalCandidate(IceCandidate localCandidate)
Adds a local candidate. |
void |
addPair(IceCandidatePair pair)
Adds the specified ICE candidate pair to the check list. |
IceCandidate |
addRemotePeerReflexive(org.littleshoot.stun.stack.message.BindingRequest request,
InetSocketAddress localAddress,
InetSocketAddress remoteAddress,
boolean isUdp)
Adds a peer reflexive candidate to the list of remote candidates. |
void |
addTriggeredPair(IceCandidatePair pair)
Adds a pair to the triggered check queue. |
void |
addValidPair(IceCandidatePair pair)
Adds a new valid pair. |
void |
close()
Perform any necessary close operations for the media stream. |
byte[] |
encodeCandidates()
Encodes this media stream in SDP. |
void |
establishStream(Collection<IceCandidate> remoteCandidates)
Establishes a media stream using the answer data from the remote host. |
IceCheckListState |
getCheckListState()
Gets the state of the check list. |
IceCandidate |
getLocalCandidate(InetSocketAddress localAddress,
boolean isUdp)
Accessor for the local candidate associate with the specified local address. |
Collection<IceCandidate> |
getLocalCandidates()
Accessor for the local candidates for this stream. |
Queue<IceCandidatePair> |
getNominatedPairs()
Accessor for all nominated pairs for this stream. |
IceCandidatePair |
getPair(InetSocketAddress localAddress,
InetSocketAddress remoteAddress,
boolean udp)
Accesses the pair matching the specified local and remote addresses, if any. |
InetAddress |
getPublicAddress()
|
IceCandidate |
getRemoteCandidate(InetSocketAddress remoteAddress,
boolean isUdp)
Accessor for the remote candidate associate with the specified remote address. |
IceStunUdpPeer |
getStunUdpPeer()
|
Queue<IceCandidatePair> |
getValidPairs()
Accessor for all valid pairs for this stream. |
boolean |
hasHigherPriorityPendingPair(IceCandidatePair pair)
Checks whether or not there are existing pairs on either the triggered check list or the normal check list. |
boolean |
hasRemoteCandidate(InetSocketAddress remoteAddress,
boolean isUdp)
Checks whether or not the specified remote address matches any of the addresses of remote candidates. |
boolean |
hasRemoteCandidateInSdp(InetSocketAddress remoteAddress,
boolean isUdp)
Checks whether or not the specified remote address matches any of the addresses of remote candidates. |
void |
onNominated(IceCandidatePair pair)
Notifies the media stream that there's been a nominated pair. |
void |
recomputePairPriorities(boolean controlling)
Recomputes the priorities of pairs in checklists. |
void |
setCheckListState(IceCheckListState state)
Sets the state of the check list. |
void |
start(IceCheckList checkList,
Collection<IceCandidate> localCandidates,
IceCheckScheduler scheduler)
Starts gathering candidates and executing ICE. |
void |
updateCheckListAndTimerStates()
Implements ICE section 7.1.2.3. |
void |
updatePairStates(IceCandidatePair generatingPair)
Called when connectivity checks have created a new valid pair and the media stream needs to update the states of other pairs. |
| Methods inherited from interface org.littleshoot.mina.common.IoServiceListener |
|---|
serviceActivated, serviceDeactivated, sessionCreated, sessionDestroyed |
| Method Detail |
|---|
Queue<IceCandidatePair> getValidPairs()
Queue of all valid pairs for this stream.void addValidPair(IceCandidatePair pair)
pair - The pair to add.
IceCandidate getRemoteCandidate(InetSocketAddress remoteAddress,
boolean isUdp)
remoteAddress - The remote address to look for.isUdp - Whether to search for UDP candidates.
null if there's no associated candidate.
IceCandidate getLocalCandidate(InetSocketAddress localAddress,
boolean isUdp)
localAddress - The local address to look for.
null if there's no associated candidate.void addLocalCandidate(IceCandidate localCandidate)
localCandidate - The local candidate to add.
IceCandidatePair getPair(InetSocketAddress localAddress,
InetSocketAddress remoteAddress,
boolean udp)
localAddress - The address for the local candidate.remoteAddress - The address for the remote candidate.udp - Whether or not the pair is UDP.
null if no
such pair exists.void updatePairStates(IceCandidatePair generatingPair)
generatingPair - The pair that generated the valid pair.void addTriggeredPair(IceCandidatePair pair)
pair - The pair to add.void recomputePairPriorities(boolean controlling)
controlling - The current controlling status of the agent.void establishStream(Collection<IceCandidate> remoteCandidates)
remoteCandidates - The answer from the remote host.
boolean hasRemoteCandidate(InetSocketAddress remoteAddress,
boolean isUdp)
remoteAddress - The remote address to check.isUdp - Whether or not the candidate is UDP.
true if the address matches the address of a
remote candidate we already know about, otherwise false.
boolean hasRemoteCandidateInSdp(InetSocketAddress remoteAddress,
boolean isUdp)
remoteAddress - The remote address to check.isUdp - Whether or not the candidate is UDP.
true if the address matches the address of a
remote candidate we already know about, otherwise false.
IceCandidate addRemotePeerReflexive(org.littleshoot.stun.stack.message.BindingRequest request,
InetSocketAddress localAddress,
InetSocketAddress remoteAddress,
boolean isUdp)
request - The BindingRequest that initiated the
establishment of a new peer reflexive candidate.localAddress - The local address the request was sent to. This
allows us to match the local address with the local candidate it was
sent to. We use that to determine the component ID of the new peer
reflexive candidate.remoteAddress - The remote address of the peer that sent the
Binding Request.isUdp - Whether the candidate should be a UDP candidate or not.
byte[] encodeCandidates()
void addPair(IceCandidatePair pair)
pair - The pair to add.IceCheckListState getCheckListState()
void updateCheckListAndTimerStates()
boolean hasHigherPriorityPendingPair(IceCandidatePair pair)
pair - The pair to check.
true if there's a higher priority pair that could
still complete its check, otherwise false.void onNominated(IceCandidatePair pair)
pair - The nominated pair.void setCheckListState(IceCheckListState state)
state - The state of the check list.Queue<IceCandidatePair> getNominatedPairs()
Queue of all nominated pairs for this stream.
void start(IceCheckList checkList,
Collection<IceCandidate> localCandidates,
IceCheckScheduler scheduler)
checkList - The candidate pair check list.localCandidates - The local candidates.scheduler - The check scheduler.void close()
Collection<IceCandidate> getLocalCandidates()
InetAddress getPublicAddress()
IceStunUdpPeer getStunUdpPeer()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||