public abstract class TransportManagerJabberImpl extends TransportManager<CallPeerJabberImpl>
Modifier and Type | Field and Description |
---|---|
(package private) boolean |
isEstablishingConnectivityWithJitsiVideobridge
The indicator which determines whether this TransportManager
instance is responsible to establish the connectivity with the associated
Jitsi Videobridge (in case it is being employed at all).
|
(package private) boolean |
startConnectivityEstablishmentWithJitsiVideobridge
The indicator which determines whether this TransportManager
instance is yet to start establishing the connectivity with the
associated Jitsi Videobridge (in case it is being employed at all).
|
Modifier | Constructor and Description |
---|---|
protected |
TransportManagerJabberImpl(CallPeerJabberImpl callPeer)
Creates a new instance of this transport manager, binding it to the
specified peer.
|
Modifier and Type | Method and Description |
---|---|
(package private) static IceUdpTransportPacketExtension |
cloneTransportAndCandidates(IceUdpTransportPacketExtension src)
Clones a specific IceUdpTransportPacketExtension and its
candidates.
|
void |
close()
Releases the resources acquired by this TransportManager and
prepares it for garbage collection.
|
protected void |
closeStreamConnector(org.jitsi.service.neomedia.MediaType mediaType,
org.jitsi.service.neomedia.StreamConnector streamConnector)
Closes a specific StreamConnector associated with a specific
MediaType.
|
protected org.jitsi.service.neomedia.StreamConnector |
createStreamConnector(org.jitsi.service.neomedia.MediaType mediaType)
Creates a media StreamConnector for a stream of a specific
MediaType.
|
protected abstract org.jivesoftware.smack.packet.PacketExtension |
createTransport(java.lang.String media) |
protected org.jivesoftware.smack.packet.PacketExtension |
createTransportForStartCandidateHarvest(java.lang.String media) |
protected abstract org.jivesoftware.smack.packet.PacketExtension |
createTransportPacketExtension()
Initializes a new PacketExtension instance appropriate to the
type of Jingle transport represented by this TransportManager.
|
protected org.jitsi.service.neomedia.StreamConnector |
doCreateStreamConnector(org.jitsi.service.neomedia.MediaType mediaType)
Creates a media StreamConnector for a stream of a specific
MediaType.
|
static ContentPacketExtension |
findContentByName(java.lang.Iterable<ContentPacketExtension> cpExtList,
java.lang.String name)
Looks through the cpExtList and returns the
ContentPacketExtension with the specified name. |
(package private) TransportManagerJabberImpl |
findTransportManagerEstablishingConnectivityWithJitsiVideobridge()
Finds a TransportManagerJabberImpl participating in a telephony
conference utilizing the Jitsi Videobridge server-side technology that
this instance is participating in which is establishing the connectivity
with the Jitsi Videobridge server (as opposed to a CallPeer).
|
(package private) ColibriConferenceIQ.Channel |
getColibriChannel(org.jitsi.service.neomedia.MediaType mediaType,
boolean local)
Gets the
ColibriConferenceIQ.Channel which belongs to a content
associated with a specific MediaType and is to be either locally
or remotely used. |
protected int |
getCurrentGeneration()
Returns the generation that our current candidates belong to.
|
protected java.net.InetAddress |
getIntendedDestination(CallPeerJabberImpl peer)
Returns the InetAddress that is most likely to be to be used
as a next hop when contacting the specified destination.
|
protected java.lang.String |
getNextID()
Returns the ID that we will be assigning to the next candidate we create.
|
abstract org.jitsi.service.neomedia.MediaStreamTarget |
getStreamTarget(org.jitsi.service.neomedia.MediaType mediaType)
Gets the MediaStreamTarget to be used as the target of
the MediaStream with a specific MediaType.
|
abstract java.lang.String |
getXmlNamespace()
Gets the XML namespace of the Jingle transport implemented by this
TransportManagerJabberImpl.
|
protected void |
incrementGeneration()
Increments the generation that we are assigning candidates.
|
protected ContentPacketExtension |
removeContent(java.lang.Iterable<ContentPacketExtension> contents,
java.lang.String name)
Removes a content with a specific name from a specific collection of
contents and closes any associated StreamConnector.
|
abstract void |
removeContent(java.lang.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.
|
protected void |
sendTransportInfoToJitsiVideobridge(java.util.Map<java.lang.String,IceUdpTransportPacketExtension> map)
Sends transport-related information received from the remote peer to the
associated Jiitsi Videobridge in order to update the (remote)
ColibriConferenceIQ.Channel associated with this
TransportManager instance.
|
protected abstract org.jivesoftware.smack.packet.PacketExtension |
startCandidateHarvest(ContentPacketExtension theirContent,
ContentPacketExtension ourContent,
TransportInfoSender transportInfoSender,
java.lang.String media)
Starts transport candidate harvest for a specific
ContentPacketExtension that we are going to offer or answer
with.
|
void |
startCandidateHarvest(java.util.List<ContentPacketExtension> theirOffer,
java.util.List<ContentPacketExtension> ourAnswer,
TransportInfoSender transportInfoSender)
Starts transport candidate harvest.
|
void |
startCandidateHarvest(java.util.List<ContentPacketExtension> ourOffer,
TransportInfoSender transportInfoSender)
Starts transport candidate harvest.
|
boolean |
startConnectivityEstablishment(java.lang.Iterable<ContentPacketExtension> remote)
Starts the connectivity establishment of this
TransportManagerJabberImpl i.e.
|
protected boolean |
startConnectivityEstablishment(java.util.Map<java.lang.String,IceUdpTransportPacketExtension> remote)
Starts the connectivity establishment of this
TransportManagerJabberImpl i.e.
|
abstract java.util.List<ContentPacketExtension> |
wrapupCandidateHarvest()
Notifies the transport manager that it should conclude candidate
harvesting as soon as possible and return the lists of candidates
gathered so far.
|
void |
wrapupConnectivityEstablishment()
Notifies this TransportManagerJabberImpl that it should conclude
any started connectivity establishment.
|
closeStreamConnector, createIceAgent, createIceStream, getCallPeer, getHarvestingTime, getICECandidateExtendedType, getICECandidateExtendedType, getICELocalHostAddress, getICELocalReflexiveAddress, getICELocalRelayedAddress, getICERemoteHostAddress, getICERemoteReflexiveAddress, getICERemoteRelayedAddress, getICEState, getLastUsedLocalHost, getNbHarvesting, getNbHarvesting, getPortTracker, getPortTracker, getStreamConnector, getTotalHarvestingTime, initializePortNumbers, sendHolePunchPacket, sendHolePunchPacket, setTrafficClass
boolean isEstablishingConnectivityWithJitsiVideobridge
boolean startConnectivityEstablishmentWithJitsiVideobridge
protected TransportManagerJabberImpl(CallPeerJabberImpl callPeer)
callPeer
- the CallPeer
whose traffic we will be taking
care of.protected java.net.InetAddress getIntendedDestination(CallPeerJabberImpl peer)
getIntendedDestination
in class TransportManager<CallPeerJabberImpl>
peer
- the CallPeer that we would contact.java.lang.IllegalArgumentException
- if destination is not a valid
host/IP/FQDNprotected java.lang.String getNextID()
public abstract org.jitsi.service.neomedia.MediaStreamTarget getStreamTarget(org.jitsi.service.neomedia.MediaType mediaType)
mediaType
- the MediaType of the MediaStream which
is to have its target set to the returned
MediaStreamTargetpublic abstract java.lang.String getXmlNamespace()
protected int getCurrentGeneration()
protected void incrementGeneration()
protected void sendTransportInfoToJitsiVideobridge(java.util.Map<java.lang.String,IceUdpTransportPacketExtension> map)
map
- a Map of media-IceUdpTransportPacketExtension pairs
which represents the transport-related information which has been
received from the remote peer and which is to be sent to the associated
Jitsi Videobridgeprotected abstract org.jivesoftware.smack.packet.PacketExtension startCandidateHarvest(ContentPacketExtension theirContent, ContentPacketExtension ourContent, TransportInfoSender transportInfoSender, java.lang.String media) throws OperationFailedException
theirContent
- the ContentPacketExtension offered by the
remote peer to which we are going to answer with ourContent or
null if ourContent will be an offer to the remote peerourContent
- the ContentPacketExtension for which transport
candidate harvest is to be startedtransportInfoSender
- a TransportInfoSender if the
harvested transport candidates are to be sent in a
transport-info rather than in ourContent; otherwise,
nullmedia
- the media of the RtpDescriptionPacketExtension
child of ourContentOperationFailedException
- if anything goes wrong while starting
transport candidate harvest for the specified ourContentpublic void startCandidateHarvest(java.util.List<ContentPacketExtension> theirOffer, java.util.List<ContentPacketExtension> ourAnswer, TransportInfoSender transportInfoSender) throws OperationFailedException
wrapupCandidateHarvest()
method which would be called once we
absolutely need the candidates.theirOffer
- 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.public void startCandidateHarvest(java.util.List<ContentPacketExtension> ourOffer, TransportInfoSender transportInfoSender) throws OperationFailedException
wrapupCandidateHarvest()
method which would be called once we
absolutely need the candidates.ourOffer
- 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.public abstract java.util.List<ContentPacketExtension> wrapupCandidateHarvest()
public static ContentPacketExtension findContentByName(java.lang.Iterable<ContentPacketExtension> cpExtList, java.lang.String name)
ContentPacketExtension
with the specified name.cpExtList
- the list that we will be searching for a specific
content.name
- the name of the content element we are looking for.ContentPacketExtension
with the specified name or
null if no such content element exists.public boolean startConnectivityEstablishment(java.lang.Iterable<ContentPacketExtension> remote)
remote
- the collection of ContentPacketExtensions which
represents the remote counterpart of the negotiation between the local
and the remote peerprotected boolean startConnectivityEstablishment(java.util.Map<java.lang.String,IceUdpTransportPacketExtension> remote)
remote
- a Map of
media-IceUdpTransportPacketExtension pairs which represents the
remote counterpart of the negotiation between the local and the remote
peerspublic void wrapupConnectivityEstablishment() throws OperationFailedException
OperationFailedException
- if anything goes wrong with connectivity
establishment (i.e. ICE failed, ...)public abstract void removeContent(java.lang.String name)
Note: Because TransportManager deals with
MediaTypes, not content names and
TransportManagerJabberImpl does not implement translating from
content name to MediaType, implementers are expected to call
TransportManager.closeStreamConnector(MediaType)
.
name
- the name of the content to be removed from the
transport-related part of the session represented by this
TransportManagerJabberImplprotected ContentPacketExtension removeContent(java.lang.Iterable<ContentPacketExtension> contents, java.lang.String name)
contents
- the collection of contents to remove the content with the
specified name fromname
- the name of the content to removestatic IceUdpTransportPacketExtension cloneTransportAndCandidates(IceUdpTransportPacketExtension src) throws OperationFailedException
src
- the IceUdpTransportPacketExtension to be clonedOperationFailedException
- if an error occurs during the cloing of
the specified src and its candidatespublic void close()
protected void closeStreamConnector(org.jitsi.service.neomedia.MediaType mediaType, org.jitsi.service.neomedia.StreamConnector streamConnector)
closeStreamConnector
in class TransportManager<CallPeerJabberImpl>
mediaType
- the MediaType associated with the specified
streamConnectorstreamConnector
- the StreamConnector to be closedTransportManager.closeStreamConnector(MediaType)
protected org.jitsi.service.neomedia.StreamConnector createStreamConnector(org.jitsi.service.neomedia.MediaType mediaType) throws OperationFailedException
createStreamConnector
in class TransportManager<CallPeerJabberImpl>
mediaType
- the MediaType of the stream for which a
StreamConnector is to be createdOperationFailedException
- if the binding of the sockets failsdoCreateStreamConnector(MediaType)
protected abstract org.jivesoftware.smack.packet.PacketExtension createTransport(java.lang.String media) throws OperationFailedException
OperationFailedException
protected org.jivesoftware.smack.packet.PacketExtension createTransportForStartCandidateHarvest(java.lang.String media) throws OperationFailedException
OperationFailedException
protected abstract org.jivesoftware.smack.packet.PacketExtension createTransportPacketExtension()
protected org.jitsi.service.neomedia.StreamConnector doCreateStreamConnector(org.jitsi.service.neomedia.MediaType mediaType) throws OperationFailedException
mediaType
- the MediaType of the stream for which a
StreamConnector is to be createdOperationFailedException
- if the binding of the sockets failsTransportManagerJabberImpl findTransportManagerEstablishingConnectivityWithJitsiVideobridge()
ColibriConferenceIQ.Channel getColibriChannel(org.jitsi.service.neomedia.MediaType mediaType, boolean local)
ColibriConferenceIQ.Channel
which belongs to a content
associated with a specific MediaType and is to be either locally
or remotely used.
Note: Modifications to the ColibriConferenceIQ.Channel instance returned by the method propagate to (the state of) this instance.
mediaType
- the MediaType associated with the content which
contains the ColibriConferenceIQ.Channel to getlocal
- true if the ColibriConferenceIQ.Channel
which is to be used locally is to be returned or false for the
one which is to be used remotely
Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under Apache license.