Class ContentNegotiator
java.lang.Object
org.jivesoftware.smackx.jingleold.JingleNegotiator
org.jivesoftware.smackx.jingleold.ContentNegotiator
Content negotiator.
-
Field Summary
FieldsFields inherited from class org.jivesoftware.smackx.jingleold.JingleNegotiator
session -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddTransportNegotiator(TransportNegotiator transportNegotiator) voidclose()Prepare to close the media manager.protected voidDestroy the jmf negotiator.protected voidDestroy the transport negotiator.dispatchIncomingPacket(IQ iq, String id) Dispatch an incoming packet.protected voiddoStart()Called from above when starting a new session.Get the JingleMediaSession of this Jingle Session.Obtain the description negotiator for this session.getName()The negotiator state for the ContentNegotiators is a special case.Get jingle transport manager.Obtain the transport negotiator for this session.booleanReturn true if the transport and content negotiators have finished.voidsetJingleTransportManager(JingleTransportManager jingleTransportManager) Set jingle transport manager.protected voidsetMediaNegotiator(MediaNegotiator mediaNeg) Set the jmf negotiator.protected voidsetTransportNegotiator(TransportNegotiator transNeg) Set TransportNegotiatorvoidStop a Jingle media session.voidMethods inherited from class org.jivesoftware.smackx.jingleold.JingleNegotiator
addExpectedId, addListener, getConnection, getListenersList, getSession, isExpectedId, isStarted, removeExpectedId, removeListener, setNegotiatorState, setSession, start
-
Field Details
-
INITIATOR
- See Also:
-
RESPONDER
- See Also:
-
-
Constructor Details
-
ContentNegotiator
-
-
Method Details
-
dispatchIncomingPacket
public List<IQ> dispatchIncomingPacket(IQ iq, String id) throws XMPPException, SmackException, InterruptedException Description copied from class:JingleNegotiatorDispatch an incoming packet. The negotiators form a tree relationship that roughly matches the Jingle stanza format: JingleSession Content Negotiator Media Negotiator Transport Negotiator Content Negotiator Media Negotiator Transport Negotiator <jingle> <content> <description> <transport> <content> <description> <transport> This way, each segment of a Jingle stanza has a corresponding negotiator that know how to deal with that part of the Jingle packet. It also allows us to support Jingle packets of arbitrary complexity. Each parent calls dispatchIncomingPacket for each of its children. The children then pass back a List of results that will get sent when we reach the top level negotiator (JingleSession).- Specified by:
dispatchIncomingPacketin classJingleNegotiator- Parameters:
iq- the stanza receivedid- the ID of the response that will be sent- Returns:
- the new stanza to send (either a Jingle or an IQ error).
- Throws:
XMPPException- if an XMPP protocol error was received.SmackException- if Smack detected an exceptional situation.InterruptedException- if the calling thread was interrupted.
-
getCreator
-
getName
-
getJingleMediaSession
Get the JingleMediaSession of this Jingle Session.- Returns:
- the JingleMediaSession
-
addTransportNegotiator
-
setJingleTransportManager
Set jingle transport manager.- Parameters:
jingleTransportManager- TODO javadoc me please
-
getTransportManager
Get jingle transport manager.- Returns:
- the JingleTransportManager
-
doStart
Called from above when starting a new session.- Specified by:
doStartin classJingleNegotiator
-
close
Prepare to close the media manager.- Overrides:
closein classJingleNegotiator
-
getMediaNegotiator
Obtain the description negotiator for this session.- Returns:
- the description negotiator
-
setMediaNegotiator
Set the jmf negotiator.- Parameters:
mediaNeg- TODO javadoc me please the description negotiator to set
-
destroyMediaNegotiator
Destroy the jmf negotiator. -
getTransportNegotiator
Obtain the transport negotiator for this session.- Returns:
- the transport negotiator instance
-
setTransportNegotiator
Set TransportNegotiator- Parameters:
transNeg- TODO javadoc me please the transNeg to set
-
destroyTransportNegotiator
Destroy the transport negotiator. -
isFullyEstablished
Return true if the transport and content negotiators have finished.- Returns:
trueif fully established.
-
getJingleContent
-
triggerContentEstablished
-
stopJingleMediaSession
Stop a Jingle media session. -
getNegotiatorState
The negotiator state for the ContentNegotiators is a special case. It is a roll-up of the sub-negotiator states.- Overrides:
getNegotiatorStatein classJingleNegotiator
-