|
Jitsi: the OpenSource Java VoIP and Instant Messaging client. | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.java.sip.communicator.service.protocol.media.TransportManager<CallPeerGTalkImpl>
net.java.sip.communicator.impl.protocol.jabber.TransportManagerGTalkImpl
public class TransportManagerGTalkImpl
TransportManagers gather local candidates for incoming and outgoing calls. Their work starts by calling a start method which, using the remote peer's session description, would start the harvest. Calling a second wrapup method would deliver the candidate harvest, possibly after blocking if it has not yet completed.
| Constructor Summary | |
|---|---|
TransportManagerGTalkImpl(CallPeerGTalkImpl callPeer)
Creates a new instance of this transport manager, binding it to the specified peer. |
|
| Method Summary | |
|---|---|
void |
close()
Close this transport manager and release resources. |
(package private) static org.ice4j.ice.Agent |
createAgent(ProtocolProviderServiceJabberImpl provider,
boolean controlling)
Creates the ICE agent that we would be using in this transport manager for all negotiation. |
protected StreamConnector |
createStreamConnector(MediaType mediaType)
Initializes a new StreamConnector to be used as the connector of the MediaStream with a specific MediaType. |
protected int |
getCurrentGeneration()
Returns the generation that our current candidates belong to. |
String |
getICECandidateExtendedType()
Returns the extended type of the candidate selected if this transport manager is using ICE. |
String |
getICEState()
Returns the current state of ICE processing. |
protected InetAddress |
getIntendedDestination(CallPeerGTalkImpl peer)
Returns the InetAddress that is most likely to be to be used as a next hop when contacting the specified destination. |
protected String |
getNextID()
Returns the ID that we will be assigning to the next candidate we create. |
StreamConnector |
getStreamConnector(MediaType mediaType)
Gets the StreamConnector to be used as the connector of the MediaStream with a specific MediaType. |
MediaStreamTarget |
getStreamTarget(MediaType mediaType)
Implements TransportManagerJabberImpl.getStreamTarget(MediaType). |
protected void |
incrementGeneration()
Increments the generation that we are assigning candidates. |
static Hashtable<String,String> |
parseGoogleRelay(String res)
Parse HTTP response from Google relay. |
void |
propertyChange(PropertyChangeEvent evt)
Retransmit state change events from the Agent. |
static List<StunServerDescriptor> |
requestJingleInfo(ProtocolProviderServiceJabberImpl provider)
Request Google's Jingle info. |
void |
sendHolePunchPacket(MediaStreamTarget target,
MediaType type)
Send empty UDP packet to target destination data/control ports in order to open port on NAT or RTP proxy if any. |
void |
startCandidateHarvest(List<PayloadTypePacketExtension> ourAnswer,
CandidatesSender candidatesSender)
Starts transport candidate harvest. |
boolean |
startConnectivityEstablishment(Iterable<GTalkCandidatePacketExtension> remote)
Starts the connectivity establishment of this TransportManagerGTalkImpl i.e. |
void |
wrapupCandidateHarvest()
Notifies the transport manager that it should conclude candidate harvesting as soon as possible. |
void |
wrapupConnectivityEstablishment()
Waits for the associated ICE Agent to finish any started connectivity checks. |
| Methods inherited from class net.java.sip.communicator.service.protocol.media.TransportManager |
|---|
closeStreamConnector, closeStreamConnector, getCallPeer, getICECandidateExtendedType, getLastUsedLocalHost, getNextMediaPortToTry, initializePortNumbers, setNextMediaPortToTry, setTrafficClass |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public TransportManagerGTalkImpl(CallPeerGTalkImpl callPeer)
callPeer - the CallPeer whose traffic we will be taking
care of.| Method Detail |
|---|
protected String getNextID()
protected int getCurrentGeneration()
protected void incrementGeneration()
protected InetAddress getIntendedDestination(CallPeerGTalkImpl peer)
getIntendedDestination in class TransportManager<CallPeerGTalkImpl>peer - the CallPeer that we would contact.
IllegalArgumentException - if destination is not a valid
host/IP/FQDNpublic static List<StunServerDescriptor> requestJingleInfo(ProtocolProviderServiceJabberImpl provider)
provider - ProtocolProviderService instance
public static Hashtable<String,String> parseGoogleRelay(String res)
res - content string
static org.ice4j.ice.Agent createAgent(ProtocolProviderServiceJabberImpl provider,
boolean controlling)
provider - ProtocolProviderServiceJabberImpl instancecontrolling - if the peer is controlling or not
protected StreamConnector createStreamConnector(MediaType mediaType)
throws OperationFailedException
createStreamConnector in class TransportManager<CallPeerGTalkImpl>mediaType - the MediaType of the MediaStream which
is to have its connector set to the returned
StreamConnector
OperationFailedException - if anything goes wrong while
initializing the new StreamConnector
public StreamConnector getStreamConnector(MediaType mediaType)
throws OperationFailedException
getStreamConnector in class TransportManager<CallPeerGTalkImpl>mediaType - the MediaType of the MediaStream which
is to have its connector set to the returned
StreamConnector
OperationFailedException - if anything goes wrong while
initializing the requested StreamConnectorgetStreamConnector(MediaType)public MediaStreamTarget getStreamTarget(MediaType mediaType)
TransportManagerJabberImpl.getStreamTarget(MediaType).
Gets the MediaStreamTarget to be used as the target of
the MediaStream with a specific MediaType.
mediaType - the MediaType of the MediaStream which
is to have its target set to the returned
MediaStreamTarget
TransportManagerJabberImpl.getStreamTarget(MediaType)
public void startCandidateHarvest(List<PayloadTypePacketExtension> ourAnswer,
CandidatesSender candidatesSender)
throws OperationFailedException
ourAnswer - the content descriptions that we should be adding our
transport lists to (although not necessarily in this very instance).candidatesSender - the CandidatesSender to be used by
this TransportManagerGTalkImpl to send candidates
SessionIQs from the local peer to the remote peer if this
TransportManagerGTalkImpl wishes to utilize
candidates.
OperationFailedException - if we fail to allocate a port number.public void wrapupCandidateHarvest()
public boolean startConnectivityEstablishment(Iterable<GTalkCandidatePacketExtension> remote)
remote - the collection of CandidatePacketExtensions which
represents the remote counterpart of the negotiation between the local
and the remote peer
public void wrapupConnectivityEstablishment()
throws OperationFailedException
OperationFailedException - if ICE processing has failed
public void sendHolePunchPacket(MediaStreamTarget target,
MediaType type)
sendHolePunchPacket in class TransportManager<CallPeerGTalkImpl>target - MediaStreamTargettype - the MediaType of the connector we'd like to send
the hole punching packet through.public void close()
public String getICECandidateExtendedType()
getICECandidateExtendedType in class TransportManager<CallPeerGTalkImpl>public void propertyChange(PropertyChangeEvent evt)
propertyChange in interface PropertyChangeListenerevt - the event for state change.public String getICEState()
getICEState in class TransportManager<CallPeerGTalkImpl>
|
Jitsi: the OpenSource Java VoIP and Instant Messaging client. | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||