|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.lastbamboo.common.ice.IceAgentImpl
public class IceAgentImpl
Implementation of an ICE agent. An agent can contain multiple media streams and manages the top level of an ICE exchange.
| Constructor Summary | |
|---|---|
IceAgentImpl(IceMediaStreamFactory mediaStreamFactory,
boolean controlling,
org.lastbamboo.common.offer.answer.OfferAnswerListener offerAnswerListener,
UdpSocketFactory udpSocketFactory,
UdpSocketFactory unreliableUdpSocketFactory,
org.lastbamboo.common.offer.answer.IceMediaStreamDesc iceMediaStreamDesc)
Creates a new ICE agent for an answerer. |
|
| Method Summary | |
|---|---|
long |
calculateDelay(int Ta_i)
Calculates the delay in milliseconds to use before initiating a new transaction for a given media stream. |
void |
checkValidPairsForAllComponents(IceMediaStream mediaStream)
Notifies the listener that the media stream may have valid pairs for all components of a given media stream, possibly requiring changing states of other streams, as specified in part 2 of ICE section 7.1.2.2.3. |
void |
close()
|
void |
closeTcp()
|
void |
closeUdp()
|
Collection<? extends IceCandidate> |
gatherCandidates()
Gathers candidates for this specific offer/answer implementation. |
byte[] |
generateAnswer()
|
byte[] |
generateOffer()
|
IceState |
getIceState()
Accessor for the overall state of ICE processing. |
Collection<IceMediaStream> |
getMediaStreams()
Accessor for all the media streams for the agent. |
Queue<IceCandidatePair> |
getNominatedPairs()
Accessor for the nominated pairs. |
InetAddress |
getPublicAdress()
|
IceTieBreaker |
getTieBreaker()
Accessor for the role conflict tie-breaker for this agent. |
boolean |
isClosed()
Whether or not the check list is closed. |
boolean |
isControlling()
Returns whether or not this agent is the controlling agent. |
void |
onNominatedPair(IceCandidatePair pair,
IceMediaStream mediaStream)
Indicates a pair has been nominated. |
void |
onNoMorePairs()
Called when there are no more pairs to process. |
void |
onUnfreezeCheckLists(IceMediaStream mediaStream)
Tells the listener to unfreeze any other check lists. |
void |
onValidPairs(IceMediaStream mediaStream)
Tells the agent to consider the valid pairs for this media stream for nomination. |
void |
processAnswer(org.littleshoot.mina.common.ByteBuffer answer)
|
void |
processOffer(org.littleshoot.mina.common.ByteBuffer offer)
|
void |
recomputePairPriorities()
Recomputes the priorities of pairs in checklists. |
void |
setControlling(boolean controlling)
Sets whether or not this agent is the controlling agent. |
void |
useRelay()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public IceAgentImpl(IceMediaStreamFactory mediaStreamFactory,
boolean controlling,
org.lastbamboo.common.offer.answer.OfferAnswerListener offerAnswerListener,
UdpSocketFactory udpSocketFactory,
UdpSocketFactory unreliableUdpSocketFactory,
org.lastbamboo.common.offer.answer.IceMediaStreamDesc iceMediaStreamDesc)
throws IceUdpConnectException
mediaStreamFactory - Factory for creating the media streams
we're using ICE to establish.controlling - Whether or not agent will start out as controlling.
IceUdpConnectException - If there's an error connecting the
ICE UDP peer.| Method Detail |
|---|
public void checkValidPairsForAllComponents(IceMediaStream mediaStream)
IceAgent
checkValidPairsForAllComponents in interface IceAgentmediaStream - The media stream.public void onUnfreezeCheckLists(IceMediaStream mediaStream)
IceAgent
onUnfreezeCheckLists in interface IceAgentmediaStream - The media stream initiating the unfreeze operation.public long calculateDelay(int Ta_i)
IceAgent
calculateDelay in interface IceAgentTa_i - The transaction delay for the specific media stream.
public boolean isControlling()
IceAgent
isControlling in interface IceAgenttrue if this agent is the controlling agent,
otherwise false.public void setControlling(boolean controlling)
IceAgent
setControlling in interface IceAgentcontrolling - Whether or not this agent is the controlling agent.public void recomputePairPriorities()
IceAgent
recomputePairPriorities in interface IceAgentpublic IceTieBreaker getTieBreaker()
IceAgent
getTieBreaker in interface IceAgentpublic byte[] generateAnswer()
generateAnswer in interface org.lastbamboo.common.offer.answer.OfferAnswerpublic byte[] generateOffer()
generateOffer in interface org.lastbamboo.common.offer.answer.OfferAnswerpublic void processOffer(org.littleshoot.mina.common.ByteBuffer offer)
processOffer in interface org.lastbamboo.common.offer.answer.OfferAnswerpublic void processAnswer(org.littleshoot.mina.common.ByteBuffer answer)
processAnswer in interface org.lastbamboo.common.offer.answer.OfferAnswerpublic Collection<IceMediaStream> getMediaStreams()
IceAgent
getMediaStreams in interface IceAgent
public void onNominatedPair(IceCandidatePair pair,
IceMediaStream mediaStream)
IceAgent
onNominatedPair in interface IceAgentpair - The nominated pair.mediaStream - The ICE media stream the pair is a part of.public IceState getIceState()
IceAgent
getIceState in interface IceAgentpublic Queue<IceCandidatePair> getNominatedPairs()
IceAgent
getNominatedPairs in interface IceAgentQueue of nominated IceCandidatePairs.public void onValidPairs(IceMediaStream mediaStream)
IceAgent
onValidPairs in interface IceAgentmediaStream - The media stream the pair is valid for.public void close()
close in interface org.lastbamboo.common.offer.answer.OfferAnswerpublic void onNoMorePairs()
IceAgent
onNoMorePairs in interface IceAgentpublic void closeTcp()
closeTcp in interface org.lastbamboo.common.offer.answer.OfferAnswerpublic void closeUdp()
closeUdp in interface org.lastbamboo.common.offer.answer.OfferAnswerpublic Collection<? extends IceCandidate> gatherCandidates()
IceOfferAnswer
gatherCandidates in interface IceOfferAnswerIceCandidates.public InetAddress getPublicAdress()
public void useRelay()
useRelay in interface org.lastbamboo.common.offer.answer.OfferAnswerpublic boolean isClosed()
IceAgent
isClosed in interface IceAgent
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||