public class MediaNegotiator extends JingleNegotiator
session
Constructor and Description |
---|
MediaNegotiator(JingleSession session,
JingleMediaManager mediaManager,
List<PayloadType> pts,
ContentNegotiator parentNegotiator)
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addRemoteAudioPayloadType(PayloadType.Audio pt)
Adds a payload type to the list of remote payloads.
|
void |
close()
Terminate the jmf negotiator
|
List<IQ> |
dispatchIncomingPacket(IQ iq,
String id)
Dispatch an incoming packet.
|
protected void |
doStart()
Called from above when starting a new session.
|
PayloadType |
getBestCommonAudioPt()
Get the best common codec between both parts.
|
JingleDescription |
getJingleDescription()
Create a JingleDescription that matches this negotiator.
|
JingleMediaManager |
getMediaManager()
Return The media manager for this negotiator.
|
boolean |
isEstablished()
Return true if the content is negotiated.
|
boolean |
isFullyEstablished()
Return true if the content is fully negotiated.
|
protected void |
triggerMediaClosed(PayloadType currPt)
Trigger a jmf closed event.
|
protected void |
triggerMediaEstablished(PayloadType bestPt)
Trigger a session established event.
|
addExpectedId, addListener, getConnection, getListenersList, getNegotiatorState, getSession, isExpectedId, isStarted, removeExpectedId, removeListener, setNegotiatorState, setSession, start
public MediaNegotiator(JingleSession session, JingleMediaManager mediaManager, List<PayloadType> pts, ContentNegotiator parentNegotiator)
session
- The jingle session.public JingleMediaManager getMediaManager()
public List<IQ> dispatchIncomingPacket(IQ iq, String id) throws XMPPException, SmackException.NotConnectedException
dispatchIncomingPacket
in class JingleNegotiator
iq
- the packet receivedid
- the ID of the response that will be sentXMPPException
SmackException.NotConnectedException
public boolean isEstablished()
public boolean isFullyEstablished()
public void addRemoteAudioPayloadType(PayloadType.Audio pt)
pt
- the remote payload typepublic PayloadType getBestCommonAudioPt()
protected void triggerMediaEstablished(PayloadType bestPt) throws SmackException.NotConnectedException
bestPt
- payload type that has been agreed.SmackException.NotConnectedException
protected void triggerMediaClosed(PayloadType currPt)
currPt
- current payload type that is cancelled.protected void doStart()
doStart
in class JingleNegotiator
public void close()
close
in class JingleNegotiator
public JingleDescription getJingleDescription()