Class TestMediaSession


  • public class TestMediaSession
    extends JingleMediaSession
    This Class implements a complete JingleMediaSession for unit testing.
    • Constructor Detail

      • TestMediaSession

        public TestMediaSession​(PayloadType payloadType,
                                TransportCandidate remote,
                                TransportCandidate local,
                                java.lang.String locator,
                                JingleSession jingleSession)
        Creates a TestMediaSession with defined payload type, remote and local candidates.
        Parameters:
        payloadType - Payload of the jmf
        remote - the remote information. The candidate that the jmf will be sent to.
        local - the local information. The candidate that will receive the jmf
        locator - media locator
        jingleSession - the jingle session.
    • Method Detail

      • startTransmit

        public void startTransmit()
        Starts transmission and for NAT Traversal reasons start receiving also.
        Specified by:
        startTransmit in class JingleMediaSession
      • setTransmit

        public void setTransmit​(boolean active)
        Set transmit activity. If the active is true, the instance should transmit. If it is set to false, the instance should pause transmit.
        Specified by:
        setTransmit in class JingleMediaSession
        Parameters:
        active - active state
      • startReceive

        public void startReceive()
        For NAT Reasons this method does nothing. Use startTransmit() to start transmit and receive jmf
        Specified by:
        startReceive in class JingleMediaSession
      • stopTransmit

        public void stopTransmit()
        Stops transmission and for NAT Traversal reasons stop receiving also.
        Specified by:
        stopTransmit in class JingleMediaSession
      • stopReceive

        public void stopReceive()
        For NAT Reasons this method does nothing. Use startTransmit() to start transmit and receive jmf
        Specified by:
        stopReceive in class JingleMediaSession