Package 

Class IceSdpUtils

  • All Implemented Interfaces:

    
    public class IceSdpUtils
    
                        

    A number of utility methods that WebRTC or SIP applications may find useful in case they are also fine with using jain-sdp

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      static void setIceCredentials(SessionDescription sDes, String uFrag, String pwd) Sets the specified ICE user fragment and password as attributes of the specified session description.
      static void initMediaDescription(MediaDescription mediaDescription, IceMediaStream iceMediaStream) Reflects the candidates from the various components in iceMediaStream into the specified m-line.
      static void initSessionDescription(SessionDescription sDes, Agent agent) Sets ice credentials, ICE options, media lines and candidates from agent, on the specified session description.
      static Collection<Attribute> createTrickleUpdate(Collection<LocalCandidate> localCandidates) Generates and returns a set of attributes that can be used for a trickle update, such as a SIP INFO, with the specified localCandidates.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • Method Detail

      • setIceCredentials

         static void setIceCredentials(SessionDescription sDes, String uFrag, String pwd)

        Sets the specified ICE user fragment and password as attributes of the specified session description.

        Parameters:
        sDes - the session description where we'd like to set a user fragment and a password.
        uFrag - the ICE user name fragment that we'd like to set on the session description
        pwd - the ICE password that we'd like to set on the session description
      • initMediaDescription

         static void initMediaDescription(MediaDescription mediaDescription, IceMediaStream iceMediaStream)

        Reflects the candidates from the various components in iceMediaStream into the specified m-line. Also sets default candidates into m= lines and c= lines. This method uses media level c= lines. They override session level making them pointless. This shouldn't be causing problems, but for good taste, make sure you don't include session level ones and avoid duplication.

        Parameters:
        mediaDescription - the media descriptions that we'd like to add candidates to.
        iceMediaStream - the media stream where we should extract candidates from.
      • initSessionDescription

         static void initSessionDescription(SessionDescription sDes, Agent agent)

        Sets ice credentials, ICE options, media lines and candidates from agent, on the specified session description.

        Parameters:
        sDes - the SessionDescription that we'd like to setup as per the specified agent.
        agent - the Agent that we need to use when initializing the session description.
      • createTrickleUpdate

         static Collection<Attribute> createTrickleUpdate(Collection<LocalCandidate> localCandidates)

        Generates and returns a set of attributes that can be used for a trickle update, such as a SIP INFO, with the specified localCandidates.

        Parameters:
        localCandidates - the list of LocalCandidates that we'd like to generate the update for.