Class AbstractSrtpControl<T extends SrtpControl.TransformEngine>

    • Constructor Detail

      • AbstractSrtpControl

        protected AbstractSrtpControl​(SrtpControlType srtpControlType)
        Initializes a new AbstractSrtpControl instance with a specific SrtpControlType.
        Parameters:
        srtpControlType - the SrtpControlType of the new instance
    • Method Detail

      • createTransformEngine

        protected abstract T createTransformEngine()
        Initializes a new TransformEngine instance to be associated with and used by this SrtpControl instance.
        Returns:
        a new TransformEngine instance to be associated with and used by this SrtpControl instance
      • doCleanup

        protected void doCleanup()
        Prepares this SrtpControl for garbage collection.
      • getSrtpListener

        public SrtpListener getSrtpListener()
        Returns the SrtpListener which listens for security events.
        Specified by:
        getSrtpListener in interface SrtpControl
        Returns:
        the SrtpListener which listens for security events
      • getTransformEngine

        public T getTransformEngine()
        Returns the transform engine currently used by this stream.
        Specified by:
        getTransformEngine in interface SrtpControl
        Returns:
        the RTP stream transformation engine
      • setMasterSession

        public void setMasterSession​(boolean masterSession)
        When in multistream mode, enables the master session. The implementation of AbstractSrtpControl does nothing because support for multistream mode is the exception rather than the norm.
        Specified by:
        setMasterSession in interface SrtpControl
        Parameters:
        masterSession - whether current control, controls the master session.
      • setMultistream

        public void setMultistream​(SrtpControl master)
        Sets the multistream data, which means that the master stream has successfully started and this will start all other streams in this session. The implementation of AbstractSrtpControl does nothing because support for multistream mode is the exception rather than the norm.
        Specified by:
        setMultistream in interface SrtpControl
        Parameters:
        master - The security control of the master stream.
      • setSrtpListener

        public void setSrtpListener​(SrtpListener srtpListener)
        Sets a SrtpListener that will listen for security events.
        Specified by:
        setSrtpListener in interface SrtpControl
        Parameters:
        srtpListener - the SrtpListener that will receive the events
      • registerUser

        public void registerUser​(Object user)
        Registers user as an instance which is currently using this SrtpControl.
        Specified by:
        registerUser in interface SrtpControl
        Parameters:
        user - the Object which is currently using this SrtpControl