|
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<CallPeerJabberImpl>
net.java.sip.communicator.impl.protocol.jabber.TransportManagerJabberImpl
net.java.sip.communicator.impl.protocol.jabber.IceUdpTransportManager
public class IceUdpTransportManager
A TransportManagerJabberImpl implementation that would use ICE for
candidate management.
| Field Summary | |
|---|---|
protected List<ContentPacketExtension> |
cpeList
This is where we keep our answer between the time we get the offer and are ready with the answer. |
protected static String |
DEFAULT_STUN_SERVER_ADDRESS
Default STUN server address. |
protected static int |
DEFAULT_STUN_SERVER_PORT
Default STUN server port. |
protected org.ice4j.ice.Agent |
iceAgent
The ICE agent that this transport manager would be using for ICE negotiation. |
| Constructor Summary | |
|---|---|
IceUdpTransportManager(CallPeerJabberImpl 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. |
protected org.ice4j.ice.Agent |
createIceAgent()
Creates the ICE agent that we would be using in this transport manager for all negotiation. |
protected org.ice4j.ice.IceMediaStream |
createIceStream(String media)
Creates an IceMediaStream with the specified media
name. |
protected StreamConnector |
createStreamConnector(MediaType mediaType)
Initializes a new StreamConnector to be used as the connector of the MediaStream with a specific MediaType. |
org.jivesoftware.smack.packet.PacketExtension |
createTransport(org.ice4j.ice.IceMediaStream stream)
Converts the ICE media stream and its local candidates into a IceUdpTransportPacketExtension. |
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. |
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 org.jivesoftware.smack.packet.PacketExtension |
getTransportPacketExtension()
Get the transport PacketExtension to add. |
String |
getXmlNamespace()
Implements TransportManagerJabberImpl.getXmlNamespace(). |
void |
propertyChange(PropertyChangeEvent evt)
Retransmit state change events from the Agent to the media handler. |
void |
removeContent(String name)
Removes a content with a specific name from the transport-related part of the session represented by this TransportManagerJabberImpl which may have been reported through previous calls to the startCandidateHarvest and startConnectivityEstablishment methods. |
void |
startCandidateHarvest(List<ContentPacketExtension> theirOffer,
List<ContentPacketExtension> ourAnswer,
TransportInfoSender transportInfoSender)
Starts transport candidate harvest. |
void |
startCandidateHarvest(List<ContentPacketExtension> ourOffer,
TransportInfoSender transportInfoSender)
Starts transport candidate harvest. |
boolean |
startConnectivityEstablishment(Iterable<ContentPacketExtension> remote)
Starts the connectivity establishment of the associated ICE Agent. |
List<ContentPacketExtension> |
wrapupCandidateHarvest()
Simply returns the list of local candidates that we gathered during the harvest. |
void |
wrapupConnectivityEstablishment()
Waits for the associated ICE Agent to finish any started connectivity checks. |
| Methods inherited from class net.java.sip.communicator.impl.protocol.jabber.TransportManagerJabberImpl |
|---|
findContentByName, getCurrentGeneration, getIntendedDestination, getNextID, incrementGeneration, removeContent |
| Methods inherited from class net.java.sip.communicator.service.protocol.media.TransportManager |
|---|
closeStreamConnector, closeStreamConnector, getCallPeer, getICECandidateExtendedType, getLastUsedLocalHost, getNextMediaPortToTry, initializePortNumbers, sendHolePunchPacket, setNextMediaPortToTry, setTrafficClass |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected List<ContentPacketExtension> cpeList
protected final org.ice4j.ice.Agent iceAgent
protected static final String DEFAULT_STUN_SERVER_ADDRESS
protected static final int DEFAULT_STUN_SERVER_PORT
| Constructor Detail |
|---|
public IceUdpTransportManager(CallPeerJabberImpl callPeer)
callPeer - the CallPeer whose traffic we will be taking
care of.| Method Detail |
|---|
protected org.ice4j.ice.Agent createIceAgent()
protected StreamConnector createStreamConnector(MediaType mediaType)
throws OperationFailedException
createStreamConnector in class TransportManager<CallPeerJabberImpl>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<CallPeerJabberImpl>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.
getStreamTarget in class TransportManagerJabberImplmediaType - the MediaType of the MediaStream which
is to have its target set to the returned
MediaStreamTarget
TransportManagerJabberImpl.getStreamTarget(MediaType)public String getXmlNamespace()
TransportManagerJabberImpl.getXmlNamespace(). Gets the
XML namespace of the Jingle transport implemented by this
TransportManagerJabberImpl.
getXmlNamespace in class TransportManagerJabberImplTransportManagerJabberImpl.getXmlNamespace()protected org.jivesoftware.smack.packet.PacketExtension getTransportPacketExtension()
public void startCandidateHarvest(List<ContentPacketExtension> theirOffer,
List<ContentPacketExtension> ourAnswer,
TransportInfoSender transportInfoSender)
throws OperationFailedException
wrapupCandidateHarvest() method which would be called once we
absolutely need the candidates.
startCandidateHarvest in class TransportManagerJabberImpltheirOffer - a media description offer that we've received from the
remote party and that we should use in case we need to know what
transports our peer is using.ourAnswer - the content descriptions that we should be adding our
transport lists to (although not necessarily in this very instance).transportInfoSender - the TransportInfoSender to be used by
this TransportManagerJabberImpl to send transport-info
JingleIQs from the local peer to the remote peer if this
TransportManagerJabberImpl wishes to utilize
transport-info. Local candidate addresses sent by this
TransportManagerJabberImpl in transport-info are
expected to not be included in the result of
wrapupCandidateHarvest().
OperationFailedException - if we fail to allocate a port number.TransportManagerJabberImpl.startCandidateHarvest(List, List,
TransportInfoSender)
public void startCandidateHarvest(List<ContentPacketExtension> ourOffer,
TransportInfoSender transportInfoSender)
throws OperationFailedException
wrapupCandidateHarvest() method which would be called once we
absolutely need the candidates.
startCandidateHarvest in class TransportManagerJabberImplourOffer - the content list that should tell us how many stream
connectors we actually need.transportInfoSender - the TransportInfoSender to be used by
this TransportManagerJabberImpl to send transport-info
JingleIQs from the local peer to the remote peer if this
TransportManagerJabberImpl wishes to utilize
transport-info. Local candidate addresses sent by this
TransportManagerJabberImpl in transport-info are
expected to not be included in the result of
wrapupCandidateHarvest().
OperationFailedException - in case we fail allocating portspublic org.jivesoftware.smack.packet.PacketExtension createTransport(org.ice4j.ice.IceMediaStream stream)
IceUdpTransportPacketExtension.
stream - the IceMediaStream that we'd like to describe in
XML.
IceUdpTransportPacketExtension that we
protected org.ice4j.ice.IceMediaStream createIceStream(String media)
throws OperationFailedException
IceMediaStream with the specified media
name.
media - the name of the stream we'd like to create.
IceMediaStream
OperationFailedException - if binding on the specified media stream
fails for some reason.public List<ContentPacketExtension> wrapupCandidateHarvest()
wrapupCandidateHarvest in class TransportManagerJabberImplTransportManagerJabberImpl.wrapupCandidateHarvest()public boolean startConnectivityEstablishment(Iterable<ContentPacketExtension> remote)
startConnectivityEstablishment in class TransportManagerJabberImplremote - the collection of ContentPacketExtensions which
represents the remote counterpart of the negotiation between the local
and the remote peers
TransportManagerJabberImpl.startConnectivityEstablishment(Iterable)
public void wrapupConnectivityEstablishment()
throws OperationFailedException
wrapupConnectivityEstablishment in class TransportManagerJabberImplOperationFailedException - if ICE processing has failedTransportManagerJabberImpl.wrapupConnectivityEstablishment()public void removeContent(String name)
removeContent in class TransportManagerJabberImplname - the name of the content to be removed from the
transport-related part of the session represented by this
TransportManagerJabberImplTransportManagerJabberImpl.removeContent(String)public void close()
close in class TransportManagerJabberImplpublic String getICECandidateExtendedType()
getICECandidateExtendedType in class TransportManager<CallPeerJabberImpl>public String getICEState()
getICEState in class TransportManager<CallPeerJabberImpl>public void propertyChange(PropertyChangeEvent evt)
propertyChange in interface PropertyChangeListenerevt - the event for state change.
|
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 | |||||||||