Package 

Class IceMediaStream

  • All Implemented Interfaces:

    
    public class IceMediaStream
    
                        

    The class represents a media stream from the ICE perspective, i.e. a collection of components.

    • Constructor Detail

    • Method Detail

      • getName

         String getName()

        Returns the name of this IceMediaStream.

      • getCheckList

         CheckList getCheckList()

        Returns the list of CandidatePairs to be used in checks for this stream.

      • getParentAgent

         Agent getParentAgent()

        Returns a reference to the Agent that this stream belongs to.

      • getRemoteUfrag

         String getRemoteUfrag()

        Returns the user name that we received from the remote peer or null if we haven't received a user name from them yet.

      • setRemoteUfrag

         void setRemoteUfrag(String remoteUfrag)

        Specifies the user name that we received from the remote peer.

        Parameters:
        remoteUfrag - the user name that we received from the remote peer.
      • getRemotePassword

         String getRemotePassword()

        Returns the password that we received from the remote peer or null if we haven't received a password from them yet.

      • setRemotePassword

         void setRemotePassword(String remotePassword)

        Specifies the password that we received from the remote peer.

        Parameters:
        remotePassword - the user name that we received from the remote peer.
      • build

         static IceMediaStream build(Agent parentAgent, String name)

        Use builder pattern to provide an immutable IceMediaStream instance.

        Parameters:
        parentAgent - the agent that is handling the session that this media stream is a part of
        name - the name of the media stream
      • toString

         String toString()

        Returns a String representation of this media stream.

      • getComponent

         Component getComponent(int id)

        Returns the Component with the specified id or null if no such component exists in this stream.

        Parameters:
        id - the identifier of the component we are looking for.
      • getComponentCount

         int getComponentCount()

        Returns the number of Components currently registered with this stream.

      • removeComponent

         void removeComponent(Component component)

        Removes component and all its Candidates from the this stream and releases all associated resources that they had allocated (like sockets for example)

        Parameters:
        component - the Component we'd like to remove and free.
      • findLocalCandidate

         LocalCandidate findLocalCandidate(TransportAddress address, LocalCandidate base)

        Returns the local LocalCandidate with the specified address if it belongs to any of this stream's components or null otherwise. If base is also specified, tries to find a candidate whose base matches base.

        Parameters:
        address - the TransportAddress we are looking for.
        base - an optional base to match.
      • addPairChangeListener

         void addPairChangeListener(PropertyChangeListener l)

        Adds l to the list of listeners registered for property changes if CandidatePairs. We add such listeners in the stream, rather than having them in the candidate pair itself, because we don't want all pairs to keep lists of references to the same listeners.

        Parameters:
        l - the listener to register.